Problem when using "center" parameter in `moffat_fit` and `gauss_fit`
When using "center" (in my case combined with unit_center=Unit(“deg”)
), I get error messages (using the latest mpdaf version from the git).
For moffat_fit
this error message is:
mpdaf/obj/image.py", line 2271, in moffat_fit
I = ima.data.data[center[0], center[1]] - cont
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
The same problems occurs for the gauss_fit (here line 1947 in obj/image.py).
A simple and working fix seems to be ima.data.data[int(center[0]), int(center[1])]
?
Thanks, Johannes