OSSOS / MOP

The Moving Object Pipeline: discovery & tracking of trans-Neptunian objects
GNU General Public License v3.0
4 stars 9 forks source link

reals are centred on sources with consistent offset #166

Closed mtbannister closed 11 years ago

mtbannister commented 11 years ago

astrometry appears to consistently be measured off by about a pixel - circles are centred up and to the right of the sources.

ijiraq commented 11 years ago

@drusk matplotlib wants 0,0 to contain the value at the centre of of the element. In FITS the value at the centre of the first pixel is considered 1,1. Thus, when imshow draws an image the values it puts a 0,0 are the ones the coordinates in the astrom file think should be at 1,1. This can be reconciled by changing the xy range of the canvas AFTER drawing the image so that the canvas interactions all report back FITS based coordinate values. Basically xlim and ylim should both get pushed up by one value after the imshow command.

On Tuesday, August 6, 2013, mtbannister wrote:

astrometry appears to consistently be measured off by about a pixel - circles are centred up and to the right of the sources.

— Reply to this email directly or view it on GitHubhttps://github.com/ijiraq/MOP/issues/166 .

mtbannister commented 11 years ago

This does not seem to be resolved: cf. an email I'll send you rather than github because it contains coordinates.

drusk commented 11 years ago

I don't believe this was actually fixed previously. I think the axes itself needs to have its coordinates adjusted because it is the axes object that the circle is added to.

drusk commented 11 years ago

@ijiraq in imshow you passed extent=(1, self.width + 1, self.height + 1, 1). The elements of the extent-tuple are (left, right, bottom, top). Does this mean FITS images start with (1,1) in the upper left corner (as opposed to lower left corner like a regular cartesian coordinate system?)

drusk commented 11 years ago

Pulling up a FITS image in ds9 it appears (1,1) is the bottom left corner, so I don't think the extent is right.

drusk commented 11 years ago

There seems to be an off-by-one error related to converting coordinates to cutouts' coordinate systems since I had thought FITS images were indexed from (0,0) instead of (1,1).

mtbannister commented 11 years ago

Inspected 22 known reals.astrom files and all looked perfectly centred. Happily closing.