wcs_ask

Answers whether a FITS images (the one input argument) has a valid WCS in the header. Really, this script is pretty simple. It runs the wcstools "xy2sky" routine on the image and determines if the first output string resembles an RA in sexigecimal format.


Usage: wcs_ask 20150916T071707.1_acm_sci.fits 
arg1 - name of FITS image

% % wcs_ask 20150916T071707.1_acm_sci.fits 
N

% % wcs_ask n3379_wcs.fits 
Y

I often use this in a script. I write the answer to some local file and then read the result to determine if I should assume the image has WCS or not. Dumb but effective!




Back to SCO CODES page