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

Derived Parameters in CFG files #729

Merged
merged 6 commits into from
May 24, 2023

Conversation

BenSmithers
Copy link
Member

Summary

These commits will allow DerivedParams to be defined in the cfg files directly. Much of this is relevant to additions in pull request #715

This is very handy if you have a basis change for your nuisance parameters, and don't need as many parameters in the new basis to span the space of all output shapes accessible.

Additions

Edits here are pretty minor. I just added some lines to the config_parser to make the DerivedParams and configure them appropriately. I also made a minor change to the Stage class so it doesn't raise exceptions when a bunch of extra parameters are there. I removed a print statement too.

Usage

For a DerivedParam, a list of parameter names the DerivedParam is derived from needs to be provided, separated by spaces; this is assigned to depends_names.

It should also be passed a function_file, which is a pisa-path (or full path) pointing to a json-serialized utils.callable.Funct whose relevant Vars refer to those Param names the DerivedParam depends on.

Ex:

param.ddm_ortho_0 = 0.00+/-1.83
param.ddm_ortho_0.range = [-9.17, 9.17] * units.dimensionless
param.ddm_ortho_0.fixed = True
    
param.ddm_ortho_1 = 0.00+/-1.49
param.ddm_ortho_1.range = [-7.45, 7.45] * units.dimensionless
param.ddm_ortho_1.fixed = True

param.le_piminus = 0.0000
param.le_piminus.depends_names = ddm_ortho_0 ddm_ortho_1 
param.le_piminus.function_file = /data/user/bsmithers/wg-oscillations-fridge/analysis/meows_sterile/nuisance/daemon/function_files/le_piminus_function.json
    
param.he_Kplus = 0.0000
param.he_Kplus.depends_names = ddm_ortho_0 ddm_ortho_1 
param.he_Kplus.function_file = /data/user/bsmithers/wg-oscillations-fridge/analysis/meows_sterile/nuisance/daemon/function_files/he_Kplus_function.json
    

So, for example, you could have Params theta_34 and theta_24, and DerivedParams for U_mu4 and U_tau4 which load function files telling it how to calculate the unitary mixing matrix elements from the mixing angles themselves (or you could do the exact opposite).

@LeanderFischer
Copy link
Collaborator

Same comment as for #733: Please pull/merge the current changes from master, which are fixing the test runs. I'll look at the changed code in more detail, later!

Copy link
Collaborator

@philippeller philippeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for leaving this PR sit idle...I'm fine with the propose changes and it can be merged

@LeanderFischer
Copy link
Collaborator

Sorry for leaving this PR sit idle...I'm fine with the propose changes and it can be merged

It still needs to be brought up to speed with master, so the tests won't fail, though.

@LeanderFischer LeanderFischer merged commit 464b49c into icecube:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants