Skip to content

[AGIPD] [DARK] Add support for AGIPD mini half in dark calibration

Cyril Danilevski requested to merge feat/AGIPD_mini_half_darks into master

Description

In this MR, I've made modifications regarding the way the acquisition rate is calculated, as part of the Mini Half epic (calibration-workshop issue #177

How Has This Been Tested?

It's been tested by running the notebook against DETLAB data. Jola approved the resulting report resulting from this script:

xfel-calibrate AGIPD DARK \
    --slurm-mem 750 \
    --slurm-name darks_mini_half \
    --report-to /gpfs/exfel/data/scratch/danilevc/out/mini_half_test \
    --receiver-id {}CH0 \
    --karabo-id-control HED_EXP_AGIPD500K2G \
    --karabo-da-control DA01 \
    --h5path-ctrl /CONTROL/{}/MDL/FPGA_COMP \
    --in-folder /gpfs/exfel/exp/DETLAB/202031/p900172/raw \
    --out-folder /gpfs/exfel/data/scratch/danilevc/out/mini_half_test \
    --karabo-id DETLAB_DET_AGIPD500K2G \
    --run-high 73 \
    --run-med 71 \
    --run-low 72

It's also been tested against breaking changes on AGIPD1M1 detectors with the following script:

xfel-calibrate AGIPD DARK \
    --slurm-mem 750 \
    --slurm-name darks_modif_checks \
    --report-to /gpfs/exfel/data/scratch/danilevc/out/darks_modif_checks \
    --receiver-id {}CH0 \
    --karabo-id-control SPB_IRU_AGIPD1M1 \
    --karabo-da-control AGIPD1MCTRL00\
    --h5path-ctrl /CONTROL/{}/MDL/FPGA_COMP_TEST \
    --in-folder /gpfs/exfel/exp/SPB/202030/p900138/raw \
    --out-folder /gpfs/exfel/data/scratch/danilevc/out/darks_modif_checks \
    --karabo-id SPB_DET_AGIPD1M-1 \
    --run-high 167 \
    --run-med 168 \
    --run-low 169

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

In cal_tools.cal_tools.tools.agipdlib, I extensively modified get_acq_rate to be able to get the acquisition rate from slow data, the MDL FPGA_COMP device.

I've updated the interface such that it first tries to get the information from slow data, if possible, or then resorts to calculating it from fast data.

As such, all AGIPD notebooks have to have be updated. Which I will do once the report has been approved.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Having talked offline with @ahmedk , we discussed the usage of type hinting.
We're thinking of trialling it, as a number of functions have cryptic parameters.

@kamile

Edited by Cyril Danilevski

Merge request reports