-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
read_spice_l2_fits
fails on files with additional distortion information
#208
Comments
#215 was merged in that skips the problematic window but a formal treatment would be more useful. If future readers check the last part of the PR's comment. |
@nabobalis should I open another issue to keep track of this, so that this issue can be closed? |
Sure! I was being lazy and repurposing this issue but a new one would be cleaner. |
This is now #216, |
Describe the bug
read_spice_l2_fits()
fails on SPICE files with additional distortion information as it considers the "WCSDVARR" ImageHDUs that are present in the FITS file in this case as windows.To Reproduce
Trace:
What happened?
There are now additional "WCSDVARR" HDUs to represent additional distortion information (see the draft WCS IV paper). These are ImageHDUs, so they are not excluded by the test that has been implemented in v0.4.2 following #202, and so they are wrongly considered as spectral windows.
Expected behavior
read_spice_l2_fits()
should read such files with no error.A possible solution is to exclude HDUs with name "WCSDVARR" from the list of windows. Such HDUs are not windows, so they have no XPOSURE header, hence the error.
(Of course, windows should not be named "WCSDVARR"...)
Screenshots
No response
System Details
==============================
sunpy Installation Information
General
#######
OS: Ubuntu (21.10, Linux 5.13.0-52-generic)
Arch: 64bit, (x86_64)
sunpy: 4.0.0
Installation path: /home/eric/.local/lib/python3.9/site-packages/sunpy-4.0.0.dist-info
Required Dependencies
#####################
astropy: 5.1
numpy: 1.22.4
packaging: 21.3
parfive: 1.5.1
Optional Dependencies
#####################
asdf: 2.8.1
asdf-astropy: 0.2.0
beautifulsoup4: 4.9.3
cdflib: 0.3.20
dask: 2021.1.0+dfsg
drms: 0.6.2
glymur: 0.9.9
h5netcdf: 0.11.0
h5py: 3.6.0
matplotlib: 3.5.0
mpl-animators: 1.0.0
pandas: 1.4.2
python-dateutil: 2.8.1
reproject: 0.8
scikit-image: 0.18.1
scipy: 1.8.0
sqlalchemy: 1.4.34
tqdm: 4.64.0
zeep: 4.1.0
Installation method
pip
The text was updated successfully, but these errors were encountered: