New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot identify .fits file #6972
Comments
It should be working as you understand it, yes. Here's a test FITS image that we have - https://github.com/python-pillow/Pillow/blob/main/Tests/images/hopper.fits. If you download it, are you able to open it with Pillow?
from PIL import __version__
print(__version__) to check? |
The hopper.fits works properly on my end. Here's the example file https://github.com/rychalm/example.fits/blob/main/example.fits Looks like the header is somewhat different between the files. Maybe there's some issue there? Using the code provided gives me version 9.3.0 Edit to add: The example file was generated from original raw data, using astropy. That original file does not work either (none of my fits files work with pillow). Cannot really upload it as it is multiple gigabytes. |
Thanks. I apparently didn't consider that there might be comments in the header in my previous PR. I've created PR #6973 to resolve this. |
What did you do?
Tried using pillow for opening/handling a .fits file for training a machine learning model. According to the documentation opening/reading fits files should be enabled? Or am I misunderstanding how a fits file should be opened?
From Issue 4054/ PR 6056
What did you expect to happen?
Not recieving a "cannot identify error" while using Image.open. Expected the function to work as with other supported file formats. The .fits files in question are not corrupted, and can be opened as normal with other software.
What happened?
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: