Skip to content

Require --not-reproducible for selected notebook parameters

Thomas Kluyver requested to merge feat/non-reproducible-params into master

Description

Some correction parameters are desirable for experimentation, but would harm reproducibility if used for regular correction of scientific data. In particular, pointing to constants or config at an arbitrary path which may be changed or removed later on. The suggested compromise is to allow these along with the existing --not-reproducible flag, to protect against accidentally producing non-reproducible results.

There are a few subtly different possibilities for this check: are the parameters passed at all, is a non-default value passed, is a non-empty/false-y value passed, is the value passed different from a special known-safe value. I've currently implemented the second option, non-default, i.e. assuming that the default saved in the notebook is a safe value.

How Has This Been Tested?

xfel-calibrate agipd CORRECT \
  --ctrl-source-template '{}/MDL/FPGA_COMP' \
  --karabo-da AGIPD00 --sequences 0 \
  --karabo-id-control SPB_IRU_AGIPD1M1 --receiver-template '{}CH0' \
  --adjust-mg-baseline --bias-voltage 300 --blc-set-min --cm-dark-fraction 0.15 \
  --cm-dark-range -30 30 --cm-n-itr 4 --common-mode --ff-gain 1.0 \
  --force-hg-if-below --force-mg-if-below \
  --hg-hard-threshold 1000 --low-medium-gap --mg-hard-threshold 1000 --overwrite \
  --sequences-per-node 1 --slopes-ff-from-path 'foo' --max-tasks-per-worker 1 \
  --in-folder /gpfs/exfel/exp/SPB/202431/p900461/raw \
  --run 72 --karabo-id SPB_DET_AGIPD1M-1 \
  --out-folder /gpfs/exfel/data/scratch/kluyvert/agipd-corr-p900461-r72

That fails as expected; adding --not-reproducible or changing --slopes-ff-from-path to '' makes it work.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.

Reviewers

@schmidtp @ahmedk

Merge request reports