bcobo / SIRENA

https://bcobo.github.io/SIRENA/
GNU General Public License v3.0
0 stars 0 forks source link

Inconsistent message and evalueation of prebuffer? #41

Closed mtceballos closed 2 days ago

mtceballos commented 4 days ago

I'm running:

tesrecons Recordfile=/dataj6/ceballos/INSTRUMEN/EURECA/realData/GSFC/10Jan2020_RTS/channel_99/pulse_chan99_singles.fits 
TesEventFile=/dataj6/ceballos/INSTRUMEN/EURECA/realData/GSFC/10Jan2020_RTS/channel_99/evt_pulse_chan99_libKas_pL1000_OPTFILT4000_pB100_filt_thS3.5.fits flength_0pad=1000 prebuff_0pad=100 
LibraryFile=/dataj6/ceballos/INSTRUMEN/EURECA/realData/GSFC/10Jan2020_RTS/channel_99/library_Kas_4000_pB1000_filt_thS3.5.fits samplesUp=3 nSgms=5 samplesDown=4 Sum0Filt=0 clobber=yes 
EnergyMethod=0PAD XMLFile=GSFC_maxfl4000_pB1000.xml LbT=0.01 FilterMethod=F0 filtEeV=5893.89602804 OFStrategy=FIXED

After some records processed, it crashes complaining about:

Error in pulseGrading: Not enough samples to work with preBuffer (recordrecord=16233): tstart=213, prebuffer=1000
Error in runEnergy: Cannot run routine pulseGrading

The record 16233 has two pulses and the first one is very close to the start of the record. However, this same file has been successfully processed with the same library and using prebuff_0pad=1000 and flength_0pad=2000.

bcobo commented 2 days ago

There is a double checking (in 'procRecord' and 'pulseGrading') about tstart and prebuffer samples. What's more the checking in 'pulseGrading' was wrong because the prebuffer used to compare was the one in the XML file and not the 'prebuff_0pad'.