Skip to content
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

Use precomputed PSR file for point sources if provided #288

Open
israelmcmc opened this issue Feb 4, 2025 · 0 comments
Open

Use precomputed PSR file for point sources if provided #288

israelmcmc opened this issue Feb 4, 2025 · 0 comments
Labels
enhancement New feature or request refactoring Code refactoring and API changes. response threeml_plugin

Comments

@israelmcmc
Copy link
Collaborator

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:

precomputed_psr_file : str, optional
Full path to precomputed point source response in Galactic coordinates

If provided, it is used for extended sources in COSILike, but for point sources, we are still creating it on the fly:

elif self._coordsys == 'galactic':
scatt_map = self._get_scatt_map(coord)
self._psr[name] = self._dr.get_point_source_response(coord=coord, scatt_map=scatt_map)

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:

# Note: this still needs to be implemented in a
# consistent way for point srcs and extended srcs.
self.precomputed_psr_file = precomputed_psr_file
if self.precomputed_psr_file != None:

@israelmcmc israelmcmc added enhancement New feature or request refactoring Code refactoring and API changes. response threeml_plugin labels Feb 4, 2025
@israelmcmc israelmcmc added this to cosipy Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Code refactoring and API changes. response threeml_plugin
Projects
Status: No status
Development

No branches or pull requests

1 participant