forked from sherpa/sherpa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix RMF handling for non-variable-length RMF files (AstroPy)
PR sherpa#358 added AstroPy support for RMF files where the data was not encoded using FITS variable-length arrays for the matrix. This means that the data can not just be concatenated together. Instead each row in the matrix (which, in this case, is a regular nchannels by nbins array) has to be subset (maybe multiple times). The commit I added to do this - cfad850 worked in the Swift case, where the F_CHAN/N_CHAN values were set up to effectively remove the "space saving" mechanism they provide (that is, all elements of each row in the MATRIX column are used). It does not work for cases where F_CHAN/N_CHAN are not set to 0/nbins for each row. The code was embarassingly-confused over what it was meant to be doing, and only worked for the Swift case "by luck". This commit should fix this.
- Loading branch information
Showing
2 changed files
with
20 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters