[GH2] fix: enable manual edit for gh2_detector type and add validation
Description
This is related to this ticket https://redmine.xfel.eu/issues/211291
The CTRL data for this proposal is messed up. Wrong bias_voltage and acquisition rate were stored.
Correct
SA1_XTD9_HIREX_correct_900432_r0141_241023_080613_036119.pdf
Robert who was OCD helped them by reprocessing them using the command line with the correct acquisition rate and bias voltage values, reported to him by Naresh.
SA1_XTD9_HIREX_correct_900432_r0141_2024-10-23T15_50_38.pdf
Naresh contacted him again after trying to analyze the data because he realized that the proc data had the wrong frames (not double frame numbers for one 25um module)
RAW
├INSTRUMENT
│ └SA1_XTD9_HIREX
│ └DET
│ ├GOTTHARD2_MASTER:daqOutput
│ │ └data (3 attributes)
│ │ ├adc [uint16: 250 × 500 × 1280] (4 attributes)
│ │ ├bunchId [uint64: 250 × 500] (16 attributes)
│ │ ├frameNumber [uint64: 250 × 500] (16 attributes)
│ │ ├gain [uint8: 250 × 500 × 1280] (4 attributes)
│ │ ├memoryCell [uint8: 250 × 500] (16 attributes)
│ │ ├timestamp [float64: 250 × 500] (16 attributes)
│ │ └trainId [uint64: 250] (1 attributes)
│ └GOTTHARD2_SLAVE:daqOutput
│ └data (3 attributes)
│ ├adc [uint16: 250 × 500 × 1280] (4 attributes)
│ ├bunchId [uint64: 250 × 500] (16 attributes)
│ ├frameNumber [uint64: 250 × 500] (16 attributes)
│ ├gain [uint8: 250 × 500 × 1280] (4 attributes)
│ ├memoryCell [uint8: 250 × 500] (16 attributes)
│ ├timestamp [float64: 250 × 500] (16 attributes)
│ └trainId [uint64: 250] (1 attributes)
PROC
├INSTRUMENT
│ └SA1_XTD9_HIREX
│ └CORR
│ └GOTTHARD_RECEIVER:daqOutput
│ └data
│ ├adc [float32: 250 × 500 × 1280]
│ ├bunchId [uint64: 250 × 500]
│ ├frameNumber [uint64: 250 × 500]
│ ├gain [uint8: 250 × 500 × 1280]
│ ├mask [uint32: 250 × 500 × 1280]
│ ├memoryCell [uint8: 250 × 500]
│ ├timestamp [float64: 250 × 500]
│ └trainId [uint64: 250]
After checking the data, I see that rxhostname
in RUN source has the wrong value (same for the data source for checking if the module is reversed or not)
gh2_detector_type_value_error.pdf
Therefore, I add a fix to overwrite the gh2_detector
type manually, and validation in the case for an unexpected gh2_detector
value with the number of karabo_da
Dark
I have also enabled overwriting gh2_detector
for dark notebook
How Has This Been Tested?
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
Reviewers
Merge request reports
Activity
assigned to @ahmedk
added 1 commit
- 8f970f31 - fix: remove gh2_detector value from 1st in correction and remove unused gh2_detector from dark
added 1 commit
- 98a85f23 - fix: remove gh2_detector value from 1st in correction
added 1 commit
- 0a292786 - fix: add gh2_detector in the first notebook cell
51 51 "exposure_period = -1. # Detector exposure period, set to -1 to use value in raw file.\n", 52 52 "acquisition_rate = -1. # Detector acquisition rate (1.1/4.5), set to -1 to use value in raw file.\n", 53 53 "single_photon = -1 # Detector single photon mode (High/Low CDS), set to -1 to use value in raw file.\n", 54 "# This is used for the summary notebook\n", 55 "gh2_detector = \"\" # Specifies the GH2 detector type ('50um' or '25um'). This parameter can be used to manually set the detector type if the code cannot automatically determine it from the control data.\n", changed this line in version 5 of the diff
- Resolved by Karim Ahmed
added 1 commit
- 4d18f67e - change names detector_type to sensor_type and add validation in get_sensor_type
added 1 commit
- 4de7d68c - fix: not renaming parameter in summary notebook
- Resolved by Karim Ahmed
- Resolved by Karim Ahmed
added 1 commit
- 75c47117 - fix: move import numpy on top and add validation function to sensor type
Thanks @kluyvert
enabled an automatic merge when the pipeline for 75c47117 succeeds