|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
[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 | |
|
|
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 |