FITS Header comment line

35 views
Skip to first unread message

Rob Morgan

unread,
Sep 17, 2022, 7:21:21 PM9/17/22
to astrometry
Where does this fits header line come from?   “--End of Astrometry.net WCS—“ 

I'm using an older dll "cfitsio"  in my program and it seems to stop reading any headers after this line.  My guess is since the line contains the word "End" the library thinks it's finished and stops reading the headers.  Anyway just want to know if there is a simply way to not have this line added to the headers?

Thanks
--Rob

Dustin Lang

unread,
Sep 18, 2022, 8:46:51 AM9/18/22
to Rob Morgan, astrometry
It comes from here,

Also note that the END card is added a few lines later.

I'd be pretty surprised if CFITSIO incorrectly stopped reading the header at that point.  A FITS header ends when a header line *starts* with the string "END" (upper case).  The 'listhead" program uses CFITSIO and it can understand those headers fine.

cheers,
dustin



--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/72021eaa-985f-41b6-aa1a-ad6d79c666d2n%40googlegroups.com.

Rob Morgan

unread,
Sep 22, 2022, 1:15:21 PM9/22/22
to astrometry
Thank for the info....   I did a bit more digging and found that if I just save the file under PixInsight I can then read the KeyName RA using CFITSIO otherwise it doesn't seem to be part of the header.  Attached is a test file where CFITSIO does not see RA.   I guess PixInsight is reorganizing and adding to the header, but I'm no expert at fits.  I guess WSC does write out RA or Dec KeyNames. 
Boo Uma .fits

Dustin Lang

unread,
Sep 22, 2022, 1:24:31 PM9/22/22
to Rob Morgan, astrometry
Right, the WCS header doesn't have "RA" or "DEC" header keywords.  It does have CRVAL1 and CRVAL2, which are RA and DEC at the reference pixel (which is given by x = CRPIX1, y = CRPIX2).  If you use solve-field --crpix-center, then the reference pixel is set to be the center pixel, so then CRVAL1 and CRVAL2 are RA,Dec of the field center.

cheers,
dustin


Reply all
Reply to author
Forward
0 new messages