I added automatic shift tracking and a check for a minimum wanted power in that bin to Shahab's npz_addup.py script.
It looks for the highest bin in the projected spectrum (so after time-cut) and tracks it position. Careful, it uses the position in the very first FILE as reference. So, the ordering in the given file list affects this.
Here's Shahab's log entry about the initial script:
https://elog.gsi.de/esr/E0203_E0018/137
Created pull request in Shahabs repo:
https://github.com/xaratustrah/e0018_e0203_scripts/pull/1
Before that is accepted, find the script here:
https://github.com/mijja-koeln/e0018_e0203_scripts/blob/main/npz_addup.py
New command line options are:
-h, --help show this help message and exit
-t TIME_CUT, --time-cut TIME_CUT
Start time as a float (optional)
-s, --shift-track Enable shift tracking based on strongest peak in spectrum (optional)
-l PWR_LIMIT, --pwr-limit PWR_LIMIT
Set minimum power required to process file (optional)
-v, --verbose Print additional information (optional)
"-s" enables shift tracking and correction.
"-l" enables power limit / threshold. Only files with at least this power in the highest bin are used for summation.
"-v" prints infos abuot the tracking in each file. Optional, if you want to see how good it works.
The --time-cut option is applied in all scenarios, i.e. also before projection used for tracking.
Have fun! |