Use precomputed PSR file for point sources if provided #288
Labels
enhancement
New feature or request
refactoring
Code refactoring and API changes.
response
threeml_plugin
By Point Source Response (PSR) we refer to the expected excess on the data space (Em, CDS) for a source located at a given point in the sky. We keep the photon energy "Ei" to compute the excess for various spectra.
The PSR can be computed on the fly given a FullDetectorResponse. When we do an analysis in Galactic coordinates, we need to integrate over the various SC orientations, which is slow. For a point source this is still manageable, and it is indeed computed on the fly, but for extended or all-sky sources we had to pre-computed for a given time range (e.g. the 3 months of DC2) and for multiple directions, and provide it to the user. This is passed to COSIlike as:
cosipy/cosipy/threeml/COSILike.py
Lines 62 to 63 in aea580b
If provided, it is used for extended sources in COSILike, but for point sources, we are still creating it on the fly:
cosipy/cosipy/threeml/COSILike.py
Lines 199 to 201 in aea580b
While not prohibitively slow, it would be better to use the pre-computed PSR for point sources if the user provides it.
See also PR #284, and issues #129 and #267.
When this issue is solved, we can remove this comment in the code:
cosipy/cosipy/threeml/COSILike.py
Lines 117 to 120 in aea580b
The text was updated successfully, but these errors were encountered: