legend-exp / LegendDSP.jl

LEGEND digital signal processing in Julia
Other
1 stars 4 forks source link

SiPM dsp parameters #22

Open rosannadeckert opened 4 months ago

rosannadeckert commented 4 months ago

Now we have the following parameters: blfc, timestamp, eventID_fadc, e_fc, trig_pos, trig_max, trig_pos_DC, trig_max_DC. Can we add the following parameters:

Let me know what you think.

oschulz commented 4 months ago

Sure, why not.

What do we use wf_fwhm for?

rosannadeckert commented 4 months ago

sometimes there are "noise trains" in the traces that we can tag with wf_fwhm

oschulz commented 4 months ago

Hm, we'll have to see how to make this performant. Variance would be easy, but for FWHM we have to build per-waveform histograms, right?

theHenks commented 4 months ago

So the max pars are no problemo. That is just adding something. The wf_fwhm could be a bit harder since you have to build histograms. I wouldn't recommend that since it will really take a lot of time. We could just get some signalstats from some part of the waveform if that is fine with you? Or we really calculate the sigma of the distribution. I can think about something. The is_valid_hit I would add in the event building stage.

rosannadeckert commented 4 months ago

that's how the build the histogram in pygama: https://github.com/legend-exp/dspeed/blob/main/src/dspeed/processors/histogram.py. Maybe we can do something similar. I agree that is_valid_hit can go in the evt tier.

oschulz commented 4 months ago

that's how the build the histogram in pygam

We should be able to use StatsBase.Histogram or FHist.Hist1D without high mem-alloc cost if we preallocate the hist weights as an ArrayOfSimilarArray for all waveforms, and then just wrap histogram objects around them.