Specify defaults via run metadata / run doc #223
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows runs to specify default values for strax processing options via their metadata (run documents / database) using the
strax_defaults
field. This is very similar to theprocessor...
field in XENON1T and will hopefully make correction handling a lot easier. Strax configruration priority is now as follows (high to low):default
,default_factory
ordefault_per_run
(in that order of priority).The
default_per_run
option will soon be deprecated/removed , now that this new way of specifying run-dependent defaults is available. Currentlydefault_per_run
forces strax runs to have names that are castable to integers, which breaks proper functioning of superruns (as @petergaemers noted) and is a pain more generally.The original motivation behind
default_per_run
was that I liked to enable processing independent of a runs DB. Since run metadata can for some time already be provided by json files (as we currently do on dali), that motivation no longer applies.