image orientation on the screen

Rob Seaman seaman at noao.edu
Tue Jan 14 13:36:09 EST 1997


Mike Newberry <mnewberry at axres.com> writes:

> Since there is no hardwired spec and no keywords for this, I wonder if
> there is a commonly adopted "standard":
> 
> Where should pixel (0,0) of a FITS file be displayed on the screen-- in
> the upper left or lower left corner?

Well, IRAF/Ximtool/SAOimage (and others) put the origin at the lower left.
A FITS file is usually considered to be in fortran storage order, so the
lines fill left to right before they fill bottom to top.  Data cubes and
higher dimensional images provide further complications.

The computer graphics "standard" is to have the origin at the upper left.
Many systems both in and out of astronomy allow the origin to be placed
in any corner (either overtly, or via syntax that flips axes).  Ximtool,
for instance, provides buttons that flip the display along either axis.
Transposing about diagonals requires outside operations.

> And for which ever is correct, should the screen image match the
> orientation (i.e., no mirror reversal) of what the CCD saw?

Depends.

It isn't entirely clear how to interpret the orientation of what a
detector array (not limited to CCDs, or physical detectors in general
for that matter) "sees".  An orientation may only be defined at the
point that the image is actually displayed to the user.

To be less pedantic, note that a scientist and an engineer may want
to view different orientations of the same field.  An engineer (or
a paranoid scientist, for that matter) will want to view an array
in "readout order" - the first pixel/line read out should be the
first pixel/line displayed.  This allows unambiguous interpretation
of any imaging defects - for just one example:  do defects precede
or follow known bad pixels?

A CCD, of course, may be mounted any which way on the telescope, and
may be read out through any one of the corners.  Multiple readout CCDs
complicate this further (half the pixels are shifted each way - or
perhaps four different ways).  Mosaic detectors may have 8 or 16 readouts...

On the other hand, an astronomer will often prefer to see the image
"correct on the sky".  Note that "correct on the sky" is itself a rather
fuzzy concept - only in one hemisphere might north be at the top and
east to the left.  To get more pedantic again, note that the computer
monitor is rarely placed in any correct orientation relative to the sky.

Note that FITS WCS provides a (potentially) more rigorous mechanism to
address these issues.  (FITS might also conceivably benefit from the
experiences of the remote sensing/GIS communities.)

Rob Seaman
-- 
seaman at noao.edu, http://iraf.noao.edu/~seaman
NOAO, 950 N Cherry Ave, Tucson AZ 85719, 520-318-8248
PGP: 98 8D 8B 49 74 9A 41 88  3A 43 87 54 51 BF 30 4B




More information about the fitsbits mailing list