Skip to content

[REMI] Save pulse amplitudes during discrimination

Philipp Schmidt requested to merge feat/REMI-pulse-heights into master

Description

The first step in actual signal processing for the Quad/Hex DLD detectors is discrimination of the analog signal into digital edges. In a recent REMI beamtime, one of the detectors seem to require constant tuning of their discrimination thresholds indicating unusually variation in the pulse heights. So far it was never necessary to look at the pulse heights, so this MR now adds tracking, plotting (see below) and subsequent storage of the pulse amplitudes corresponding to each edge found. The tracking part lives in the actual Cython implementations currently still in the EXtra-remi package.

How Has This Been Tested?

run = 50  # Run ID.
in_folder = '/gpfs/exfel/exp/SQS/202301/p003090/raw'  # Partial input path appended with run ID.
calib_config_path = '/gpfs/exfel/exp/SQS/202301/p003090/usr/remi_proc_config.yaml'  # Path to correction and transform configuration
ppl_offset = -96  # In units of the PPT.
first_pulse_offset = 18000  # Sample position where the first pulse begins, ignored when PPT is reconstructed.

Relevant Documents (optional)

image

Top plot shows pulse height distribution, bottom plot shows fractional component of edge positions after interpolation. The latter plot is useful to judge the quality of interpolation used (currently linear, but could be extended to slower sinc interpolation in the future if necessary). Given enough samples, this distribution is expected to be constant (i.e. any fractional position occurs with equal probability). Linear interpolation for very steep slopes can e.g. cause this distribution to be non-constant, indicating poor interpolation quality.

Types of changes

  • New feature (non-breaking change which adds functionality)

Reviewers

@ahmedk

Merge request reports