Skip to content

Data analysis program for digitized scintillator pulses

Notifications You must be signed in to change notification settings

Khai-Ngo/SDPP-SPECTRODISC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scintillator Digital Pulse Processing for SPECTROscopy and pulse shape DISCrimination (SDPP-SPECTRODISC)

SDPP-SPECTRODISC performs pulse height spectrum (PHS) construction and pulse shape discrimination (PSD) analysis of digitized scintillator pulses via the charge integration method. Currently data format of the following digitizers are supported: CAEN DT5751, CAEN DT5730S, and Picoscope 5444. Please note for the CAEN digitizers it is assumed that wavedump.exe was used to acquire data, and output header was enabled in the wavedump config file.

Installation

[Add something here later]

Analysis

Input file field accepts .dat files generated by CAEN wavedump.exe, or .traces file generated by Picoscope DAQ software.

For each pulse, the program calculates the baseline by averaging the first n samples specified by the user. The pulse is flipped upside-down if the raw pulse is specified to have negative polarity, as it is often for the case scintillator detectors. The start of the pulse is the point at which the pulse crosses the threshold, shifted backwards by an amount called the pre-gate. Then the pulse is numerically integrated twice from the identified start over two time intervals: short gate and long gate. The PSD value is defined as 1-Qshort/Qlong. The total charge deposited or pulse height (PH) can be taken as Qlong by ticking the 'Same as long gate' box. Otherwise, the pulse is integrated again for the PH (assuming total charge time > long gate).

Please note that the following parameters do not matter when analysing Picoscope data: baseline, threshold, and pulse polarity.

Upon clicking Analyse, the user is prompted to choose save destination of the analysis results. The results are saved in the format of a three-column .txt file. The columns in order are: pulse height, PSD value, and time stamp. This result file can be read by SDPP-SPECTRODISC again to perform graph plotting and histogram construction.

Plot

Input file field accepts the three-column .txt output from Analysis.

The user can plot 2D scatterplots of PH versus PSD, construct histogram of the distribution of PH and PSD value, and calculate the count rate during every second of the experiment (i.e timetrace) from the input data. There is freedom to specify the data range to be examined, the labels on the plot axes, the amount of data to be read, the number of bins for the histogram, and the scaling factors for PH data (for calibration purposes).

Possible improvements

  1. Implement data validation for the input fields.
  2. Implement count rate analysis into the program (currently used as a separate module) - CHECK
  3. Implement an optional analysis operation: pile-up rejection
  4. Optimize input file reading for the Plot tab: don't re-read the file if the user is trying to analyse the same input file (i.e. plotting a different region of the data, construct a histogram with a different number of bins, etc.)
  5. Include some form of unit test + test input and output to establish a ground truth.
  6. Add a progress bar while doing analysis of the raw pulses. Get rid of the py.exe terminal thing when launching.
  7. Program launches a secondary window when the user click on the Analyse button and analyse the raw data independently so that the main program does not hang (i.e in the meantime you can launch another analysis window processing a different file or batch of files, or switching to some graph plotting and post analysis of the output of the previous raw pulses analysis)
  8. Offer more customisation to how the 2D plot looks.

About

Data analysis program for digitized scintillator pulses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages