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

Doug Tody tody at tucana.tuc.noao.edu
Tue Mar 12 20:48:43 EST 2002


Hi Michal -

All of the IMAGES tasks in IRAF support world coordinate systems and
will update the WCS if you do something like tranpose an image.  The
problem is that the DSS images have a non-standard header (of course,
we don't have a standard for FITS WCS yet, so lets just say the headers
do not follow current conventions).

You can use the "makewcs" task in STSDAS (stsdas.analysis.gasp) to "fix"
the image headers so that IRAF tasks can properly interpret the headers.
The first part of the help page is copied below.

Cheers,

	- Doug Tody


NAME
    makewcs -- Produce WCS  keywords  for  a  dss  scanned  image  plate
    header.
    
USAGE
    makewcs  input
    
DESCRIPTION
    The  'makewcs'  task  will  create the World Coordinate System (WCS)
    keywords in the image header of the Digital Scan  Survey  subimages.
    These  subimages  contain  the keywords CNPIX1 and CNPIX2 indicating
    the lower left corner of the subimage  with  respect  to  the  lower
    left  corner of the original image. Early versions of these subimage
    headers had the keywords CRPIX1 and CRPIX2; the program will  rename
    these keywords to the new ones CNPIX1 and CNPIX2.
    
    Headers  for the original scanned images lack WCS keywords---namely,
    the CD, CRPIX, and CRVAL keywords. The task  then  takes  the  plate
    solution  from  the  image  header  and calculates the CRVAL keyword
    values for the center of the subimage. The CD values are  calculated
    by solving for a grid of 100 equally spaced points in the image.

[...]


---
On 12 Mar 2002, Michal Szymanski wrote:
> 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.
> 
> -- 
>   Michal Szymanski (msz at astrouw.edu.pl)
>   Warsaw University Observatory, Warszawa, POLAND




More information about the fitsbits mailing list