Welcome to iraf.net Tuesday, May 21 2024 @ 11:34 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 WCS angle
   
christian
 05/19/2010 01:37PM (Read 1880 times)  
+----
Newbie

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

 
Profile Email
 Quote
fitz
 05/19/2010 01:37PM  
AAAAA
Admin

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.

 
Profile Email
 Quote
AnTaR3s
 05/19/2010 01:37PM  
+++--
Chatty

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.

 
Profile Email
 Quote
   
Content generated in: 0.10 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login