gwsnrcalc is a package designed for fast signal-to-noise ratio (SNR) calculations for single gravitational wave sources using a matched filtering SNR approach. It was originally designed to support BOWIE for Evaluating Black Hole Detectability with LISA (arXiv:1807.02511). It provides a fast SNR calculator, frequency-domain amplitude waveforms for binary black holes, and a SNR grid generator for binary black holes.
The main snr function is gwsnrcalc.gw_snr_calculator.snr. It has the capability to perform calculations in parallel across processors for faster calculation.
The waveform generator (gwsnrcalc.utils.waveforms) creates either circular or eccentric waveforms.
Circular waveforms are created with PhenomD amplitude waveforms for binary black hole inspiral, merger, and ringdown. PhenomD is from Husa et al 2016 (arXiv:1508.07250) and Khan et al 2016 (arXiv:1508.07253). The current waveforms returned are in units of characteristic strain.
Eccentric waveforms are generated according to Peters evolution only for the inspiral phase.
The snr grid generator: gwsnrcalc.generate_contour_data uses gwsnrcalc.gw_snr_calculator.snr to create SNR grids for contour plots (like those used in BOWIE).
Available via pip and on github: https://github.com/mikekatz04/BOWIE/
Getting Started
These instructions will get you a copy of the project up and running on your local machine for usage and testing purposes.
Prerequisites
It is best to run out of conda environment. It will handle the dependencies better. If you have issues with certain modules, try to update them.
Software installation/usage only requires a few specific libraries in python. All libraries are included with Anaconda. If you do not run python in an anaconda environment, you will need the following libraries and modules to run with all capabilities: Numpy, Scipy, collections, sys, json, multiprocessing, datetime, time, astropy, and h5py. All can be installed with pip. For example, within your python environment of choice:
pip install astropy
In order to properly create waveforms with ctypes, you will need complex, gsl, and math c libraries. For installing gsl, refer to https://www.gnu.org/software/gsl/ or install it through anaconda.
Installation
- Begin with updating conda:
conda update conda
- Create a conda environment (change the name as desired. Default: gwsnr_env):
conda create -n gwsnr_env numpy scipy astropy h5py gsl matplotlib jupyter ipython python=3.7
Installation is done two ways:
using pip
pip install gwsnrcalc
This will download the all necessary packages to your current environment. It will not download the notebooks for testing and example usage.
Clone the git repo on the command line, or downloading it from github. This is for all the modules, example jupyter notebooks, and extra files. This method will include BOWIE if pip install is used on the outer directory. To just download specific files that do not come with pip (e.g. jupyter notebook with examples), just download the files from the github.
navigate to the directory of your choice.
clone the git repo on the command line.
git clone https://github.com/mikekatz04/BOWIE.git
pip install the local code to add the modules to your environment and compile the c codes.
pip install ./BOWIE/snr_calculator_folder/
Testing and Running an Example
To test the codes, you run the guide notebook.
jupyter notebook pyphenomd_guide.ipynb
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
Current version is 1.1.0.
We use SemVer for versioning.
License
This project is licensed under the GNU License - see the LICENSE.md file for details.
Acknowledgments
Thanks to Michael Puerrer, Sebastian Khan, Frank Ohme, Ofek Birnholtz, Lionel London for authorship of the original c code for PhenomD within LALsuite.
Metadata
Release files for gwsnrcalc 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gwsnrcalc-1.1.0.tar.gz | 7.4 MB | Without provenance | Details for gwsnrcalc-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gwsnrcalc-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.7+ x86-64 | Details for gwsnrcalc-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl |
Total release size: 15.0 MB
Release files / gwsnrcalc-1.1.0.tar.gz
| Download URL | gwsnrcalc-1.1.0.tar.gz |
|---|---|
| Size | 7.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38214a0651893ca167e04342fc25d1b98f0f0b6345907d3a672fba6c595ad96a
|
|
BLAKE2b-256 checksum How to use checksums |
af5cc67051c744f6ef51de367b284634ecf931a5399b17879f7ab4f9f425715f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Release files / gwsnrcalc-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl
| Download URL | gwsnrcalc-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl |
|---|---|
| Size | 7.6 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
8228c41963df0e8325a5f1fde8aa084a02186f107bcc494f850e6e55f162a992
|
|
BLAKE2b-256 checksum How to use checksums |
f34c9de6350fb30ffedcc243cea71877c8edd533da86fb8d8fc206e0070132a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Security for gwsnrcalc 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.