[fitsbits] Fits recognition
Steve Allen
sla at ucolick.org
Thu Aug 16 11:30:49 EDT 2007
On Thu 2007-08-16T17:22:29 +0200, eggpap hath writ:
> how to know programmatically if a fit/fits extension file is a true fit
> file?
The quickest test is the one Jeff Uphoff wrote for the /etc/magic
or /usr/share/magic file which is used by the unix "file" program.
# FITS format. Jeff Uphoff <juphoff at tarsier.cv.nrao.edu>
# FITS is the Flexible Image Transport System, the de facto standard for
# data and image transfer, storage, etc., for the astronomical community.
# (FITS floating point formats are big-endian.)
0 string SIMPLE\ \ = FITS image data
>109 string 8 \b, 8-bit, character or unsigned binary integer
>108 string 16 \b, 16-bit, two's complement binary integer
>107 string \ 32 \b, 32-bit, two's complement binary integer
>107 string -32 \b, 32-bit, floating point, single precision
>107 string -64 \b, 64-bit, floating point, double precision
This does not prove conformance with the FITS standard, but
it's a good start.
also see verifits and its kin
http://fits.gsfc.nasa.gov/software.html#VERIFITS
--
Steve Allen <sla at ucolick.org> WGS-84 (GPS)
UCO/Lick Observatory Natural Sciences II, Room 165 Lat +36.99855
University of California Voice: +1 831 459 3046 Lng -122.06015
Santa Cruz, CA 95064 http://www.ucolick.org/~sla/ Hgt +250 m
More information about the fitsbits
mailing list