next-exp/IC

PMAPs code confuses RMS and standard deviation

Open

#928 geöffnet am 19. Feb. 2025

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (77 Forks)auto 404
easyenhancementgood first issue

Repository-Metriken

Stars
 (10 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide