You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
RMS stands for root mean square, i.e. the square root of the variance. RMS and std coincide when the average of the population is 0 and, in an abuse of the language, the terms are usually used interchangeably. Here we push these definitions a bit further by applying it to a waveform where time is the variable and the waveform amplitude its weight.
That being said, I agree that the correct term would be std and should replace RMS.
Oh, this is actually a bit embarrassing, yes, you're right. I've removed the "bug" flag, because this isn't one. It would still be good to replace RMS with "std" to avoid this confusion, and while we are at it we could also add a "var" property containing the variance. Even though the difference is just a square root, I think that it would be useful because we have a direct linear relationship between the variance and the drift time, so the variance is physically more interesting IMO.
When the
rms
attribute of aPeak
is calculated, the code actually returns the standard deviation. Therepr
of thePeak
prints 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
rms
should contain the square of the standard deviation, and that a separatestd
attribute 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
The text was updated successfully, but these errors were encountered: