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

Specify defaults via run metadata / run doc #223

Merged
merged 7 commits into from Dec 19, 2019

Conversation

JelleAalbers
Copy link
Member

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 the processor... field in XENON1T and will hopefully make correction handling a lot easier. Strax configruration priority is now as follows (high to low):

  • Context options (set by user)
  • Defaults specified in run metadata (i.e. run document/database)
  • Defaults specified with plugin definition, using default, default_factory or default_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. Currently default_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.

@JelleAalbers
Copy link
Member Author

JelleAalbers commented Dec 19, 2019

Hmm, this is less useful than I thought: we should only put options in the run doc that will never change (or keep some kind of history, and think carefully about how this interfaces with the context-based versioning in straxen). Otherwise it becomes difficult to go back and reproduce old results.

Nonetheless, (a) this could be useful for non-changing settings (b) it's a XENON1T-like backup option, useful for small TPCs etc, and (c) there are things in this PR we'll want anyway to support the upcoming deprecation of default_per_run.

@JelleAalbers JelleAalbers merged commit 6684d2a into AxFoundation:master Dec 19, 2019
@JelleAalbers JelleAalbers deleted the run_doc_defaults branch December 19, 2019 11:47
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

Successfully merging this pull request may close these issues.

None yet

1 participant