astrometric image shifts
Michael Gregg wrote on Mar 25, 2008
Hi,
I have a simple problem: I have two images from the same instrument of two adjacent fields which overlap slightly. Each image has a WCS in the header. There are about 20 objects detected in the overlap region, so I have x,y,ra,dec for these objects. There is a systematic shift of about 0.5" between the images.
First question: how do I determine the mean shift in RA & DEC? The mean shift in x & y is huge - I just want to determine the RA & DEC shift using the 20 objects in common along the overlap edge. I know, I can do this myself with a calculator, but I was looking for a convenient iraf task which will do it, given the reference and input image RA & DEC lists.
Second, once I have the shifts in RA & DEC, what is the recommended procedure for updating one or the other image WCS so they are the same?
Thanks,
mdg
</strong>
I have a simple problem: I have two images from the same instrument of two adjacent fields which overlap slightly. Each image has a WCS in the header. There are about 20 objects detected in the overlap region, so I have x,y,ra,dec for these objects. There is a systematic shift of about 0.5" between the images.
First question: how do I determine the mean shift in RA & DEC? The mean shift in x & y is huge - I just want to determine the RA & DEC shift using the 20 objects in common along the overlap edge. I know, I can do this myself with a calculator, but I was looking for a convenient iraf task which will do it, given the reference and input image RA & DEC lists.
Second, once I have the shifts in RA & DEC, what is the recommended procedure for updating one or the other image WCS so they are the same?
Thanks,
mdg
</strong>
Francisco Valdes wrote on Mar 25, 2008
There are various ways this type of problem is handled.
To do what you want, directly compute offsets and update the header, with the overlap lists I would suggest the tasks in the tables.ttools package. The tables package is an external package you need to install if you don't have it already. It manipulates tables where text files with regular columns are a subset. It may take a bit of reading to understand how to use the tasks but they are pretty flexible.
The alternative with simple tasks would be lists.average and using proto.fields to select columns which is then piped into average. But at some point you will have to do some arithmetic on your own. I would handle your problem with a simple IRAF script but this requires learning some amount of scripting including how to use "list directed" variables to loop through lines in a text file. To learn about scripting see http://iraf.net/irafdocs/script/ .
Once you have the shifts you either adjust the CRVAL keywords or the CRPIX keywords in the WCS in the header. Note that CRVAL are specified in decimal degrees for both RA and DEC. To change CRPIX you need to convert the offset in RA/DEC for the image you are adjusting to an equivalent offset in pixels using the scales at the reference point. The useful task WCSCTRAN can be used to convert between pixels (logical coordinates) and RA/DEC (world coordinates) based on the WCS in an image header.
Yours,
Frank Valdes
To do what you want, directly compute offsets and update the header, with the overlap lists I would suggest the tasks in the tables.ttools package. The tables package is an external package you need to install if you don't have it already. It manipulates tables where text files with regular columns are a subset. It may take a bit of reading to understand how to use the tasks but they are pretty flexible.
The alternative with simple tasks would be lists.average and using proto.fields to select columns which is then piped into average. But at some point you will have to do some arithmetic on your own. I would handle your problem with a simple IRAF script but this requires learning some amount of scripting including how to use "list directed" variables to loop through lines in a text file. To learn about scripting see http://iraf.net/irafdocs/script/ .
Once you have the shifts you either adjust the CRVAL keywords or the CRPIX keywords in the WCS in the header. Note that CRVAL are specified in decimal degrees for both RA and DEC. To change CRPIX you need to convert the offset in RA/DEC for the image you are adjusting to an equivalent offset in pixels using the scales at the reference point. The useful task WCSCTRAN can be used to convert between pixels (logical coordinates) and RA/DEC (world coordinates) based on the WCS in an image header.
Yours,
Frank Valdes
Last post on Mar 25, 2008