Trying to fit test data in zebra2020n000039.ccl, measurement 19, yields the following error:
....
File "/das/home/usov_i/pyzebra/pyzebra/fit2.py", line 135, in fitccl
fit_area = u.ufloat(result.params["g_amp"].value, result.params["g_amp"].stderr)
File "/das/work/p15/p15876/miniconda3/envs/pyz/lib/python3.6/site-packages/uncertainties/core.py", line 3274, in ufloat
final_ufloat = ufloat_obsolete(nominal_value, tag_arg)
File "/das/work/p15/p15876/miniconda3/envs/pyz/lib/python3.6/site-packages/uncertainties/core.py", line 3217, in ufloat_obsolete
return ufloat_fromstr(representation, tag)
File "/das/work/p15/p15876/miniconda3/envs/pyz/lib/python3.6/site-packages/uncertainties/core.py", line 3201, in ufloat_fromstr
representation.strip())
AttributeError: 'numpy.float64' object has no attribute 'strip'
Checking the values in result shows that result.params["g_amp"].stderr is None, which causes an exception in u.ufloat.
Trying to fit test data in
zebra2020n000039.ccl
, measurement 19, yields the following error:Checking the values in
result
shows thatresult.params["g_amp"].stderr
isNone
, which causes an exception inu.ufloat
.Probably, the order of code needs an adjustment, because right after there is the check for
result.params["g_amp"].stderr
beingNone
: https://github.com/paulscherrerinstitute/pyzebra/blob/18ba623fd84d8f9707886e8d7b6a5868e14337b5/pyzebra/fit2.py#L138