Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# About

**gw_eccentricity** provides methods to measure eccentricity and mean anomaly
from gravitational waveforms.
from gravitational waveforms of binaries on generic bound orbits.

These methods are described in the following paper: <br/>
- [1] Md Arif Shaikh, Vijay Varma, Harald Pfeiffer, Antoni Ramos-Buades and
Expand Down Expand Up @@ -44,12 +44,22 @@ the main branch at the top of this page.
```shell
pip install gw_eccentricity
```
or
```shell
pip install "gw_eccentricity[postprocess]"
```
to additionally install the functionality for postprocessing posterior samples from
parameter estimation pipelines.

## Conda
**gw_eccentricity** can be installed using `conda` also:
```shell
conda install -c conda-forge gw_eccentricity
```
or
```shell
conda install -c conda-forge gw_eccentricity gw_eccentricity-postprocess
```

## From source

Expand All @@ -58,6 +68,10 @@ git clone git@github.com:vijayvarma392/gw_eccentricity.git
cd gw_eccentricity
pip install .
```
or
```
pip install .["postprocess"]
```

If you do not have root permissions, replace the last step with
`pip install --user .`
Expand All @@ -77,7 +91,13 @@ See example notebooks:
* [gw_eccentricity demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/gw_eccentricity_demo.ipynb) for how to use the package, along with diagnostic plots.
* [Load waveforms demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/load_waveform_demo.ipynb) for loading waveform data into a dictionary format suitable for gw_eccentricity, including for LAL, SXS, and LVCNR waveforms.
- [TEOBResumS-Dali demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/egw_from_TEOBResumS-DALI_demo.ipynb) for the same for `TEOBResumS-Dali`.
- [SEOBNRv5EHM demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/egw_from_SEOBNRv5EHM_demo.ipynb) for the same for `SEOBNRv5EHM`.
- [SEOBNRv5EHM
demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/egw_from_SEOBNRv5EHM_demo.ipynb)
for the same for `SEOBNRv5EHM`.
## Postprocessing posterior samples
See the example notebooks and scripts
[here](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/postprocessing)
for postprocessing posterior from parameter estimation pipelines.

# Making contributions
See this
Expand Down
30 changes: 30 additions & 0 deletions examples/postprocessing/postprocess.condor.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# HTCondor submit file for running postprocess.sh
#
# Usage:
# cd gw_eccentricity/postprocess/examples
# chmod +x postprocess.sh
# condor_submit postprocess.condor.sub
#
# Adjust NPROCS/request_cpus as needed. postprocess.sh will run with MPI
# only when NPROCS > 1.

universe = vanilla
executable = postprocess.sh

# Set process count consumed by postprocess.sh (NPROCS env var).
environment = "NPROCS=4"

# Resource requests (edit for your cluster).
request_cpus = 4
request_memory = 8 GB
request_disk = 4 GB

# Logs
log = postprocess.$(Cluster).log
output = postprocess.$(Cluster).$(Process).out
error = postprocess.$(Cluster).$(Process).err

# Keep files on shared filesystem; set to YES and configure transfer_* if needed.
should_transfer_files = NO

queue 1
32 changes: 32 additions & 0 deletions examples/postprocessing/postprocess.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail

# Initialize conda
source ~/anaconda3/etc/profile.d/conda.sh

# Activate your env
conda activate gw_eccentricity_postprocess

NPROCS=${NPROCS:-1}

CMD=(
gw-eccentricity-postprocess
--posterior-path "/Users/arif/Desktop/TEOB_chi0_9_ecc0_3_samples.hdf5"
--parameter-columns "mass_1,mass_2,spin_1z,spin_2z,luminosity_distance,minimum_frequency,eccentricity,mean_per_ano"
--output-dir "/Users/arif/Desktop/"
--output-format csv
--save-every none
--samples 0:1000
--fref 10
--tref none
--method Amplitude
--data-dict-generator "/Users/arif/gw_eccentricity/examples/postprocessing/teobresums_dali.py:teob_data_dict_generator"
--data-dict-generator-extra-kwargs '{"backwards":"yes","ode_tmax":1}'
--gw-eccentricity-kwargs '{"extra_kwargs":{"omega_gw_extrema_interpolation_method":"spline"}}'
)

if [ "$NPROCS" -gt 1 ]; then
mpirun -n "$NPROCS" "${CMD[@]}"
else
"${CMD[@]}"
fi
Loading
Loading