... | @@ -147,6 +147,8 @@ Meaning now assertion errors are raised. |
... | @@ -147,6 +147,8 @@ Meaning now assertion errors are raised. |
|
|
|
|
|
## Test
|
|
## Test
|
|
|
|
|
|
|
|
Below we test that the summary printed for a `LALInference` file shows the correct information,
|
|
|
|
|
|
```python
|
|
```python
|
|
>>> from pesummary.io import read
|
|
>>> from pesummary.io import read
|
|
>>> f = read("EXP13.hdf5")
|
|
>>> f = read("EXP13.hdf5")
|
... | @@ -181,4 +183,38 @@ nsamples: 8020 |
... | @@ -181,4 +183,38 @@ nsamples: 8020 |
|
parameters: H1_matched_filter_abs_snr, H1_matched_filter_snr_angle, ..., chain_log_noise_evidence, chain_log_bayes_factor
|
|
parameters: H1_matched_filter_abs_snr, H1_matched_filter_snr_angle, ..., chain_log_noise_evidence, chain_log_bayes_factor
|
|
```
|
|
```
|
|
|
|
|
|
# Reviewer comments |
|
## Reviewer comments
|
|
\ No newline at end of file |
|
|
|
|
|
# Converted parameters
|
|
|
|
|
|
|
|
## Related MRs
|
|
|
|
|
|
|
|
* https://git.ligo.org/lscsoft/pesummary/-/merge_requests/440
|
|
|
|
|
|
|
|
## Test
|
|
|
|
|
|
|
|
To confirm that the list of `converted_parameters` is correct, we generate a file containing only `mass_1` and `mass_2` samples, and check that the list of `converted_parameters` contains `chirp_mass, test_mass, ...`
|
|
|
|
|
|
|
|
```python
|
|
|
|
from pesummary.io import read, write
|
|
|
|
import numpy as np
|
|
|
|
|
|
|
|
mass_1 = np.random.uniform(5, 100, 100)
|
|
|
|
mass_2 = np.random.uniform(2, mass_1, 100)
|
|
|
|
write(["mass_1", "mass_2"], np.array([mass_1, mass_2]).T, file_format="dat", filename="output.dat")
|
|
|
|
f = read("output.dat")
|
|
|
|
2020-11-20 11:48:36 PESummary WARNING : Failed to find 'log_likelihood' in result file. Setting every sample to have log_likelihood 0
|
|
|
|
f.parameters
|
|
|
|
['mass_1', 'mass_2', 'log_likelihood']
|
|
|
|
f.converted_parameters
|
|
|
|
[]
|
|
|
|
|
|
|
|
f.generate_all_posterior_samples()
|
|
|
|
2020-11-20 11:48:54 PESummary WARNING : Could not find reference_frequency in input file. Using 20Hz as default
|
|
|
|
f.parameters
|
|
|
|
['mass_1', 'mass_2', 'log_likelihood', 'mass_ratio', 'inverted_mass_ratio', 'total_mass', 'chirp_mass', 'symmetric_mass_ratio']
|
|
|
|
f.converted_parameters
|
|
|
|
['mass_ratio', 'inverted_mass_ratio', 'total_mass', 'chirp_mass', 'symmetric_mass_ratio']
|
|
|
|
```
|
|
|
|
|
|
|
|
## Reviewer comments |
|
|
|
\ No newline at end of file |