When the rms attribute of a Peak is calculated, the code actually returns the standard deviation. The repr of the Peak prints out RMS: {self.rms / units.mus} µs, which is an incorrect labeling. The given quantity is actually the standard deviation. The RMS should correspond to the square of the standard deviation and have units of µs^2, accordingly.
I propose that the attribute rms should contain the square of the standard deviation, and that a separate std attribute is added to contain the standard deviation.
|
self.rms = self. rms_above_threshold(0) |
|
def rms_above_threshold(self, thr): |
|
i_above_thr = self.pmts.where_above_threshold(thr) |
|
times_above_thr = self.times[i_above_thr] |
|
wf_above_thr = self.pmts.sum_over_sensors[i_above_thr] |
|
if np.size(i_above_thr) < 2 or np.sum(wf_above_thr) == 0: |
|
return 0 |
|
|
|
return weighted_mean_and_std(times_above_thr, wf_above_thr)[1] |
|
RMS: {self.rms / units.mus} µs |
When the
rmsattribute of aPeakis calculated, the code actually returns the standard deviation. Thereprof thePeakprints outRMS: {self.rms / units.mus} µs, which is an incorrect labeling. The given quantity is actually the standard deviation. The RMS should correspond to the square of the standard deviation and have units of µs^2, accordingly.I propose that the attribute
rmsshould contain the square of the standard deviation, and that a separatestdattribute is added to contain the standard deviation.IC/invisible_cities/evm/pmaps.py
Line 42 in cda031c
IC/invisible_cities/evm/pmaps.py
Lines 62 to 69 in cda031c
IC/invisible_cities/evm/pmaps.py
Line 83 in cda031c