... | ... | @@ -16,4 +16,59 @@ The following script was used to read in the result file: |
|
|
|
|
|
```
|
|
|
|
|
|
# Checking stored data
|
|
|
|
|
|
The following script was used to check the data
|
|
|
|
|
|
```python
|
|
|
from pesummary.gw.file.read import read
|
|
|
from pesummary.gw.file.standard_names import lalinference_map
|
|
|
import h5py
|
|
|
|
|
|
base = "/home/charlie.hoy/projects/pesummary_review/files/{}"
|
|
|
PESUMMARY_LABEL = "PhenomPNRT-LS"
|
|
|
LALINFERENCE_FILE = base.format("PROD0_posterior_samples.hdf5")
|
|
|
LALINFERENCE_CONFIG = base.format("PROD0.ini")
|
|
|
PESUMMARY_FILE = base.format("PROD0_pesummary.h5")
|
|
|
|
|
|
lalinf_samples = h5py.File(LALINFERENCE_FILE, "r")
|
|
|
lalinf_samples = lalinf_samples["lalinference/lalinference_nest/posterior_samples"]
|
|
|
pesummary_samples = read(PESUMMARY_FILE)
|
|
|
pesummary_samples = pesummary_samples.samples_dict[PESUMMARY_LABEL]
|
|
|
|
|
|
reverse_map = {item: key for key, item in lalinference_map.items()}
|
|
|
pesummary_dict = {}
|
|
|
for param in pesummary_samples.keys():
|
|
|
if param in reverse_map.keys():
|
|
|
pesummary_dict[reverse_map[param]] = pesummary_samples[param]
|
|
|
else:
|
|
|
pesummary_dict[param] = pesummary_samples[param]
|
|
|
|
|
|
# Check posterior samples
|
|
|
not_included = []
|
|
|
for param in lalinf_samples.dtype.names:
|
|
|
if param in pesummary_dict.keys():
|
|
|
comparison = pesummary_dict[param] == lalinf_samples[param]
|
|
|
assert all(i == True for i in comparison)
|
|
|
else:
|
|
|
not_included.append(param)
|
|
|
|
|
|
print("--------------------")
|
|
|
print("Parameters not included in this analysis: {}".format(", ".join(not_included)))
|
|
|
print("--------------------")
|
|
|
|
|
|
|
|
|
# check config file
|
|
|
```
|
|
|
|
|
|
With output:
|
|
|
|
|
|
```bash
|
|
|
$ python runme.py
|
|
|
WARNING: failed to download https://datacenter.iers.org/data/9/finals2000A.all and ftp://cddis.gsfc.nasa.gov/pub/products/iers/finals2000A.all, using local IERS-B: db type is dbm.gnu, but the module is not available;db type is dbm.gnu, but the module is not available [astropy.utils.iers.iers]
|
|
|
--------------------
|
|
|
Parameters not included in this analysis: L1_cplx_snr_amp, L1_cplx_snr_arg, L1_optimal_snr, V1_cplx_snr_amp, V1_cplx_snr_arg, V1_optimal_snr, logL, logPrior
|
|
|
--------------------
|
|
|
```
|
|
|
|
|
|
# Reviewer comments |
|
|
\ No newline at end of file |