Closed larrybradley closed 1 year ago
Yes, the pixel convention in Imfit is 1-based (like e.g. IRAF and SAOimage DS9); PyImfit inherits this (so that an Imfit-compatible configuration file will produce the same output for both Imfit and PyImfit).
This is explained at several points in the Imfit manual -- but evidently not (enough) in the PyImfit documentation, and it obviously should be, since it conflicts with the Python/NumPy default. It's mentioned at one point in the PyImfit overview page -- in the "Specify the model (and its parameters)" section -- but that's only inside the comments, where it's easy to miss.
I should probably elevate that comment tosomething boldfaced in the main text of that page; any suggestions for other places to mention this? E.g., where did you look to see if it was mentioned?
I only looked in the pyimfit
documentation. Sorry, I missed it in the code comment. I think it would be good to document this somewhere more prominent. For photutils
, I have a page about the pixel coordinate conventions (https://photutils.readthedocs.io/en/latest/pixel_conventions.html).
Oh, absolutely this should be more clearly documented.
Thanks for the link to your coordinate-conventions page; that's an excellent idea!
I've (finally) updated the documentation to include a pixel-coordinate convention file similar to your photutils example, as well as some extra (and hopefully more explicit/obvious) discussion in the overview. (Thanks again for bringing this to my attention!) https://pyimfit.readthedocs.io/en/latest/pixel_conventions.html
Generating a model image results in a 1-pixel offset in both x and y. I assumed that (x, y) pixel coordinates are 0-indexed (i.e., Python convention). Are they actually 1-indexed? I couldn't find anything in documentation about the pixel coordinate convention.
I expected this model image to be centered at (x, y) = (50, 50) (the input x0, y0), but it's actually centered at (49, 49):