[fitsbits] Re: changing WCS entries when transposing an image - how?

tam tam at lheapop.gsfc.nasa.gov
Tue Mar 12 09:54:51 EST 2002


Michal Szymanski wrote:

> Hi,
> 
> FITS files coming from DSS have the complete information regarding the
> transformation between pixel coords and RA/Dec, contained in their
> headers. 
> 
> What is the simplest way to transpose such an image *together* with its
> WCS header? I mean simple operations like cutting a subimage, shifting
> or rotating the image.
> 
> I've tried IRAF's "imtranspose" but it seems to blindly copy all related
> header entries *as is*, so the resulting image has a completely broken
> transformation installed.
> 
> any hints would be appreciated,
> 
> regards, Michal.


I daresay the FITS World Coordinate System papers say this more
clearly, but you may wish to view the FITS keywords as describing
the transformation between celestial coordinates and pixels in
two separate stages:

The first stage is describing the transformation between the celestial sphere
and some projection plane.  This transformation is quite complex
for the DSS.  It is a polynomial distortion of a
tangent plane projection.

The second stage is to transform from this projection plane into pixel
coordinates.  This is just a linear transformation.

Only the second step is affected in the kinds of operations you wish
to do.  You are still working in the same projection plane as
defined in your original image (or perhaps a reflection of it).

Thus all you should need to do is change the CRPIX, CDELT and whatever
rotation keywords you are using to accomplish what you want.   Most
of the DSS transformation keywords (e.g, the AMDX and AMDY and PPO
etc) keywords should be completely unchanged.   Unfortunately the
DSS images that one retrieves from ST aren't really set up to
do WCS the way that has been developed over the past decade or so--
their format predates the WCS standards.  So you may need to adapt
the ST format to add the appropriate WCS keywords and also adapt
your software to recognize these if it doesn't already.

	Regards,
	Tom McGlynn





More information about the fitsbits mailing list