-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
What did you do?
Tried using pillow for opening/handling a .fits file.
The header in my fits file has two parts and the its structure is like this:
BITPIX = 16 / number of bits per data pixel
NAXIS = 0 / number of data axes
EXTEND = T / FITS dataset may contain extensions
COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
END
XTENSION= 'BINTABLE' / binary table extension
BITPIX = 8 / 8-bit bytes
NAXIS = 2 / 2-dimensional binary table
...
END
The fits file that I use comes from satellite observation data. Here's an example fits file that comes from the same satellite with the same header structure.
I'm not sure whether this kind of header agrees the fits format standard, so I checked the fit format document. In section 3.3.1, it says
The last header block must contain the END keyword, which marks the logical end of the header.
It means that the fits file I use agrees with the fits file standard.
I have just checked PR #5405 , it seems that when reading the fits file from disk, the code break at the first END.
What did you expect to happen?
Not receiving a "ValueError: No image datar" while using Image.open. Expected to load the fits image data.
What actually happened?
The Image.open code returns: ValueError: No image data
What are your OS, Python and Pillow versions?
- OS: Linux
- Python: 3.9
- Pillow: 10.1.0