clip_gethcards.sh
Last updated: Mar14,2020

Extract full header cards that match keywords listed in an input file. The file of extracted cards is always named: clip_gethcards.out.

 

Usage: clip_gethcards.sh a.fits bad.cards 
arg1 - input FITS image name 
arg2 - file with keywords of cards to be extracted 
Additional options: 
     -v = print verbose comments 
 --help = view a help document 

EXAMPLE: 
% cat kw.list
CTYPE1 
CTYPE2 
CRPIX1 
CRPIX2 
CRVAL1 
CRVAL2 
CROTA2 
CDELT1 
CDELT2 
RMSRA  
RMSDEC 
NUMWCS 

% clip_gethcards.sh iset_2_stack.fits kw.list
100  (percentage of keywords located)

% cat clip_gethcards.out
CTYPE1  = 'RA---TAN'           /  Gnomonic Projection                           
CTYPE2  = 'DEC--TAN'           /  Gnomonic Projection                           
CRPIX1  =              387.000 / Axis 1 Reference                               
CRPIX2  =              385.000 / Axis 2 Reference                               
CRVAL1  =        302.695892334 / Ra  at Frame, J2000 (deg)                      
CRVAL2  =         40.674411774 / Dec at Frame, J2000 (deg)                      
CROTA2  =     355.405792236328 / Image Twist +AXIS2 W of N, (deg)               
CDELT1  =      0.0000751317639 / Axis 1 Pixel Size (degs)                       
CDELT2  =      0.0000751317639 / Axis 2 Pixel Size (degs)                       
RMSRA   =               0.1940 / RA_rms in arcsec                               
RMSDEC  =               0.2880 / DEC_rms in arcsec                              
NUMWCS  =                   39 / Number of points in WCS fit              


The percentage of keywords located in the input image header is written to standard out at the end of the routine. This routine was developed for use in the isetwcs routine to install the WCS header section of a well calibrtaed image into the headers of other images. However, this routine is generally quite useful for many applications.




Back to SCO CODES page