|
|
# Mmax Model Selection
|
|
|
|
|
|
This review wiki covers the changes to the code based in order to incorporate population priors (as opposed to the default LALInference prior) as well as associated updates to the error estimation.
|
|
|
|
|
|
## Motivation
|
|
|
|
|
|
The calculation is still structured in the same basic way as before (compare [LIGO-P2000216](https://dcc.ligo.org/LIGO-P2000216) / [arXiv:2007.01372](https://arxiv.org/abs/2007.01372) to [LIGO-T1900552](https://dcc.ligo.org/LIGO-T1900552) and [LIGO-T2000097](https://dcc.ligo.org/T2000097)).
|
|
|
In particular, we implement a Monte-Carlo integral via two nested loops to estimate an upper limit on the posterior probability that an object is a NS by asserting perfect knowledge of the overall mass distribution and assuming that everything below Mmax is a NS. A more thorough discussion of the assumptions and limitations are available in [LIGO-P2000216](https://dcc.ligo.org/LIGO-P2000216) / [arXiv:2007.01372](https://arxiv.org/abs/2007.01372).
|
|
|
|
|
|
The considerations within [LIGO-P2000216](https://dcc.ligo.org/LIGO-P2000216) / [arXiv:2007.01372](https://arxiv.org/abs/2007.01372) forced us to modify the code in several ways (see below) to estimate the impact of different overall mass distributions along with updated error estimates from the Monte-Carlo integrals.
|
|
|
|
|
|
## Changes to Implementation
|
|
|
|
|
|
Here, we briefly review the changes in the code relative to what was reviewed as part of the [GW190814 effort](GW190814-Review). The code changed in two main ways
|
|
|
|
|
|
* incorporation of population priors to reweight default posterior samples
|
|
|
* changes to error estimation associated with the fact that the samples now carry prior weights
|
|
|
|
|
|
In particular, we can see changes to the code relative to what was used for the GW190814 detection paper in [this comparison](https://git.ligo.org/reed.essick/mmax-model-selection/-/compare/1b0411beb7288d88b16bdd5c281caa09f5ceb755...master).
|
|
|
|
|
|
### Library Structure
|
|
|
|
|
|
The library consists of a single executable (`mmax-model-selection`) which relies on a single module (`utils.py`). The only external dependencies are `numpy` and standard Python modules. The library can be installed with the standard syntax
|
|
|
|
|
|
```
|
|
|
>> python setup.py install --prefix /path/to/install
|
|
|
```
|
|
|
|
|
|
### Main Executable: mmax-model-selection
|
|
|
|
|
|
Beyond parsing the command-line options, `mmax-model-selection` is relatively straightforward. It proceeds as follows
|
|
|
|
|
|
* load the Mmax posterior samples along with any non-trivial weights associated therewith. These are specified through command-line options specifying the path to a CSV file and appropriate column names.
|
|
|
* loads the event's posterior samples and prunes them. Again, a path to a CSV, column names, and prior ranges are all specified as command-line options.
|
|
|
* Pruning is done to restrict the posterior to within certain prior ranges and is typically not necessary. However, occassionally bad PE samples will contain outliers (e.g., negative component masses) that we would like to discard.
|
|
|
* Compute population prior weights based on the assumed overall mass distribution. We implement a small set of possible population models, and user specify which they want along with the relevant parameters through the command-line options.
|
|
|
* this is accomplished through a delegation to [utils.population_weights](https://git.ligo.org/reed.essick/mmax-model-selection/-/blob/master/mmax_model_selection/utils.py#L107), which is little more than a set of nested conditionals that set up population parameters before evaluating the ratio of prior probabilities (between the target prior and the one used to generate the event's posterior samples) for the
|
|
|
* masses: [single-object mass distribution](https://git.ligo.org/reed.essick/mmax-model-selection/-/blob/master/mmax_model_selection/utils.py#L86) and [pairing probability](https://git.ligo.org/reed.essick/mmax-model-selection/-/blob/master/mmax_model_selection/utils.py#L97)
|
|
|
* distance: [uniform in euclidean volume](https://git.ligo.org/reed.essick/mmax-model-selection/-/blob/master/mmax_model_selection/utils.py#L100). *Note* we do not currently incorporate cosmological models to get the distribution in comoving volume.
|
|
|
* Compute the posterior odds and the posterior probability, along with error estimates through a delegation to [utils.prob_odds](https://git.ligo.org/reed.essick/mmax-model-selection/-/blob/master/mmax_model_selection/utils.py#L335). Because the Odds ratio and posterior odds are estimated using many of the same calculations (see Appendix of [LIGO-P2000216](https://dcc.ligo.org/LIGO-P2000216) / [arXiv:2007.01372](https://arxiv.org/abs/2007.01372), these are estimated within the same function call).
|
|
|
* this computes the expected value and standard deviation through nested Monte-Carlo integrals over weighed samples.
|
|
|
|
|
|
The full help-string is reproduced below
|
|
|
|
|
|
```
|
|
|
$ mmax-model-selection -h
|
|
|
usage: mmax-model-selection [-h] [--mass-column MASS_COLUMN]
|
|
|
[--m1-column M1_COLUMN] [--m2-column M2_COLUMN]
|
|
|
[--d-column D_COLUMN] [--mmax-column MMAX_COLUMN]
|
|
|
[--mmax-weight-column MMAX_WEIGHT_COLUMN]
|
|
|
[--mmax-weight-is-log]
|
|
|
[--mmax-range MMAX_RANGE MMAX_RANGE]
|
|
|
[--q-range Q_RANGE Q_RANGE]
|
|
|
[--m-range M_RANGE M_RANGE]
|
|
|
[--mc-range MC_RANGE MC_RANGE]
|
|
|
[--d-range D_RANGE D_RANGE] [-p POPULATION]
|
|
|
[-P POPULATION_PARAMETER POPULATION_PARAMETER]
|
|
|
[-v]
|
|
|
event_samples mmax_samples
|
|
|
|
|
|
a simple script to estimate bayes factors for a NS vs a BH based on m2
|
|
|
posteriors and Mmax limits
|
|
|
|
|
|
optional arguments:
|
|
|
-h, --help show this help message and exit
|
|
|
|
|
|
event posterior arguments:
|
|
|
event_samples
|
|
|
--mass-column MASS_COLUMN
|
|
|
--m1-column M1_COLUMN
|
|
|
only used when pruning posterior samples
|
|
|
--m2-column M2_COLUMN
|
|
|
only used when pruning posterior samples
|
|
|
--d-column D_COLUMN only used when pruning posterior samples
|
|
|
|
|
|
Mmax posterior arguments:
|
|
|
mmax_samples
|
|
|
--mmax-column MMAX_COLUMN
|
|
|
--mmax-weight-column MMAX_WEIGHT_COLUMN
|
|
|
--mmax-weight-is-log
|
|
|
--mmax-range MMAX_RANGE MMAX_RANGE
|
|
|
|
|
|
prior arguments:
|
|
|
--q-range Q_RANGE Q_RANGE
|
|
|
--m-range M_RANGE M_RANGE
|
|
|
--mc-range MC_RANGE MC_RANGE
|
|
|
--d-range D_RANGE D_RANGE
|
|
|
-p POPULATION, --population POPULATION
|
|
|
must be one of: GAP_M2, FLAT, GAP_M1, PARETO_M2,
|
|
|
PARETO_M1, LALINF, PARETO, GAP
|
|
|
-P POPULATION_PARAMETER POPULATION_PARAMETER, --population-parameter POPULATION_PARAMETER POPULATION_PARAMETER
|
|
|
repeat this for each population parameter you want to
|
|
|
specify. e.g. "--population-param alpha 1.3"
|
|
|
|
|
|
verbosity arguments:
|
|
|
-v, --verbose
|
|
|
```
|
|
|
|
|
|
## Comparison to Previous Results
|
|
|
|
|
|
**WRITE ME** |
|
|
\ No newline at end of file |