Include commands run by reviewer authored by Amanda Farah's avatar Amanda Farah
......@@ -33,19 +33,8 @@ This review wiki covers the changes to the code based in order to incorporate po
* [X] code can be run with minimal adjustments by cloning the repo
- Review statement: The `README` is slightly outdated in the repo, but error messages are informative and getting a working command is straightforward - see "Quantitative Results" section below for working commands run and corresponding output.
## Additional checklist items for addition of spin inference
* [ ] inference reproduces the same results when spins are neglected (--spin-column is not passed) and when spins are identically zero for all samples
* [ ] inference produces strictly larger estimates for P(m2<Mmax) when spins are included (but known to be less than the break-up spin) compared to when spins are neglected
* [ ] scaling of Mmax(Mtov, Rtov, spin) was correctly implemented based on Eqn 18 of [Breu+Rezzolla 2016](https://academic.oup.com/mnras/article/459/1/646/2608837).
- Review statement: I have cross checked the function `br2016_mmax_scaling()` in `bin/mmax_model_selection/utils.py` with equation 18 in the above paper. There seems to be an error. Namely, the second term in the mmax expression should have a factor of the compactness squared, but it is currently to the 1st power.
* [X] unit conversion is done correctly within compactness calculation.
- Review statement: unit conversion was checked by hand and via the `astropy` `units` module.
* [X] estimate of maximum spin based on (Mtov, Rtov) is correctly implemented based on Eqn 17 of [Breu+Rezzolla 2016](https://academic.oup.com/mnras/article/459/1/646/2608837)
- Review statement: I have cross checked the function `br2016_max_spin()` in `bin/mmax_model_selection/utils.py` with equation 17 of the above paper. It appears correct.
* [ ] the (updated) code can be run with minimal changes by cloning the repo
# Quantitative Results
### Quantitative Results
using `master` at [1f035f47](https://git.ligo.org/reed.essick/mmax-model-selection/-/commit/1f035f47c04ddd4c7f69947b96ff0c759479b68d) I get:
```
$ python bin/mmax-model-selection -v etc\combined_PHM.csv etc/mmax_spec.csv --m1-column mass_1 --m2-column mass_2 --mmax-column Mmax --mass-column mass_2_source --d-column luminosity_distance --d-range 0 500 --q-range 0.02 0.25 --mc-range 6.0 7.0 --m-range 1.0 54.5 --population-parameter dmin 0.0 -P dmax 500
......@@ -84,6 +73,68 @@ marginalizing to compute posteriors and odds ratio
* [X] this version of the code reproduces the results for GW190814 (housed [here](https://git.ligo.org/reed.essick/mmax-model-selection/-/wikis/GW190814-Review)) reasonably well
- Review statement: The results obtained from 1f035f47c04ddd4c7f69947b96ff0c759479b68d are identical to those found in the review of the code used for GW190814. See "Comparison to Previous Results" below.
## Additional checklist items for addition of spin inference
* [ ] inference reproduces the same results when spins are neglected (--spin-column is not passed) and when spins are identically zero for all samples
* [ ] inference produces strictly larger estimates for P(m2<Mmax) when spins are included (but known to be less than the break-up spin) compared to when spins are neglected
* [X] scaling of Mmax(Mtov, Rtov, spin) was correctly implemented based on Eqn 18 of [Breu+Rezzolla 2016](https://academic.oup.com/mnras/article/459/1/646/2608837).
- Review statement: I have cross checked the function `br2016_mmax_scaling()` in `bin/mmax_model_selection/utils.py` with equation 18 in the above paper. There seems to be an error. Namely, the second term in the mmax expression should have a factor of the compactness squared, but it is currently to the 1st power.
- Updated review statement: This has now been corrected by Reed in commit 50fe99a74e8fa3ebf183505a59af13e053afac36 of MR !9.
* [X] unit conversion is done correctly within compactness calculation.
- Review statement: unit conversion was checked by hand and via the `astropy` `units` module.
* [X] estimate of maximum spin based on (Mtov, Rtov) is correctly implemented based on Eqn 17 of [Breu+Rezzolla 2016](https://academic.oup.com/mnras/article/459/1/646/2608837)
- Review statement: I have cross checked the function `br2016_max_spin()` in `bin/mmax_model_selection/utils.py` with equation 17 of the above paper. It appears correct.
* [X] the (updated) code can be run with minimal changes by cloning the repo
- Review statement: this is true and is documented below for the [NSBH repo](https://git.ligo.org/reed.essick/o3-nsbh-mmax-model-selection).
- Note that the person running needs to convert all .json and .dat files to csv files by following the steps outlined in the README.
- Commands run by reviewer and output are:
```
[amanda.farah@ldas-grid mmax_review]$ git clone https://git.ligo.org/reed.essick/mmax-[amanda.farah@ldas-grid mmax_review]$ model-selection
[amanda.farah@ldas-grid mmax_review]$ git fetch
[amanda.farah@ldas-grid mmax_review]$ git checkout spins
[amanda.farah@ldas-grid mmax_review]$ conda create -n mmax_review python=3.8
[amanda.farah@ldas-grid mmax_review]$ conda activate mmax_review
(mmax_review) [amanda.farah@ldas-grid mmax_review]$ conda install numpy
(mmax_review) [amanda.farah@ldas-grid mmax_review]$ python setup.py install
(mmax_review) [amanda.farah@ldas-grid mmax_review]$ git clone https://git.ligo.org/reed.essick/o3-nsbh-mmax-model-selection.git
(mmax_review) [amanda.farah@ldas-grid mmax_review]$ cd o3-nsbh-mmax-model-selection/
(mmax_review) [amanda.farah@ldas-grid o3-nsbh-mmax-model-selection]$ for DAT in etc/*dat
> do
> src/dat2csv $DAT
> done
loading DAT data from: etc/GW200105-C01_PHMcombined_highspin_pesummary.dat
saving CSV data to: etc/GW200105-C01_PHMcombined_highspin_pesummary.csv
loading DAT data from: etc/GW200105-C01_PHMcombined_lowspin_pesummary.dat
saving CSV data to: etc/GW200105-C01_PHMcombined_lowspin_pesummary.csv
loading DAT data from: etc/GW200115-C01_PHMcombined_highspin_pesummary.dat
saving CSV data to: etc/GW200115-C01_PHMcombined_highspin_pesummary.csv
loading DAT data from: etc/GW200115-C01_PHMcombined_lowspin_pesummary.dat
saving CSV data to: etc/GW200115-C01_PHMcombined_lowspin_pesummary.csv
(mmax_review) [amanda.farah@ldas-grid o3-nsbh-mmax-model-selection]$ for JSON in etc/*json; do src/json2csv $JSON; done
loading JSON data from: etc/o3a-all_events-broken-powerlaw-hyperposterior.json
saving CSV data to: etc/o3a-all_events-broken-powerlaw-hyperposterior.csv
loading JSON data from: etc/o3a-all_events-powerlaw-hyperposterior.json
saving CSV data to: etc/o3a-all_events-powerlaw-hyperposterior.csv
loading JSON data from: etc/o3a-all_events-powerlaw+peak-hyperposterior.json
saving CSV data to: etc/o3a-all_events-powerlaw+peak-hyperposterior.csv
loading JSON data from: etc/o3a-no_GW190814-broken-powerlaw-hyperposterior.json
saving CSV data to: etc/o3a-no_GW190814-broken-powerlaw-hyperposterior.csv
loading JSON data from: etc/o3a-no_GW190814-powerlaw-hyperposterior.json
saving CSV data to: etc/o3a-no_GW190814-powerlaw-hyperposterior.csv
loading JSON data from: etc/o3a-no_GW190814-powerlaw+peak-hyperposterior.json
saving CSV data to: etc/o3a-no_GW190814-powerlaw+peak-hyperposterior.csv
(mmax_review) [amanda.farah@ldas-grid o3-nsbh-mmax-model-selection]$ cd src/
(mmax_review) [amanda.farah@ldas-grid src]$ ./schedule-analyze
GW200105-C01_PHMcombined_lowspin_pesummary LEC-mtov
GW200115-C01_PHMcombined_lowspin_pesummary LEC-mtov
GW200105-C01_PHMcombined_highspin_pesummary LEC-mtov-rtov
GW200105-C01_PHMcombined_highspin_pesummary FC-mmax
GW200115-C01_PHMcombined_highspin_pesummary LEC-mtov-rtov
GW200115-C01_PHMcombined_highspin_pesummary FC-mmax
```
---
# Motivation
......
......