paulscherrerinstitute / pyzebra

GNU General Public License v3.0
3 stars 2 forks source link

Issue with fitting when y_err is 0 #17

Closed ivan-usov closed 3 years ago

ivan-usov commented 3 years ago

The fitting routine doesn't seem to handle the situation with y_err being 0 for any point of data. In the following code: https://github.com/paulscherrerinstitute/pyzebra/blob/cfe9832c1e09feb0c6474a0d54894bd41301cdbc/pyzebra/fit2.py#L134-L136 it will encounter division by 0 in weights calculation, which apparently breaks mod.fit function.