Skip to content
Snippets Groups Projects

[AGIPD][CORRECT][DARK] Run calibration for AGIPD SM

Merged Karim Ahmed requested to merge feat/single_module_plot into master

Description

This is the second iteration for this MR which addresses only AGIPD changes for running dark and correct calibration processes for AGIPD's single module detector.

1- Create a temporary agipd_single_module_geometry function to plot a single AGIPD module using extra-geom 2- Removing skipping parts in dark notebook from previous MR. 3. Fix AGIPDCtrls by removing AGIPD1M and AGIPD500K assumptions when sorting the dark runs. 4. Differentiate between the list for modules and the list of module indices mod_indices. This needs a bigger change by using the new CALCAT metadata for the detector's module indices. 5. Other fixes while testing dark processing for proposal p900438 runs from 1 to 3 and correction for run 1

How Has This Been Tested?

Relevant Documents (optional)

AGIPD Sparta correction report

Screenshot_from_2024-02-20_15-48-49

AGIPD Sparta dark report

Screenshot_from_2024-02-20_15-49-11

Types of changes

Checklist:

Reviewers

@schmidtp @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
989 "\n",
990 "_, gains = get_trains_data(out_folder, 'image.gain', include, karabo_id, tid, modules=nmods)\n",
991 "_, mask = get_trains_data(out_folder, 'image.mask', include, karabo_id, tid, modules=nmods)\n",
992 "_, blshift = get_trains_data(out_folder, 'image.blShift', include, karabo_id, tid, modules=nmods)\n",
993 "_, cellId = get_trains_data(out_folder, 'image.cellId', include, karabo_id, tid, modules=nmods)\n",
994 "_, pulseId = get_trains_data(out_folder, 'image.pulseId', include, karabo_id, tid, modules=nmods, fillvalue=0)\n",
995 "_, raw = get_trains_data(run_folder, 'image.data', include, karabo_id, tid, modules=nmods)"
989 "mod_starts_at = 0 if nmods > 1 else modules[0] # TODO: use CALCAT metadata for the detector.\n",
990 "tid, corrected = get_trains_data(out_folder, 'image.data', include, karabo_id, modules=nmods, mod_starts_at=mod_starts_at)\n",
991 "\n",
992 "_, gains = get_trains_data(out_folder, 'image.gain', include, karabo_id, tid, modules=nmods, mod_starts_at=mod_starts_at)\n",
993 "_, mask = get_trains_data(out_folder, 'image.mask', include, karabo_id, tid, modules=nmods, mod_starts_at=mod_starts_at)\n",
994 "_, blshift = get_trains_data(out_folder, 'image.blShift', include, karabo_id, tid, modules=nmods, mod_starts_at=mod_starts_at)\n",
995 "_, cellId = get_trains_data(out_folder, 'image.cellId', include, karabo_id, tid, modules=nmods, mod_starts_at=mod_starts_at)\n",
996 "_, pulseId = get_trains_data(out_folder, 'image.pulseId', include, karabo_id, tid, modules=nmods, fillvalue=0, mod_starts_at=mod_starts_at)\n",
997 "_, raw = get_trains_data(run_folder, 'image.data', include, karabo_id, tid, modules=nmods, mod_starts_at=mod_starts_at)"
  • Karim Ahmed
    Karim Ahmed @ahmedk started a thread on the diff
  • 347 347 sort_values = []
    348 348 if self.gain_modes == self.adaptive_gain_modes: # Adaptive gain # sort by patterns
    349 349 # Patterns -> DarkHG: 1, DarkMG: 2, DarkLG: 3
    350 if "AGIPD1M" in self.ctrl_src:
    350 if "patternTypeIndex.value" in self.run_ctrls[0].run_dc.keys_for_source(self.ctrl_src):
    351 351 sort_by = "patternTypeIndex"
    352 elif "AGIPD500K" in self.ctrl_src:
    352 elif "expTypeIndex.value" in self.run_ctrls[0].run_dc.keys_for_source(self.ctrl_src):
    353 353 sort_by = "expTypeIndex"
    354 else:
    355 raise ValueError(
    356 "Neither `patternTypeIndex` nor `expTypeIndex` "
    357 "keys are available in CTRL data source.")
  • Karim Ahmed changed the description

    changed the description

  • Karim Ahmed changed title from Test AGIPD SM dark and correct changes to [AGIPD][CORRECT][DARK] Run calibration for AGIPD SM

    changed title from Test AGIPD SM dark and correct changes to [AGIPD][CORRECT][DARK] Run calibration for AGIPD SM

  • Karim Ahmed added 1 commit

    added 1 commit

    • d75d2176 - mod_indices assignment when karabo_da undefined

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • ffa680cf - mod_indices assignment when karabo_da undefined

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • 9ce4cd3b - explicitly check for AGIPD65K

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    Compare with previous version

  • Author Owner

    Thank you for the review!

  • Karim Ahmed enabled an automatic merge when the pipeline for 561d0543 succeeds

    enabled an automatic merge when the pipeline for 561d0543 succeeds

  • Karim Ahmed canceled the automatic merge

    canceled the automatic merge

  • Karim Ahmed changed target branch from feat/agipd_single_module to master

    changed target branch from feat/agipd_single_module to master

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