Closed ruizca closed 6 months ago
Thank you, Angel. This should be fixed now and there is a new release of BXA (4.1.4). Please test it and let me know if it works.
I've tested the new BXA version and everything seems to work fine.
I was wondering if it should be mentioned somewhere that if you update, and run again an old fit, things could change (the new auto_background
code could find significant lines in the background spectrum that were previously rejected). It is possible to recover the old results if you run the auto_background
function with max_lines=0
.
Good point. I added it to the Release notes https://johannesbuchner.github.io/BXA/history.html
There seems to be a problem in the identity response matrices created for fitting the PCA background models with Sherpa. While they work fine with the PCA model itself, when applied to a gaussian model they return null values for all channels. This causes that any additional gaussian components included into the baseline PCA model are always rejected.
This PR fixes this issue, by using the create_delta_rmf and create_arf functions included in Sherpa. I have tested the new code with XMM, Chandra, Swift, Suzaku, NuSTAR and eROSITA data, and everything seems to work ok. The new script test_auto_background.py runs a battery of test: first, they check that the PCA model parameters obtained without including additional gaussian lines are the same as in the original code (the original values are stored in json files in the corresponding folders); second, a high count excess is injected into the background spectrum at a given channel and check that the new code is able to model that excess with a gaussian line.