-
Notifications
You must be signed in to change notification settings - Fork 49
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
Properly handle Swift RMF when using Astropy backend (fix #357) #358
Commits on Jul 6, 2017
-
Add tests of reading in Swift PHA, ARF, and RMF files.
The RMF reading is known to be broken with the AstroPy backend (issue sherpa#357).
Configuration menu - View commit details
-
Copy full SHA for 53b33ae - Browse repository at this point
Copy the full SHA 53b33aeView commit details -
Improve the tests for invalid file input
Adds tests for invalid reads of ARF and RMF, and ensures that the expected error class is thrown when using crates of pyfits backends.
Configuration menu - View commit details
-
Copy full SHA for 7512467 - Browse repository at this point
Copy the full SHA 7512467View commit details -
Fix reading of non-variable-length-array FITS matrix
This just tests that the data can be read in as expected. It does not check it can be used in Sherpa. These responses have an energy grid starting at 0 keV which causes Sherpa problems (but that is technically outside the bug that is fixed in this PR).
Configuration menu - View commit details
-
Copy full SHA for cfad850 - Browse repository at this point
Copy the full SHA cfad850View commit details -
Add a test ensuring Swift data can be used in the UI layer
The Swift data and responses are read in, and the statistic calculated (for all data and a subset of data) for a chi-square and Poisson-based variant. The results are compared to values caluclated using XSPEC 12.9.1b. The ARF and RMF have to be modified before being used, to replace the energy-bin edge equal to 0. Asserts are used to check that the data really contains the problem value, in case the I/O layer is ever changed to "fudge" problem data like this (XSPEC does it when the RMF is read in, with the message ***Warning: Detected response matrix energy bin value = 0 (or neg). XSPEC will instead use small finite value (response file will not be altered). The 0-value bin causes a division-by-zero warning (if it is not fixed). This warning is checked for, but at present there doesn't seem to be an obvious way to tell the pytext fixture in sherpa/conftest.py, namely capture_all_warnings, that this warning should only be ignored for this test. I have tried (in other PRs) to use the recwarn fixture to remove the warning from the system, but it did not seem reliable (e.g. would work if a single test file was run, but not when all tests were run).
Configuration menu - View commit details
-
Copy full SHA for 4538e8a - Browse repository at this point
Copy the full SHA 4538e8aView commit details -
Change a comment; no functional change.
The only reason for this change is to try and get Travis-CI to run the tests.
Configuration menu - View commit details
-
Copy full SHA for 2d10b85 - Browse repository at this point
Copy the full SHA 2d10b85View commit details -
Switch from using XSPEC power law to Sherpa for a test
Surprisingly enough this switch changed the stat value (from NaN to a finite value). This value is only used as a regression test, to ensure that we note when the behavior changes, rather than a validation that the code is doing the right thing (which is later on in this particular test).
Configuration menu - View commit details
-
Copy full SHA for dc99785 - Browse repository at this point
Copy the full SHA dc99785View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9efe73 - Browse repository at this point
Copy the full SHA b9efe73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f165d7 - Browse repository at this point
Copy the full SHA 8f165d7View commit details -
Fix failure in test with Crates backend.
This replaces '==' by '='. It also adds some explicit checks for the backend not being available, which should not happen but let's be carefull out there.
Configuration menu - View commit details
-
Copy full SHA for 6c8b45e - Browse repository at this point
Copy the full SHA 6c8b45eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b596baf - Browse repository at this point
Copy the full SHA b596bafView commit details