-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from XENONnT/simplify_source
Simplify TemplateSource, CombinedSource and SpectrumTemplateSource
- Loading branch information
Showing
9 changed files
with
466 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"coordinate_system": [ | ||
0.0, | ||
100.0 | ||
], | ||
"map": [ | ||
1.0, | ||
1.0 | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
alea/examples/configs/unbinned_wimp_statistical_model_template_source_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
parameter_definition: | ||
wimp_mass: | ||
nominal_value: 50 | ||
fittable: false | ||
description: WIMP mass in GeV/c^2 | ||
|
||
livetime_sr2: | ||
nominal_value: 0.5 | ||
fittable: false | ||
description: Livetime of SR2 in years | ||
|
||
livetime_sr3: | ||
nominal_value: 1.0 | ||
fittable: false | ||
description: Livetime of SR3 in years | ||
|
||
wimp_rate_multiplier: | ||
nominal_value: 1.0 | ||
ptype: rate | ||
fittable: true | ||
fit_limits: | ||
- 0 | ||
- null | ||
parameter_interval_bounds: | ||
- 0 | ||
- null | ||
|
||
er_rate_multiplier: | ||
nominal_value: 1.0 | ||
ptype: rate | ||
uncertainty: 0.2 | ||
relative_uncertainty: true | ||
fittable: true | ||
fit_limits: | ||
- 0 | ||
- null | ||
fit_guess: 1.0 | ||
|
||
signal_efficiency: | ||
nominal_value: 1.0 | ||
ptype: efficiency | ||
uncertainty: 0.1 | ||
relative_uncertainty: true | ||
fittable: true | ||
fit_limits: | ||
- 0 | ||
- 10. | ||
fit_guess: 1.0 | ||
description: Parameter to account for the uncertain signal expectation given a certain cross-section | ||
|
||
er_band_shift: | ||
nominal_value: 0 | ||
ptype: shape | ||
uncertainty: null # stats.uniform(loc=-2, scale=4) | ||
# relative_uncertainty: false | ||
fittable: true | ||
blueice_anchors: | ||
- -2 | ||
- -1 | ||
- 0 | ||
- 1 | ||
- 2 | ||
fit_limits: | ||
- -2 | ||
- 2 | ||
description: ER band shape parameter (shifts the ER band up and down) | ||
|
||
likelihood_config: | ||
template_folder: null # will try to find the templates in alea | ||
likelihood_terms: | ||
# SR2 | ||
- name: sr2 | ||
default_source_class: alea.template_source.TemplateSource | ||
likelihood_type: blueice.likelihood.UnbinnedLogLikelihood | ||
analysis_space: | ||
- cs1: np.linspace(0, 100, 51) | ||
- cs2: np.geomspace(100, 100000, 51) | ||
in_events_per_bin: true | ||
livetime_parameter: livetime_sr2 | ||
slice_args: {} | ||
sources: | ||
- name: er | ||
class: alea.template_source.CombinedSource | ||
parameters: | ||
- er_rate_multiplier | ||
- er_band_shift | ||
named_parameters: | ||
- er_band_shift | ||
fixed_weight: 0.2 | ||
weight_names: [fixed_weight, er_band_shift] # not meaningful, just an example | ||
histnames: [er_template, er_template, er_template] | ||
template_filenames: [er_template_0.h5, er_template_1.h5, er_template_-1.h5] | ||
histogram_scale_factor: 100 # absolute rate, /year | ||
|
||
- name: wimp | ||
histname: wimp_template | ||
parameters: | ||
- wimp_rate_multiplier | ||
- wimp_mass | ||
- signal_efficiency | ||
template_filename: wimp50gev_template.h5 | ||
apply_efficiency: True | ||
efficiency_name: signal_efficiency | ||
|
||
# SR3 | ||
- name: sr3 | ||
default_source_class: alea.template_source.TemplateSource | ||
likelihood_type: blueice.likelihood.UnbinnedLogLikelihood | ||
analysis_space: | ||
- cs1: np.linspace(0, 100, 51) | ||
- cs2: np.geomspace(100, 100000, 51) | ||
in_events_per_bin: true | ||
livetime_parameter: livetime_sr3 | ||
slice_args: {} | ||
sources: | ||
- name: er | ||
histname: er_template | ||
parameters: | ||
- er_rate_multiplier | ||
- er_band_shift | ||
named_parameters: | ||
- er_band_shift | ||
template_filename: er_template_{er_band_shift}.h5 | ||
|
||
- name: wimp | ||
class: alea.template_source.SpectrumTemplateSource | ||
histname: wimp_template | ||
parameters: | ||
- wimp_rate_multiplier | ||
- wimp_mass | ||
- signal_efficiency | ||
template_filename: wimp50gev_template.h5 | ||
spectrum_name: test_cs1_spectrum.json | ||
apply_efficiency: True | ||
efficiency_name: signal_efficiency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.