-
Notifications
You must be signed in to change notification settings - Fork 50
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
pyfits backend fails to read in a SWIFT RMF #357
Comments
It would be good if at some point we could align the backends so that they only differ in the way they invoke the different libraries to get data and metadata from the files. At least as much as possible. In other terms, the actual backend should be the implementation of the abstraction that extracts information (e.g. get the value for such column from such HDU) rather than the full logic. Admittedly that's much broader than the scope of the bug itself. |
So, the pyfits_backend code explicitly wants a FITS variable-length array for the MATRIX column: line 746 is
where However, the MATRIX column does not have to be a variable-length array, as discussed in the OGIP standard: Unsurprisingly, the SWIFT RMF just has a simple 2D matrix rather than taking advantage of the space-saving horror that is the variable-length-array approach:
The crates_backend delegates the RMF reading to code in |
@olaurino - while I agree with you that a lot of consolidation of logic would be good - indeed, just looking at the RMF reading code they create subtly-different error messages when files can't be interpreted as an RMF file - it's also shows how hard it can be. The pycrates code is simpler here since it can rely on the logic and code in |
The RMF reading is known to be broken with the AstroPy backend (issue sherpa#357).
I just found this issue. I'm having the same problem with simulations for both Athena X-IFU and eXTP SFA. They're a long way off, but it'd be useful to be able to work with the simulations in sherpa! |
@dhuppenkothen do you have a response that you can share that shows this problem, or see if PR #358 works for you? |
PR #358 indeed works for me! Thanks for that! It'd be really useful to get that into master with the next release. |
Thanks for checking. We're a bit resource constrained at the moment, so development of Sherpa is going slower than we'd like. |
The RMF reading is known to be broken with the AstroPy backend (issue sherpa#357).
From #354 (comment)
If you use the pyfits/astropy IO backend, you can't load in the SWIFT RMF swxpc0to12s6_20130101v014.rmf - one location for this file is http://darts.jaxa.jp/pub/legacy.gsfc.nasa.gov/caldb/data/swift/xrt/cpf/rmf/swxpc0s6_20130101v014.rmf
With pycrates (in CIAO 4.9) I can load it in:
but with astropy 1.3.2 installed
I haven't looked to see if this is due to a change in the backend code since this was written or, more likely, if it's just a bug in our code.
The text was updated successfully, but these errors were encountered: