Skip to content
Snippets Groups Projects

[GH2] fix: enable manual edit for gh2_detector type and add validation

Merged Karim Ahmed requested to merge fix/access_to_overwrite_gh2_detector_type into master

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_fix.pdf

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

@roscar @schmidtp @mramilli @kluyvert

Edited by Karim Ahmed

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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",
  • Karim Ahmed
  • Karim Ahmed added 1 commit

    added 1 commit

    • 4d18f67e - change names detector_type to sensor_type and add validation in get_sensor_type

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • 4de7d68c - fix: not renaming parameter in summary notebook

    Compare with previous version

  • Thomas Kluyver
  • Karim Ahmed added 1 commit

    added 1 commit

    • 75c47117 - fix: move import numpy on top and add validation function to sensor type

    Compare with previous version

  • Thanks @kluyvert

  • Karim Ahmed enabled an automatic merge when the pipeline for 75c47117 succeeds

    enabled an automatic merge when the pipeline for 75c47117 succeeds

  • Karim Ahmed canceled the automatic merge

    canceled the automatic merge

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading