Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColors#AAFFFF
# Command to run this script: 
# psana -c psana_cfd.cfg;
#
[psana]
modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisCalib ImgAlgos.AcqirisCFD 

files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc \
        /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc

[ImgAlgos.AcqirisArrProducer]
source        = AmoETOF.0:Acqiris.0
key_in        =
key_wform     = acqiris_wform
key_wtime     = acqiris_wtime
fname_prefix  = acq
print_bits    = 0


[ImgAlgos.AcqirisCalib]
source               = AmoETOF.0:Acqiris.0
key_in               = acqiris_wform
key_out              = wf-calibrated
fname_base_line      = acq--r0000-ave-wfs.txt
#skip_events         = 0
#proc_events         = 100
print_bits           = 0
 
[ImgAlgos.AcqirisCFD]
source        = AmoETOF.0:Acqiris.0
key_wform     = wf-calibrated
baselines =     0.0 0.0 0.0 0.0 0.0
thresholds =    -0.005 -0.005 -0.005 -0.005 -0.005
fractions =     0.5 0.5 0.5 0.5 0.5
deadtimes =     20.0e-9 20.0e-9 20.0e-9 20.0e-9 20.0e-9
leading_edges = 1 1 1 1 1

This script analyzes an AMO run where 5 acqiris channels were in use.  It uses an AcqirisArrProducer to producer the list of waveforms/times for all channels.  It then uses an AcqirisCalib module to do a baseline subtraction using a previously generated file of baselines act--r0000-ave-wfs.txt.  Finally, a constant fraction discriminator algorithm is run on all the waveforms with user specified parameters.  The edges calculated by AcqirisCFD are saved to the event as one ndarray<double,1> per channel, each with a (default) key "acqiris_edges_N" where N is the channel number.  Channels where no edges were found are not saved to the event.

Anchor
ImgAlgos::AcqirisCombinedExample
ImgAlgos::AcqirisCombinedExample

...