Welcome to iraf.net Friday, May 17 2024 @ 10:25 AM GMT
hberrier |
09/23/2008 08:37PM (Read 4044 times)
|
|
|
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
|
|
|
|
fitz |
09/23/2008 08:37PM
|
|
|
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
|
|
|
|
hberrier |
09/23/2008 08:37PM
|
|
|
Status: offline
Registered: 06/18/2008
Posts: 3
|
That helps a lot. Thank you!Heather
Heather
|
|
|
|
| |
|
Content generated in: 0.10 seconds |
|