Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with common process free spectrum #94

Open
tsmith2 opened this issue May 1, 2021 · 5 comments
Open

Issue with common process free spectrum #94

tsmith2 opened this issue May 1, 2021 · 5 comments

Comments

@tsmith2
Copy link

tsmith2 commented May 1, 2021

When running model 2a with a free spectrum for the common process I am getting the following error:

UserWarning: No parameter prior match found between ['gw_log10_rho_0' 'gw_log10_rho_1' 'gw_log10_rho_2' 'gw_log10_rho_3' 'gw_log10_rho_4' 'gw_log10_rho_5' 'gw_log10_rho_6' 'gw_log10_rho_7' 'gw_log10_rho_8' 'gw_log10_rho_9' 'gw_log10_rho_10' 'gw_log10_rho_11' 'gw_log10_rho_12' 'gw_log10_rho_13' 'gw_log10_rho_14' 'gw_log10_rho_15' 'gw_log10_rho_16' 'gw_log10_rho_17' 'gw_log10_rho_18' 'gw_log10_rho_19' 'gw_log10_rho_20' 'gw_log10_rho_21' 'gw_log10_rho_22' 'gw_log10_rho_23' 'gw_log10_rho_24' 'gw_log10_rho_25' 'gw_log10_rho_26' 'gw_log10_rho_27' 'gw_log10_rho_28' 'gw_log10_rho_29'] and PTA.object.

From what I can tell the free spectrum priors are being set in the common_red_noise block, so it is unclear to me what might be causing this error.

@stevertaylor
Copy link
Collaborator

Hi @tsmith2. Could you give more details associated with your PTA setup?

@tsmith2
Copy link
Author

tsmith2 commented May 11, 2021

The snippet where I read in the white noise dictionary and set up the PTA is:

## Get parameter noise dictionary
noise_ng12 = datadir + '/channelized_12p5yr_v3_full_noisedict.json'

params = {}
with open(noise_ng12, 'r') as fp:
    params.update(json.load(fp))

# define selection by observing backend
selection = selections.Selection(selections.by_backend)

pta = models.model_2a(psrs, psd='spectrum',
                      noisedict=params, components=30)

I have used the same snippet with other psd options (like powerlaw) and it has worked without a problem.

@stevertaylor
Copy link
Collaborator

Very interesting. I'm a bit unsure what's the culprit here. Have you tried model_general with orf=crn to try the same thing?

@tsmith2
Copy link
Author

tsmith2 commented May 13, 2021

I may be using an older version of enterprise extensions, but in order to add a common red noise block I need to leave orf=None.... when I use the model_general I get the same error as before.

@tsmith2
Copy link
Author

tsmith2 commented May 13, 2021

In case this is useful, there is the Traceback:

Traceback (most recent call last):
  File "gwb_analysis.py", line 94, in <module>
    sampler = super_model.setup_sampler(resume=False, outdir=outDir, sample_nmodel=False)
  File "/home/physics/anaconda3/envs/enterprise/lib/python3.6/site-packages/enterprise_extensions/hypermodel.py", line 275, in setup_sampler
    par_names=[p for p in self.param_names if 'gw' in p]), 10)
  File "/home/physics/anaconda3/envs/enterprise/lib/python3.6/site-packages/enterprise_extensions/sampler.py", line 475, in draw_from_par_prior
    .format(par_names))
UserWarning: No parameter prior match found [list of 'gw_log10_rho_i'] and PTA.object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants