A Space & astronomy forum. SpaceBanter.com

Go Back   Home » SpaceBanter.com forum » Astronomy and Astrophysics » FITS
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

[fitsbits] Fits recognition



 
 
Thread Tools Display Modes
  #1  
Old August 16th 07, 05:06 PM posted to sci.astro.fits
Rob Seaman
external usenet poster
 
Posts: 49
Default [fitsbits] Fits recognition

On Aug 16, 2007, at 8:30 AM, Steve Allen wrote:

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.


I might add that several million NOAO "save the bits" files have been
classified very handily using this magic number scheme ("SIMPLE" is
just hex 53 49 4d 50 4c 45). Identifying non-FITS is even more
important since we then run a converter. We look for that silly
little "T", too:

0 string SIMPLE = T THIS_IS_FITS

This is certainly more reliable than just relying on a file
extension, especially when paired with a variety of reality checks
downstream during handling that amount to a validation against
minimal FITS compliance. A lot of instruments would have a hard time
meeting a formal FITS compliance requirement.

- Rob


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[fitsbits] Fits recognition eggpap FITS 1 August 16th 07 05:25 PM
[fitsbits] Fits recognition Steve Allen FITS 0 August 16th 07 04:30 PM
FITS long integer support (was [fitsbits] ADASS FITS BoF onSunday) Eric Greisen FITS 10 October 26th 04 08:14 AM
FITS long integer support (was [fitsbits] ADASS FITS BoFon Sunday) William Pence FITS 6 October 22nd 04 08:23 PM
FITS long integer support (was [fitsbits] ADASS FITS BoF onSunday) Thomas McGlynn FITS 0 October 20th 04 03:18 PM


All times are GMT +1. The time now is 08:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 SpaceBanter.com.
The comments are property of their posters.