[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possibly wrong message is reported when a FITS image has only one HD
From: |
Mohammad Akhlaghi |
Subject: |
Re: Possibly wrong message is reported when a FITS image has only one HDU. |
Date: |
Wed, 13 May 2020 02:57:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
Thanks a lot for bringing this to our attention.
I just defined bug #58363 [1], so we don't forget to precisely cite the
part of the standard that encourages/recommends this. I cited a few
parts of the FITS 4.0 standard about having metadata about the whole
file in the primary HDU, but I'll have to find the exact part later ;-).
Generally, the point of the error message is not to say that the file is
faulty. It just means to say something like this: "your data is on the
primary HDU, so please run your command again with '--hdu=0', or '-h0',
by default Gnuastro programs have '--hdu=1' or '-h1'.".
I just updated the description so it hopefully conveys this meaning and
is less confusing:
http://git.savannah.gnu.org/cgit/gnuastro.git/commit/?id=61e44ed139
If you like you can get the latest Gnuastro version (with this commit
implemented, currently version 0.11.60, or 60 commits after version
0.11) from this link:
https://akhlaghi.org/gnuastro-latest.tar.lz
(I will shortly release version 0.12)
Thanks again for raising all these great points :-).
Cheers,
Mohammad
[1] https://savannah.gnu.org/bugs/?58363
On 5/12/20 9:26 PM, rmorales wrote:
Summary:
Possibly wrong message is reported when a FITS image has only one HDU.
gnuastro version:
0.11
test image set:
https://cloud.iaa.csic.es/public.php?service=files&t=9344cdb85c640c7dd74446d8c266591d
command:
aststatistics 019_00.fits
result :
‘019_00.fits’ has only one extension/HDU but you have asked for the
second HDU (hdu number 1 in CFITSIO) ....
…
Gnuastro leaves the first HDU blank (with no data) and writes the
outputs in the second HDU.
...
This is the recommended way in the FITS standard.
...
question:
Maybe I’m wrong, but I did not find any recommendation in the last FITS
standard to organize the FITS file in that way.
FITS standard: Version 4.0 (13 August 2018)
https://fits.gsfc.nasa.gov/standard40/fits_standard40aa-le.pdf
Section 3. FITS file organization
Using fitsverify also does not report any error or warning on the same
file.