I'm trying to export wcs data... but struggling

18 views
Skip to first unread message

rory griffin

unread,
Aug 27, 2022, 5:33:20 AMAug 27
to astrometry
Hi,
I'm trying to export wcs data from a photograph of space using astrometry.net. The wcs file appears to be a .fits file. I'm trying to get a text file that looks something like this...
NAXIS1  =                 2000
NAXIS2  =                 1000
WCSAXES =                    2 / Number of coordinate axes
CRPIX1  =               1000.0 / Pixel coordinate of reference point
CRPIX2  =                500.0 / Pixel coordinate of reference point
CDELT1  =                -0.18 / [deg] Coordinate increment at reference point
CDELT2  =                 0.18 / [deg] Coordinate increment at reference point
CUNIT1  = 'deg'                / Units of coordinate increment and value
CUNIT2  = 'deg'                / Units of coordinate increment and value
CTYPE1  = 'GLON-MOL'           / galactic longitude, Mollweide's projection
CTYPE2  = 'GLAT-MOL'           / galactic latitude, Mollweide's projection
CRVAL1  =                  0.0 / [deg] Coordinate value at reference point
CRVAL2  =                  0.0 / [deg] Coordinate value at reference point
               
I would very much appreciate some pointers that would help me convert the wcs.fits file from astromety.net into the simple text file above.

Many thanks Rory 

paul.l...@gmail.com

unread,
Aug 27, 2022, 6:48:36 AMAug 27
to astrometry
You don't say what OS you are using or what software you already have installed.

in my case, under Linux, I use "imhead" on a FITS image file more often than not. This useful little tool is part of the "wcstools" suite which can do far more, including editing a FITS header,  (x,y) <-> (ra,dec) conversion, rotating and/or reflecting images, and more.

I don't do Windows myself but I see no reason why wcstools shouldn't work there, especially under WSL. The main site is http://tdc-www.harvard.edu/wcstools/ where it is claimed "This software is all written in very portable C, so it should compile and run on any computer with a C compiler."  Someone,. somewhere must have built a Windows version at some time in the last twenty years!

In my experience, MacOS is sufficiently Unix-like that compiling from source is generally straightforward.

Paul

rory griffin

unread,
Aug 27, 2022, 8:00:21 AMAug 27
to paul.l...@gmail.com, astrometry
thank you Paul,  much appreciated. Hopefully someone has written something for windows for non c compiler literate folks like myself👍 I'll look into it. 

Rory

Sent from my Phone. Expect typos and very short sentences😜

From: astro...@googlegroups.com <astro...@googlegroups.com> on behalf of paul.l...@gmail.com <paul.l...@gmail.com>
Sent: Saturday, August 27, 2022 11:48:36 AM
To: astrometry <astro...@googlegroups.com>
Subject: [Astrometry] Re: I'm trying to export wcs data... but struggling
 
--
You received this message because you are subscribed to a topic in the Google Groups "astrometry" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/astrometry/EFaMlkaYSO8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/3fc9d7de-5b8f-49e9-847c-24704c883e83n%40googlegroups.com.

Dustin Lang

unread,
Aug 27, 2022, 9:16:36 AMAug 27
to paul.l...@gmail.com, astrometry
Also, the wcs.fits file is in "fits" format, but it's a header-only file, so it is text, with contents almost exactly as you have written.  FITS doesn't have "cr"/"lf" line endings, so it might look like one long line of text in your text editor, but if you make it wrap at 80 characters, it'll look right.


--
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.

rory griffin

unread,
Aug 27, 2022, 10:12:44 AMAug 27
to Dustin Lang, paul.l...@gmail.com, astrometry
oh ok,  so i did try opening with notepad and as you say a lot of garbbled text.So i guess i just need to isolate the bit at the beginning then.

thanking you kindly
Rory

Sent from my Phone. Expect typos and very short sentences😜

From: astro...@googlegroups.com <astro...@googlegroups.com> on behalf of Dustin Lang <dstn...@gmail.com>
Sent: Saturday, August 27, 2022 2:16:23 PM
To: paul.l...@gmail.com <paul.l...@gmail.com>
Cc: astrometry <astro...@googlegroups.com>
Subject: Re: [Astrometry] Re: I'm trying to export wcs data... but struggling
 
You received this message because you are subscribed to a topic in the Google Groups "astrometry" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/astrometry/EFaMlkaYSO8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/CA%2BFzHBDCB%2BmJZnxumAch40LOirA2YkxAVJuHj1JpD-pi7pi-wA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages