tdub.config¶
Analysis configuration module.
tdub is a Python library for physics analysis. Naturally some properties of the analysis need to be easily modifiable for various studies. This module houses a handful of variables that can be modified simply by importing the module.
For example, we can call tdub.data.features_for()
and expect
different results without changing the API usage, just changing the
configuration module FEATURESET_foo
constants:
>>> from tdub.data import features_for
>>> features_for("2j2b")
['mass_lep1jet1', 'mass_lep2jet1', 'pT_jet2', ...]
>>> import tdub.config
>>> tdub.config.FEATURESET_2j2b = ["pT_jet1", "met"]
>>> features_for("2j2b")
['pT_jet1', 'met']
Similarly, we can modify the selection via this module:
>>> from tdub.data import selection_for
>>> selection_for("2j2b")
'(reg2j2b == True) & (OS == True)'
>>> import tdub.config
>>> tdub.config.SELECTION_2j2b = "(reg2j2b == True) & (OS == True) & (mass_lep1jet1 < 155)"
>>> selection_for("2j2b")
'(reg2j2b == True) & (OS == True) & (mass_lep1jet1 < 155)'
This module also contains some convenience functions for helping to automate the process of providing some sensible defaults for some configuration options, but not at import time (i.e. if the default requires importing a module or parsing some data from the web).
Constant Summary¶
List of features to avoid in classifiers. |
|
List of features to avoid specifically in 1j1b classifiers. |
|
List of features to avoid specifically in 2j1b classifiers. |
|
List of features to avoid specifically in 2j2b classifiers. |
|
|
The default grid to perform a parameter scan. |
List of features we use for classifiers in the 1j1b region. |
|
List of features we use for classifiers in the 2j1b region. |
|
List of features we use for classifiers in the 2j2b region. |
|
Plots (defined as TRExFitter Regions) to use log scale. |
|
Plotting metadata table. |
|
Seed for various random tasks requiring reproducibility. |
|
The numexpr selection string for the 1j1b region. |
|
The numexpr selection string for the 2j1b region. |
|
The numexpr selection string for the 2j2b region. |
Function Summary¶
Load metadata from network to define PLOTTING_META_TABLE. |
|
Set a sensible default PLOTTING_LOGY value. |
Constant Reference¶
-
tdub.config.
AVOID_IN_CLF_1j1b
¶ List of features to avoid specifically in 1j1b classifiers.
-
tdub.config.
AVOID_IN_CLF_2j1b
¶ List of features to avoid specifically in 2j1b classifiers.
-
tdub.config.
AVOID_IN_CLF_2j2b
¶ List of features to avoid specifically in 2j2b classifiers.
-
tdub.config.
FEATURESET_1j1b
¶ List of features we use for classifiers in the 1j1b region.
-
tdub.config.
FEATURESET_2j1b
¶ List of features we use for classifiers in the 2j1b region.
-
tdub.config.
FEATURESET_2j2b
¶ List of features we use for classifiers in the 2j2b region.