-
Notifications
You must be signed in to change notification settings - Fork 6
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
specextract: Extracting regions with 0 counts #843
Comments
@hamogu I can certainly improve the message, but for your specific example case, where the extraction region may have zero counts, also define the |
See #844 for a suggestion for the error message. I saw that refcoord reference, but then it was Saturday morning and I decided to do something else. I might also make a local copy of the script without the check or just call "mkacisrmf" etc separately by hand. |
@DougBurke I think the update to the error messages are a perfectly reasonable solution to the issue. |
When I run specextract in a region that has zero counts, I get
ciao-contrib/ciao_contrib/_tools/specextract.py
Line 446 in eaba8cc
The error suggests that the region has to be specificed in sky pixel coordinates. That's not true - I can use any of the CIAO regions (e.g. RA/DEC) and I'll get the same extraction with the same number of counts (0) and thus the same error.
Should we downgrade this from an error to a warning? I get that in most cases it probably means that a user put in the wrong coordinates and for that a hard stop is good. However, there are some edge cases where it might be useful (and, you guessed it, I'm trying one of those, hence I'm hitting this limit) to continue running and get an ARF and RMF even if there are 0 counts: The ARF and RMF can be used in simulations with e.g. Sherpa to fake certain models and determine how likely it is that some model gives 0 counts. Of course, usually one would take a simpler approach, but particularly when looking at a source that dithers on and off the chip or that is very soft or very hard (so that an "average PSF" or exposure map created for a specific energy is not good enough) running spectral models with ARF/RMF should be more accurate.
However, I acknowledge that this is an unusual use of specexctract, so maybe it's better to serve the general population of users for more common use cases better and keep the hard error?
The text was updated successfully, but these errors were encountered: