Page History
...
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana-amo01509-r0125-acqiris.cfg; # # Useful commands: # psana -n 5 -m EventKeys exp=amo01509:run=125:xtc > test-acqiris-file.txt; # psana -n 5 -m psana_examples.DumpAcqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (C++ version) # psana -n 1 -m psana_examples.dump_acqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (python version) [psana] #files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.ImgSaveInFile:wf ImgAlgos.ImgSaveInFile:wt skip-events = 0 events = 100 [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime = acqiris_wtime fname_prefix = acq print_bits = 11 [ImgAlgos.ImgSaveInFile:wf] source = AmoETOF.0:Acqiris.0 key = acqiris_wform fname = acq-AmoETOF-wform ftype = txt #ftype = tiff #saveAll = true print_bits = 3 eventSave = 5 [ImgAlgos.ImgSaveInFile:wt] source = AmoETOF.0:Acqiris.0 key = acqiris_wtime fname = acq-AmoETOF-wtime ftype = txt #ftype = tiff #saveAll = true print_bits = 3 eventSave = 5 |
This script with psana does a few things:
- module AcqirisArrProducer gets Acqiris data from event store and saves them back in the event store as uniform ndarrays<double,2> for waveforms and times
- two instances of the module ImgSaveInFile save arrays of waveforms and times for local event 5.
This script saves 3 text files
acq-amo01509-r0125.txt
-- with configuration parameters- acq-AmoETOF-wform-r0125-20091018-182512.194787218.txt – with waveforms for 5th event
- acq-AmoETOF-wtime-r0125-20091018-182512.194787218.txt – with wave-times for 5th event
...
Psana with this script runs over 1000 events apply threshold-based selection algorithm and produces files:
- acq-amo01509-r0125-config.txt -- with Acqiris configuration parameters
- acq-amo01509-r0125-ave-wfs.txt with averaged array of waveforms, which were below threshold (averaging for bae-line level):
Anchor | ||||
---|---|---|---|---|
|
...
In this script the base-line level for all waveforms is loaded from file and is subtracted in module ImgAlgos.AcqirisCalib.
...
acq-AmoETOF-wform-raw-r0125-e00000005-20091018-182512.194787218.txt
acq-AmoETOF-wform-calibrated-r0125-e00000005-20091018-182512.194787218.txt
which content is presented on plots:
Anchor | ||||
---|---|---|---|---|
|
...
- for the 1st 1000 events averages waveforms below thresholds threshold and saves results in the file acq-bline-amo01509-r0125-ave-wfs.txt;
- for the next 1000 events subtracts baseline level and averages waveforms above thresholds and saves results in the file acq-signal-amo01509-r0125-ave-wfs.txt.
...
Overview
Content Tools