pylhc / omc3

Python 3 codes for beam optics measurements and corrections in circular particle accelerators

Home Page:https://pylhc.github.io/omc3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rolling problem when calculating std for low values

JoschD opened this issue · comments

Pandas rolling std() function will not work for small numbers (i.e. <1e-8), which we might encounter in the error values, from pandas version 1.2.0, see pandas-dev/pandas#37051 and pandas-dev/pandas#39872 .

As we are using this for cleaning purposes in bbq_tools we should replace this by a manual rolling loop.

Should be fixed in newer pandas versions: pandas-dev/pandas#40505
(This is milestone for version 1.3 so probably this one when it's released)
To be tested!

I guess that will simply make us force != 1.2 in the dependencies then?

Just tested in pandas 1.3.1 and it works correctly again. So yes, != 1.2 will work!

commented

We have != 1.2 in the dependencies for this reason. Fixed.