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

HAL get_simulated_dataset does not update name of BKG model #95

Open
sergiohcdna opened this issue Mar 21, 2024 · 0 comments
Open

HAL get_simulated_dataset does not update name of BKG model #95

sergiohcdna opened this issue Mar 21, 2024 · 0 comments

Comments

@sergiohcdna
Copy link

Description
When using get_simulated_dataset, the new HAL instance keep the name of the original instance for the Background normalization model

MWE and error

For any maptree and detector response:

hawc = HAL("HAWCCR",maptree,detres,roi)
hawc.set_active_measurements(bin_list=analysis_bins)
hawc.set_model(this_likelihood_model)

simhawc = hawc.get_simullated_dataset('SimHAWC')
thisdata = DataList(simhawc)

njl = JointLikelihood(this_likelihood_model,thisdata,verbose=False)
par,stats = njl.fit(quiet=True)

 ERROR     This is a bug of the plugin for <class 'hawc_hal.HAL.HAL'>: nuisance     joint_likelihood.py:137
                  parameters must contain the instance name 

If I check the _nuisance_parameters dict, I get:

simhawc._nuisance_parameters

OrderedDict([('HAWCCR_bkg_renorm',
              Parameter HAWCR_bkg_renorm = 1.0 []
              (min_value = 0.5, max_value = 1.5, delta = 0.01, free = False))])

Expected behavior

simhawc._nuisance_parameters

OrderedDict([('SimHAWC_bkg_renorm',
              Parameter SimHAWC_bkg_renorm = 1.0 []
              (min_value = 0.5, max_value = 1.5, delta = 0.01, free = False))])

Desktop (UMD-Fiesta)

  • OS: CentOS Linux
  • Version 7 Core
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

1 participant