Welcome to iraf.net Tuesday, May 21 2024 @ 11:34 AM GMT
christian |
05/19/2010 01:37PM (Read 1880 times)
|
|
|
Status: offline
Registered: 04/25/2008
Posts: 13
|
Hi,I am currently trying to co-add a few images taken with different angles of the wcs north axis in regard to the x/y image axes. So I looked around for a simple IRAF task, which would give me in some way the angle between the image coordinate system and the wcs.
Is there some task like this or an easy workaround ?Regards
christian
|
|
|
|
fitz |
05/19/2010 01:37PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
An excerpt of CL script code that would compute the rotation angle looks something like:[code:1:9f57ca70b0] # Get the CD matrix from the image. We initialize the values above
# so if they don't exist in the header we won't change the value here
# (but we need to read them one at a time).
hselect (img, "cd1_1", yes) | scan (cd11)
hselect (img, "cd1_2", yes) | scan (cd12)
hselect (img, "cd2_1", yes) | scan (cd21)
hselect (img, "cd2_2", yes) | scan (cd22) # Compute the plate scale (arcsec/pixel) for the image.
scale = 3600. * sqrt ((cd11**2+cd21**2+cd12**2+cd22**2)/2.)
xrot = abs (datan ( cd21, cd11))
yrot = abs (datan (-cd12, cd22))
rot = (xrot + yrot) / 2.0
[/code:1:9f57ca70b0]where 'rot' is the rotation angle.Otherwise, have a look at the SREGISTER, WREGISTER or XREGISTER tasks for ways to register the images to a common WCS for easier stacking.
|
|
|
|
AnTaR3s |
05/19/2010 01:37PM
|
|
|
Status: offline
Registered: 10/24/2009
Posts: 58
|
There is also a tool within the images package:images.imcoords.ccmaptake this as an exampleinput = coo.dat The input coordinate files
database= coo.out The output database file
(solutio= ) The database plate solution names
(images = foo.fits) The input images
(results= ) The optional results summary files
(xcolumn= 1) Column containing the x coordinate
(ycolumn= 2) Column containing the y coordinate...
The file coo.dat has to include the x, y, Rec, Dec positions of stars in the image (one per line, the more the better).
Then everything is computed and written into coo.out, including the angle you are looking for.
|
|
|
|
| |
|
Content generated in: 0.10 seconds |
|