Skip to content

pulse_shape_discrimination

Kamil Brylew edited this page Nov 19, 2026 · 5 revisions

Live Pulse-Shape Discrimination

The per-channel PSD workspace separates event populations using the two charge estimates transported in MCA list-mode records. It is a live analysis view fed by the MCA DMA worker; it does not own another hardware buffer and does not alter a simultaneously recorded raw event stream.

The displayed ratio is:

PSD ratio = (Qlong - Qshort) / Qlong
          = 1 - charge_energy / trapezoid_energy

trapezoid_energy is also the horizontal coordinate. Both quantities are raw producer values until the detector response and event-field interpretation have been validated for the specific setup.

For a completed radioactive-source experiment and downloadable replay sessions, follow the neutron/gamma PSD showcase. It documents EJ-309 and EJ-276D measurements with PuC and gamma sources, the recorded charge-comparison gates, in-application FOM fits, and an energy-resolved FOM, with links to the published Zenodo dataset.

CH0 live workflow on .135

The following reference run used channel 0 of 192.168.10.135:30431. A CAEN generator supplied artificial Na-22 test signals; this is a functional acquisition example, not a radioactive-source measurement. No PSU setting was applied or required.

1. Run Scope Auto Setup

  1. Open Scope and select CH0.
  2. Stop ordinary Scope acquisition and disable Record DMA frames.
  3. Click Auto Setup and wait for the result instead of changing Scope controls while its worker is active.
  4. Confirm that a real pulse crosses the selected trigger and that the status reports verified.

In this run Auto Setup found a negative pulse, selected Falling edge, set the DAC baseline to 252, and set the raw Scope threshold to 28322.

Live CH0 Scope after a verified Auto Setup on the .135 generator signal.

These Scope values describe the Scope ADC path. They are not the MCA trigger level below and should not be copied between the two signal paths.

2. Configure MCA charge comparison

Stop Scope before moving to MCA. Apply these CH0 settings while MCA list-mode DMA is stopped:

Setting Value
Polarity Negative
Baseline 64 ns
Debug 1 / Debug 2 Input signal / Trigger signal
Pile-ups 0
Binning 128
Trigger level -512 raw
Window length 1024 ns
Pretrigger offset 24 ns
Trigger source Threshold
Charge Comparison Enabled, 150 ns
PSD Zero Crossing Disabled
Zero Crossing mode/window Mode 0, 8–16 ns (inactive while disabled)

Charge Comparison is the feature that supplies charge_energy for this live PSD ratio. The separately named PSD Zero Crossing block produces timing markers for another analysis path; it is deliberately disabled in this example.

Live CH0 MCA settings and spectrum used for the PSD measurement.

Select Online only under Settings -> General Settings… when no raw file is required, then enable Record list-mode DMA. Choose Binary, HDF5, or ROOT instead when the same events must also be retained for offline analysis.

3. Configure and acquire the PSD view

Use these client-side display settings:

PSD control Value
Energy display bins 1024
Ratio display bins 256
Energy shift 0 bits
Ratio range -1.0…1.0
PSD cut 0.5344

Return to MCA and press Start. The PSD workspace begins accumulating only when MCA list-mode DMA is active and Charge Comparison is enabled. Stop the MCA measurement and wait for the final drain before treating the matrix as a completed result.

Completed live CH0 PSD matrix showing two separated generator populations, the fitted components, and the FOM quality warning.

Reading the plots

  • The left image is a logarithmically coloured energy-versus-ratio matrix. Its axes remain raw values.
  • The red horizontal line is the movable PSD cut. It classifies the display; it does not reject records from a saved DMA stream.
  • The blue vertical region selects the energy interval used by the ratio projection at upper right.
  • The lower plot contains separate raw-energy projections for events below and above the cut.

This live run produced two clear fitted ratio centroids near 0.04859 and 0.72593. The cut at 0.5344 separates their displayed energy projections. They are generator populations and are intentionally not labelled as particle species. Such a label requires detector data from a controlled, independently identified source and detector-specific validation.

Energy positions, ratio centres, and the best cut depend on detector gain, pulse shaping, integration time, and source geometry. Repeat the optimization instead of copying 0.5344 to another channel or setup.

FOM fitting and gate optimization

The live and offline ratio projections provide a shaded fit ROI and two draggable centroid seeds. Fit performs a bounded double-Gaussian constant-background fit with Poisson-deviance residuals and reports both centroids and FWHMs, reduced deviance, and FOM = |mu2 - mu1| / (FWHM1 + FWHM2). Inspect convergence, covariance, parameter bounds, population separation, and residuals before treating the FOM as qualified. Copy table exports the fitted populations and diagnostics.

For the artificial signal shown above, the fit returned FWHM values 0.05892 and 0.01460 and a nominal FOM of 9.213, but its reduced Poisson deviance was 236. The visible poor-convergence warning therefore takes precedence: this large FOM is useful for exercising the workflow, not as a qualified detector performance result.

In Waveform Analysis Workbench, a completed fit can seed Optimize gates. The bounded local search varies the short- and long-gate endpoints while holding the baseline, integration start, energy/fit ROIs, and centroid seeds fixed; poor-convergence candidates are rejected. The selected gates are rebuilt and refitted on the full selected dataset. They are specific to that detector, source, waveform sample period, and analysis constraints.

PSD Event Readback and Waveform Analysis can download non-overwriting report bundles containing the matrix, projections, separated spectra, fit components, diagnostics, settings, provenance, and machine-readable metadata. Waveform reports also retain the exact gates. See Analysis Tools.

Integrity of the reference run

The final CH0 run transported 304,128 records in 297 complete frames. The MCA view reported verified continuity with zero DMA faults, zero DMA errors, and zero list dead time. Of those records, 303,693 entered the displayed ratio range; 394 had zero total energy and 41 lay outside the configured view. The PSD subscriber reported zero display-buffer drops.

A visually clean matrix is not enough to establish integrity. Always inspect the final MCA DMA summary after Stop. A nonzero list_deadtime_raw, frame count mismatch, DMA fault, or display drop makes the affected interpretation incomplete.

For saved-event reconstruction and bounded offline analysis, see MCA List-Mode Analysis. For buffer ownership and output modes, see Acquisition Workflows and Capture Files and Integrity.

Clone this wiki locally