-
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
Importing Bugs #13924 - SegFault with fake_pha #56
Comments
Might this be related to issue #55, in particular this comment from @DougBurke? |
The data files (tvcol_A.arf and tvcol_A.rmf) plus an example script are available at https://gist.github.com/DougBurke/04a41831a70e7a59d3e4 |
So, it appears that this is related to #62. The problem here is that the ARF grid is not contiguous, that is the Using the data from the gist at https://gist.github.com/DougBurke/04a41831a70e7a59d3e4 and the latest master branch (so using astropy for file I/O, but the same result is seen in CIAO 4.7 with crates as the I/O back end):
Are the energy bins for the ARF (the a) Are the low edge of each bin less than the high edge?
b) Are the low edges monotonically increasing?
c) Does the high edge of bin
How many are there like this?
So there's a lot. Where are they (the first few)?
Let's look at the first 10 pairs since this contains three problem bins:
Looking at the second and third pairs, we have
and you can see that there is a gap: the first bin ends at It appears that the RMF does not have these issues, as shown below (this time using the response-model created by Sherpa to access the lo/hi bins used for evaluating the model, since this is what the
The xlo/xhi grid is contiguous because the output of line 13 is True. If I now add in an ARF, we see gaps (the equivalent of line 13, which is line 20, is now False):
|
This suggests that there's two issues here
|
When run with the code and data files given in issue sherpa#56 - e.g. https://gist.github.com/DougBurke/04a41831a70e7a59d3e4 - then the model now fails with the following message ValueError: Grid cells overlap: cell 360 (16 to 16.04) and cell 361 (16.04 to 16.08)
So, if PR #63 is used - using @6f1884e - then we get a) with a 32-byte, FORTRAN-style XSpec model The following works (note: as this was an "occasional crash" previously, just running to the end doesn't necessarily mean it is fixed, but it is now only calling the model once with "gaps" being dealt with):
b) with a 64-byte, C++ style XSpec model If the
then the
This particular row in the ARF is
So you can see that there is an overlap: 15.96 - 16.0, 16.0 - 16.040xxx, 16.0399xxx - 16.07999 The output format used by the error message doesn't show the overlap, since it has rounded down to 2 decimal places, so you just see 16.04 repeated. So, as there is this overlap, why doesn't the Note that the columns are stored as 32-byte floats in the ARF:
|
Fixed by #101 |
SegFault with fake_pha on some systems was reported.
The original bug and the data are located here:
/data/lenin2/Bugs/Sherpa/Nustar/HD_15934
and the script 'test2.sph' fails on MAC.
This bug is specific to X-ray spectral analysis.
In CIAO version the screen output when running on the command line shows the following:
The text was updated successfully, but these errors were encountered: