Skip to content

Commit 2a3ee53

Browse files
Merge pull request #246 from vijayvarma392/posterior
add submodule for postprocessing
2 parents 53d7828 + 0c665f6 commit 2a3ee53

12 files changed

Lines changed: 2907 additions & 6 deletions

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# About
1717

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

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

4854
## Conda
4955
**gw_eccentricity** can be installed using `conda` also:
5056
```shell
5157
conda install -c conda-forge gw_eccentricity
5258
```
59+
or
60+
```shell
61+
conda install -c conda-forge gw_eccentricity gw_eccentricity-postprocess
62+
```
5363

5464
## From source
5565

@@ -58,6 +68,10 @@ git clone git@github.com:vijayvarma392/gw_eccentricity.git
5868
cd gw_eccentricity
5969
pip install .
6070
```
71+
or
72+
```
73+
pip install .["postprocess"]
74+
```
6175

6276
If you do not have root permissions, replace the last step with
6377
`pip install --user .`
@@ -77,7 +91,13 @@ See example notebooks:
7791
* [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.
7892
* [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.
7993
- [TEOBResumS-Dali demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/egw_from_TEOBResumS-DALI_demo.ipynb) for the same for `TEOBResumS-Dali`.
80-
- [SEOBNRv5EHM demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/egw_from_SEOBNRv5EHM_demo.ipynb) for the same for `SEOBNRv5EHM`.
94+
- [SEOBNRv5EHM
95+
demo](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/egw_from_SEOBNRv5EHM_demo.ipynb)
96+
for the same for `SEOBNRv5EHM`.
97+
## Postprocessing posterior samples
98+
See the example notebooks and scripts
99+
[here](https://github.com/vijayvarma392/gw_eccentricity/blob/main/examples/postprocessing)
100+
for postprocessing posterior from parameter estimation pipelines.
81101

82102
# Making contributions
83103
See this
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# HTCondor submit file for running postprocess.sh
2+
#
3+
# Usage:
4+
# cd gw_eccentricity/postprocess/examples
5+
# chmod +x postprocess.sh
6+
# condor_submit postprocess.condor.sub
7+
#
8+
# Adjust NPROCS/request_cpus as needed. postprocess.sh will run with MPI
9+
# only when NPROCS > 1.
10+
11+
universe = vanilla
12+
executable = postprocess.sh
13+
14+
# Set process count consumed by postprocess.sh (NPROCS env var).
15+
environment = "NPROCS=4"
16+
17+
# Resource requests (edit for your cluster).
18+
request_cpus = 4
19+
request_memory = 8 GB
20+
request_disk = 4 GB
21+
22+
# Logs
23+
log = postprocess.$(Cluster).log
24+
output = postprocess.$(Cluster).$(Process).out
25+
error = postprocess.$(Cluster).$(Process).err
26+
27+
# Keep files on shared filesystem; set to YES and configure transfer_* if needed.
28+
should_transfer_files = NO
29+
30+
queue 1
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Initialize conda
5+
source ~/anaconda3/etc/profile.d/conda.sh
6+
7+
# Activate your env
8+
conda activate gw_eccentricity_postprocess
9+
10+
NPROCS=${NPROCS:-1}
11+
12+
CMD=(
13+
gw-eccentricity-postprocess
14+
--posterior-path "/Users/arif/Desktop/TEOB_chi0_9_ecc0_3_samples.hdf5"
15+
--parameter-columns "mass_1,mass_2,spin_1z,spin_2z,luminosity_distance,minimum_frequency,eccentricity,mean_per_ano"
16+
--output-dir "/Users/arif/Desktop/"
17+
--output-format csv
18+
--save-every none
19+
--samples 0:1000
20+
--fref 10
21+
--tref none
22+
--method Amplitude
23+
--data-dict-generator "/Users/arif/gw_eccentricity/examples/postprocessing/teobresums_dali.py:teob_data_dict_generator"
24+
--data-dict-generator-extra-kwargs '{"backwards":"yes","ode_tmax":1}'
25+
--gw-eccentricity-kwargs '{"extra_kwargs":{"omega_gw_extrema_interpolation_method":"spline"}}'
26+
)
27+
28+
if [ "$NPROCS" -gt 1 ]; then
29+
mpirun -n "$NPROCS" "${CMD[@]}"
30+
else
31+
"${CMD[@]}"
32+
fi

0 commit comments

Comments
 (0)