next-exp/IC

PMAPs code confuses RMS and standard deviation

Open

#928 创建于 2025年2月19日

在 GitHub 查看
 (3 评论) (0 反应) (1 负责人)Python (77 fork)auto 404
easyenhancementgood first issue

仓库指标

Star
 (10 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南