Welcome to iraf.net Friday, May 17 2024 @ 10:25 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Converting from cd matrix to crota/cdelt?
   
hberrier
 09/23/2008 08:37PM (Read 4044 times)  
+----
Newbie

Status: offline


Registered: 06/18/2008
Posts: 3
Hi, I'm trying to use a galaxy photometry routine created by my advisor that requires the wcs header keywords "crota" and "cdelt". Unfortunately, the wcs in my headers uses the cd rotation matrix. Is there a quick way to convert from the cd matrix to the crota/cdelt (I know it's fairly simple to go the other way)? Thank you!Heather

Heather
 
Profile Email
 Quote
fitz
 09/23/2008 08:37PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Unless I'm not remembering things correctly:[code:1:7e560eab69]
cdelt1 = cd1_1
cdelt2 = cd2_2
crota1 = atan2 ( cd2_1, cd1_1)
crota2 = atan2 (-cd1_2, cd2_2)
[/code:1:7e560eab69]Near the poles or when the x-axis is the Dec/Lat these equations change and there are special conditions, but in most cases i think these work.For reference, the CROT/CDELT to CD-matrix transform is:[code:1:7e560eab69]
CD1_1 = CDELT1 * cos (CROTA2)
CD1_2 = -CDELT2 * sin (CROTA2)
CD2_1 = CDELT1 * sin (CROTA2)
CD2_2 = CDELT2 * cos (CROTA2)
[/code:1:7e560eab69]Hope this helps, hope others can offer needed corrections/elaboration.Cheers,
-Mike

 
Profile Email
 Quote
hberrier
 09/23/2008 08:37PM  
+----
Newbie

Status: offline


Registered: 06/18/2008
Posts: 3
That helps a lot. Thank you!Heather

Heather
 
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