Add a module and class for handling sky grids for pycbc_multi_inspiral
#4741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Calculating the coherent network SNR (
pycbc_multi_inspiral
) requires a grid of points in the sky. This adds a module and class to manage such grids in a more centralized way.Standard information about the request
This is mostly refactoring existing code into a new module. This change affects PyGRB but does not change any output.
Motivation
pycbc_multi_inspiral
is a very long script at this point, andpycbc_make_sky_grid
might also become very long as we implement various algorithms for placing sky grids available in the literature. Centralizing the management of sky grids, including reading/writing them from/to files, seems beneficial.Contents
I added a pycbc.tmpltbank.sky_grid module which currently contains a
SkyGrid
class, with methods to read and write sky grids from HDF5 files, calculate the antenna patterns and time delays over the grid for a network of detectors, and handle CLI arguments related to sky grids.Links to any issues or associated PRs
None.
Testing performed
I wrote a short script to plot the antenna patterns and time delays over a sky grids of random points for various detectors, and visually checked that those made sense:
Additional notes
None.