next-exp/IC

PMAPs code confuses RMS and standard deviation

Open

#928 aperta il 19 feb 2025

Vedi su GitHub
 (3 commenti) (0 reazioni) (1 assegnatario)Python (77 fork)auto 404
easyenhancementgood first issue

Metriche repository

Star
 (10 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

https://github.com/next-exp/IC/blob/cda031c211b0ceaf81e2ba0e6afb9cb15d23d8c2/invisible_cities/evm/pmaps.py#L42 https://github.com/next-exp/IC/blob/cda031c211b0ceaf81e2ba0e6afb9cb15d23d8c2/invisible_cities/evm/pmaps.py#L62-L69 https://github.com/next-exp/IC/blob/cda031c211b0ceaf81e2ba0e6afb9cb15d23d8c2/invisible_cities/evm/pmaps.py#L83

Guida contributor