[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Subsection of Mark IV image with WCS keywords




Parsing trick:  Just give everything between the colons
to "atoi()"  Pass ":" to strtok() to find what's between
the colons.  This will read just about anything including
real weird strings like "1: 000034 : 56"
and take all of about three lines of code.
sscanf() gives better error diagnostic then atoi() so it
may be better.



> -----Original Message-----
> From: Stupendous Man [mailto:richmond@a188-l009.rit.edu]
> Sent: Sunday, April 15, 2001 10:21 AM
> To: tass@listserv.wwa.com
> Cc: tdroege@veriomail.com
> Subject: Subsection of Mark IV image with WCS keywords
> 
> 
> 
>   Tom has sent me a subsection of a recent image.
> The image has the full FITS header attached, so you 
> can try out your favorite image display and analysis
> routines on it.  To see and download a copy, go to 
> the "Pretty Pictures" section of the TASS home page
> 
>       http://a188-l009.rit.edu/tass/pretty.html
> 
> and scroll down to the bottom.
> 
>   I have one request for the header: please write all RA and 
> Dec (and time) values with zeroes instead of spaces for
> values less than ten.  The header with this pretty picture
> has
> 
>       RA      = '11: 3:5.01'
> 
> but this should be written
> 
>       RA      = '11:03:05.01'
> 
> It's easier to parse if the hours have 2 digits, the minutes
> have 2 digits, and the seconds have 2 digits to the left of the
> decimal point.
> 
>                                    Michael Richmond
> 
> 
>