next-exp/IC

PMAPs code confuses RMS and standard deviation

Open

#928 ouverte le 19 févr. 2025

Voir sur GitHub
 (3 commentaires) (0 réactions) (1 assigné)Python (77 forks)auto 404
easyenhancementgood first issue

Métriques du dépôt

Stars
 (10 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

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

Guide contributeur