Skip to content

WIP: Separate digitizers from XGM, assign absolute pulse ID to XGM and digitizers data

Laurent Mercadier requested to merge digitizers into master

Involved: @lleguy @gortr @mercurio

The aim is to simplify the code for digitizers and XGM data extraction, and to assign the absolute pulse ID from the bunch pattern table. The new features are:

  • A new digitizers.py file, with one general function get_peaks that can take any FastADC or ADQ412 data.
  • get_tim_peaks() and get_fast_adc_peaks() tailored for SCS data, where peaks are loaded from peak-integrated data or automatically detected from raw traces and the bunchpattern is used to assign pulse ID.
  • a simplification of cleanXGMdata() and selectSASEinXGM() and pulse ID assignment.
  • useage of the bunch_pattern_external module.

The consequences are:

  • We do not need to load or compute the 'sase1', 'sase3', 'npulses_sase1', 'npulses_sase3' arrays in the load function anymore.
  • Instead, we could only load the 'bunchPatternTable' by default, to speed up each of these new functions (currently they each load the bunch pattern table).
  • The function extractBunchPattern is not useful and could be removed.

Question:

  • Where are the functions used to get TIM or XGM data located in the DSSC analysis, and is it easy to adapt them to this new feature?

Todo:

  • Adapt the function checkTimApdWindow
  • Adapt the function calibrateXGMs to the new package structure
  • Extract BAM data in a similar way, with pulse ID alignment

Merge request reports