|
|
Here we review the changes made for pesummary v0.5.6.
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
## Comparison to `cbcBayesPostProc`
|
|
|
|
|
|
The result of running the `summaryreview` script can be found here:
|
|
|
|
|
|
#### Review comments
|
|
|
|
|
|
## Parallelising exact redshift computation
|
|
|
|
|
|
### Related MRs
|
|
|
|
|
|
* !329
|
|
|
|
|
|
### example outputs
|
|
|
|
|
|
* https://ligo.gravity.cf.ac.uk/~charlie.hoy/LVC/projects/pesummary_review/v0.5.6/parallel_redshift/no_parallel/home.html
|
|
|
* https://ligo.gravity.cf.ac.uk/~charlie.hoy/LVC/projects/pesummary_review/v0.5.6/parallel_redshift/parallel/home.html
|
|
|
|
|
|
### Consistent quantities
|
|
|
|
|
|
To check that the redshift quantities are consistent when run on multiple cores, we run the following `summarypages` executable with `pesummary v0.5.5` (i.e. no parallelisation):
|
|
|
|
|
|
```bash
|
|
|
$ summarypages --cosmology Planck15_lal --redshift_method exact --webdir /home/charlie.hoy/public_html/projects/pesummary_review/remnant_fits/parallel_redshift/no_parallel --samples /home/charlie.hoy/projects/pesummary_review/remnant_fits/parallel_evolved/PhenomPv3HM_samples.hdf5 --approximant IMRPhenomPv3HM --labels no_parallelisation
|
|
|
```
|
|
|
|
|
|
and we run the following `summarypages` executable on commit fbf36e3a (where parallelisation has been added):
|
|
|
|
|
|
```bash
|
|
|
$ summarypages --cosmology Planck15_lal --redshift_method exact --webdir /home/charlie.hoy/public_html/projects/pesummary_review/remnant_fits/parallel_redshift/parallel --samples /home/charlie.hoy/projects/pesummary_review/remnant_fits/parallel_evolved/PhenomPv3HM_samples.hdf5 --approximant IMRPhenomPv3HM --labels parallel --multi_process 10
|
|
|
```
|
|
|
|
|
|
We then compare the samples generated by the two runs and highlight the maximum difference:
|
|
|
|
|
|
```python
|
|
|
import numpy as np
|
|
|
|
|
|
no_parallel = np.genfromtxt("/home/charlie.hoy/public_html/LVC/projects/pesummary_review/v0.5.6/parallel_redshift/no_parallel/samples/no_parallelisation_pesummary.dat", names=True)
|
|
|
parallel = np.genfromtxt("/home/charlie.hoy/public_html/LVC/projects/pesummary_review/v0.5.6/parallel_redshift/parallel/samples/parallel_pesummary.dat", names=True)
|
|
|
|
|
|
assert len(set(no_parallel.dtype.names) - set(parallel.dtype.names)) == 0
|
|
|
for i in no_parallel.dtype.names:
|
|
|
print("{} max difference: {}".format(
|
|
|
i, np.max(np.abs(no_parallel[i] - parallel[i]))
|
|
|
))
|
|
|
```
|
|
|
|
|
|
```bash
|
|
|
H1_matched_filter_abs_snr max difference: 0.0
|
|
|
H1_matched_filter_snr_angle max difference: 0.0
|
|
|
H1_optimal_snr max difference: 0.0
|
|
|
H1_spcal_amp_0 max difference: 0.0
|
|
|
H1_spcal_amp_1 max difference: 0.0
|
|
|
H1_spcal_amp_2 max difference: 0.0
|
|
|
H1_spcal_amp_3 max difference: 0.0
|
|
|
H1_spcal_amp_4 max difference: 0.0
|
|
|
H1_spcal_amp_5 max difference: 0.0
|
|
|
H1_spcal_amp_6 max difference: 0.0
|
|
|
H1_spcal_amp_7 max difference: 0.0
|
|
|
H1_spcal_amp_8 max difference: 0.0
|
|
|
H1_spcal_amp_9 max difference: 0.0
|
|
|
H1_spcal_phase_0 max difference: 0.0
|
|
|
H1_spcal_phase_1 max difference: 0.0
|
|
|
H1_spcal_phase_2 max difference: 0.0
|
|
|
H1_spcal_phase_3 max difference: 0.0
|
|
|
H1_spcal_phase_4 max difference: 0.0
|
|
|
H1_spcal_phase_5 max difference: 0.0
|
|
|
H1_spcal_phase_6 max difference: 0.0
|
|
|
H1_spcal_phase_7 max difference: 0.0
|
|
|
H1_spcal_phase_8 max difference: 0.0
|
|
|
H1_spcal_phase_9 max difference: 0.0
|
|
|
L1_matched_filter_abs_snr max difference: 0.0
|
|
|
L1_matched_filter_snr_angle max difference: 0.0
|
|
|
L1_optimal_snr max difference: 0.0
|
|
|
L1_spcal_amp_0 max difference: 0.0
|
|
|
L1_spcal_amp_1 max difference: 0.0
|
|
|
L1_spcal_amp_2 max difference: 0.0
|
|
|
L1_spcal_amp_3 max difference: 0.0
|
|
|
L1_spcal_amp_4 max difference: 0.0
|
|
|
L1_spcal_amp_5 max difference: 0.0
|
|
|
L1_spcal_amp_6 max difference: 0.0
|
|
|
L1_spcal_amp_7 max difference: 0.0
|
|
|
L1_spcal_amp_8 max difference: 0.0
|
|
|
L1_spcal_amp_9 max difference: 0.0
|
|
|
L1_spcal_phase_0 max difference: 0.0
|
|
|
L1_spcal_phase_1 max difference: 0.0
|
|
|
L1_spcal_phase_2 max difference: 0.0
|
|
|
L1_spcal_phase_3 max difference: 0.0
|
|
|
L1_spcal_phase_4 max difference: 0.0
|
|
|
L1_spcal_phase_5 max difference: 0.0
|
|
|
L1_spcal_phase_6 max difference: 0.0
|
|
|
L1_spcal_phase_7 max difference: 0.0
|
|
|
L1_spcal_phase_8 max difference: 0.0
|
|
|
L1_spcal_phase_9 max difference: 0.0
|
|
|
V1_matched_filter_abs_snr max difference: 0.0
|
|
|
V1_matched_filter_snr_angle max difference: 0.0
|
|
|
V1_optimal_snr max difference: 0.0
|
|
|
V1_spcal_amp_0 max difference: 0.0
|
|
|
V1_spcal_amp_1 max difference: 0.0
|
|
|
V1_spcal_amp_2 max difference: 0.0
|
|
|
V1_spcal_amp_3 max difference: 0.0
|
|
|
V1_spcal_amp_4 max difference: 0.0
|
|
|
V1_spcal_amp_5 max difference: 0.0
|
|
|
V1_spcal_amp_6 max difference: 0.0
|
|
|
V1_spcal_amp_7 max difference: 0.0
|
|
|
V1_spcal_amp_8 max difference: 0.0
|
|
|
V1_spcal_amp_9 max difference: 0.0
|
|
|
V1_spcal_phase_0 max difference: 0.0
|
|
|
V1_spcal_phase_1 max difference: 0.0
|
|
|
V1_spcal_phase_2 max difference: 0.0
|
|
|
V1_spcal_phase_3 max difference: 0.0
|
|
|
V1_spcal_phase_4 max difference: 0.0
|
|
|
V1_spcal_phase_5 max difference: 0.0
|
|
|
V1_spcal_phase_6 max difference: 0.0
|
|
|
V1_spcal_phase_7 max difference: 0.0
|
|
|
V1_spcal_phase_8 max difference: 0.0
|
|
|
V1_spcal_phase_9 max difference: 0.0
|
|
|
azimuth max difference: 0.0
|
|
|
deltalogl max difference: 0.0
|
|
|
log_likelihood max difference: 0.0
|
|
|
loglH1 max difference: 0.0
|
|
|
loglL1 max difference: 0.0
|
|
|
loglV1 max difference: 0.0
|
|
|
logpost max difference: 0.0
|
|
|
log_prior max difference: 0.0
|
|
|
network_matched_filter_snr max difference: 0.0
|
|
|
nullLogL max difference: 0.0
|
|
|
network_optimal_snr max difference: 0.0
|
|
|
phase max difference: 0.0
|
|
|
phi_12 max difference: 0.0
|
|
|
phi_jl max difference: 0.0
|
|
|
mass_ratio max difference: 0.0
|
|
|
t0 max difference: 0.0
|
|
|
temperature max difference: 0.0
|
|
|
geocent_time max difference: 0.0
|
|
|
nLocalTemps max difference: 0.0
|
|
|
randomSeed max difference: 0.0
|
|
|
ra max difference: 0.0
|
|
|
dec max difference: 0.0
|
|
|
luminosity_distance max difference: 0.0
|
|
|
psi max difference: 0.0
|
|
|
chirp_mass max difference: 0.0
|
|
|
a_1 max difference: 0.0
|
|
|
a_2 max difference: 0.0
|
|
|
tilt_1 max difference: 0.0
|
|
|
tilt_2 max difference: 0.0
|
|
|
alpha max difference: 0.0
|
|
|
theta_jn max difference: 0.0
|
|
|
chain_log_evidence max difference: 0.0
|
|
|
chain_delta_log_evidence max difference: 0.0
|
|
|
chain_log_noise_evidence max difference: 0.0
|
|
|
chain_log_bayes_factor max difference: 0.0
|
|
|
inverted_mass_ratio max difference: 0.0
|
|
|
mass_1 max difference: 0.0
|
|
|
mass_2 max difference: 0.0
|
|
|
total_mass max difference: 0.0
|
|
|
symmetric_mass_ratio max difference: 0.0
|
|
|
iota max difference: 0.0
|
|
|
spin_1x max difference: 0.0
|
|
|
spin_1y max difference: 0.0
|
|
|
spin_1z max difference: 0.0
|
|
|
spin_2x max difference: 0.0
|
|
|
spin_2y max difference: 0.0
|
|
|
spin_2z max difference: 0.0
|
|
|
phi_1 max difference: 0.0
|
|
|
phi_2 max difference: 0.0
|
|
|
chi_eff max difference: 0.0
|
|
|
chi_p max difference: 0.0
|
|
|
final_spin_non_evolved max difference: 0.0
|
|
|
peak_luminosity_non_evolved max difference: 0.0
|
|
|
final_mass_non_evolved max difference: 0.0
|
|
|
cos_tilt_1 max difference: 0.0
|
|
|
cos_tilt_2 max difference: 0.0
|
|
|
redshift max difference: 0.0
|
|
|
comoving_distance max difference: 0.0
|
|
|
mass_1_source max difference: 0.0
|
|
|
mass_2_source max difference: 0.0
|
|
|
total_mass_source max difference: 0.0
|
|
|
chirp_mass_source max difference: 0.0
|
|
|
final_mass_source_non_evolved max difference: 0.0
|
|
|
radiated_energy_non_evolved max difference: 0.0
|
|
|
H1_time max difference: 0.0
|
|
|
L1_time max difference: 0.0
|
|
|
V1_time max difference: 0.0
|
|
|
H1_matched_filter_snr max difference: 0.0
|
|
|
L1_matched_filter_snr max difference: 0.0
|
|
|
V1_matched_filter_snr max difference: 0.0
|
|
|
cos_theta_jn max difference: 0.0
|
|
|
cos_iota max difference: 0.0
|
|
|
```
|
|
|
|
|
|
### Review comments
|
|
|
The difference between the parallelised and non-parallelised runs is negligible. This is therefore an acceptable change.
|
|
|
### sign-off
|
|
|
@philip.relton
|
|
|
|
|
|
## `tqdm` and `logger`
|
|
|
|
|
|
### Related MRs
|
|
|
|
|
|
* !328
|
|
|
|
|
|
### example outputs
|
|
|
|
|
|
To check that `tqdm` can nicely interact with `PESummary`'s logger, we perform the following basic tests and print the output from each:
|
|
|
|
|
|
```python
|
|
|
from pesummary.utils.tqdm import tqdm
|
|
|
from time import sleep
|
|
|
|
|
|
for j in tqdm(range(100)):
|
|
|
_ = j*j
|
|
|
sleep(0.5)
|
|
|
```
|
|
|
```bash
|
|
|
71%|█████████████████████████████████████████████████████████████████████████▊ | 71/100 [00:35<00:14, 1.99it/s]
|
|
|
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:50<00:00, 1.99it/s]
|
|
|
```
|
|
|
```python
|
|
|
from pesummary.utils.tqdm import tqdm
|
|
|
from pesummary.utils.utils import logger, LOG_FILE
|
|
|
from time import sleep
|
|
|
|
|
|
print(LOG_FILE)
|
|
|
for j in tqdm(range(100), logger=logger, bar_format="{percentage}% complete"):
|
|
|
_ = j*j
|
|
|
sleep(0.5)
|
|
|
```
|
|
|
```bash
|
|
|
/Users/Charlie/.cache/pesummary/log/tmpjsfrbvs3/pesummary.log
|
|
|
2020-05-22 23:27:36 PESummary INFO : 11.0% complete
|
|
|
2020-05-22 23:27:48 PESummary INFO : 36.0% complete
|
|
|
2020-05-22 23:28:21 PESummary INFO : 100.0% complete
|
|
|
$ cat /Users/Charlie/.cache/pesummary/log/tmpjsfrbvs3/pesummary.log
|
|
|
2020-05-22 23:27:31 PESummary DEBUG : 1.0% complete
|
|
|
2020-05-22 23:27:31 PESummary DEBUG : 2.0% complete
|
|
|
2020-05-22 23:27:32 PESummary DEBUG : 3.0% complete
|
|
|
2020-05-22 23:27:32 PESummary DEBUG : 4.0% complete
|
|
|
2020-05-22 23:27:33 PESummary DEBUG : 5.0% complete
|
|
|
2020-05-22 23:27:33 PESummary DEBUG : 6.0% complete
|
|
|
2020-05-22 23:27:34 PESummary DEBUG : 7.000000000000001% complete
|
|
|
2020-05-22 23:27:34 PESummary DEBUG : 8.0% complete
|
|
|
2020-05-22 23:27:35 PESummary DEBUG : 9.0% complete
|
|
|
2020-05-22 23:27:35 PESummary DEBUG : 10.0% complete
|
|
|
2020-05-22 23:27:36 PESummary DEBUG : 11.0% complete
|
|
|
2020-05-22 23:27:36 PESummary DEBUG : 12.0% complete
|
|
|
2020-05-22 23:27:37 PESummary DEBUG : 13.0% complete
|
|
|
2020-05-22 23:27:37 PESummary DEBUG : 14.000000000000002% complete
|
|
|
2020-05-22 23:27:38 PESummary DEBUG : 15.0% complete
|
|
|
2020-05-22 23:27:38 PESummary DEBUG : 16.0% complete
|
|
|
2020-05-22 23:27:39 PESummary DEBUG : 17.0% complete
|
|
|
2020-05-22 23:27:39 PESummary DEBUG : 18.0% complete
|
|
|
2020-05-22 23:27:40 PESummary DEBUG : 19.0% complete
|
|
|
2020-05-22 23:27:40 PESummary DEBUG : 20.0% complete
|
|
|
2020-05-22 23:27:41 PESummary DEBUG : 21.0% complete
|
|
|
2020-05-22 23:27:41 PESummary DEBUG : 22.0% complete
|
|
|
2020-05-22 23:27:42 PESummary DEBUG : 23.0% complete
|
|
|
2020-05-22 23:27:42 PESummary DEBUG : 24.0% complete
|
|
|
2020-05-22 23:27:43 PESummary DEBUG : 25.0% complete
|
|
|
2020-05-22 23:27:43 PESummary DEBUG : 26.0% complete
|
|
|
2020-05-22 23:27:44 PESummary DEBUG : 27.0% complete
|
|
|
2020-05-22 23:27:44 PESummary DEBUG : 28.000000000000004% complete
|
|
|
2020-05-22 23:27:45 PESummary DEBUG : 28.999999999999996% complete
|
|
|
2020-05-22 23:27:45 PESummary DEBUG : 30.0% complete
|
|
|
2020-05-22 23:27:46 PESummary DEBUG : 31.0% complete
|
|
|
2020-05-22 23:27:46 PESummary DEBUG : 32.0% complete
|
|
|
2020-05-22 23:27:47 PESummary DEBUG : 33.0% complete
|
|
|
2020-05-22 23:27:47 PESummary DEBUG : 34.0% complete
|
|
|
2020-05-22 23:27:48 PESummary DEBUG : 35.0% complete
|
|
|
2020-05-22 23:27:48 PESummary DEBUG : 36.0% complete
|
|
|
2020-05-22 23:27:49 PESummary DEBUG : 37.0% complete
|
|
|
2020-05-22 23:27:49 PESummary DEBUG : 38.0% complete
|
|
|
2020-05-22 23:27:50 PESummary DEBUG : 39.0% complete
|
|
|
2020-05-22 23:27:50 PESummary DEBUG : 40.0% complete
|
|
|
2020-05-22 23:27:51 PESummary DEBUG : 41.0% complete
|
|
|
2020-05-22 23:27:51 PESummary DEBUG : 42.0% complete
|
|
|
2020-05-22 23:27:52 PESummary DEBUG : 43.0% complete
|
|
|
2020-05-22 23:27:52 PESummary DEBUG : 44.0% complete
|
|
|
2020-05-22 23:27:53 PESummary DEBUG : 45.0% complete
|
|
|
2020-05-22 23:27:53 PESummary DEBUG : 46.0% complete
|
|
|
2020-05-22 23:27:54 PESummary DEBUG : 47.0% complete
|
|
|
2020-05-22 23:27:54 PESummary DEBUG : 48.0% complete
|
|
|
2020-05-22 23:27:55 PESummary DEBUG : 49.0% complete
|
|
|
2020-05-22 23:27:55 PESummary DEBUG : 50.0% complete
|
|
|
2020-05-22 23:27:56 PESummary DEBUG : 51.0% complete
|
|
|
2020-05-22 23:27:56 PESummary DEBUG : 52.0% complete
|
|
|
2020-05-22 23:27:57 PESummary DEBUG : 53.0% complete
|
|
|
2020-05-22 23:27:57 PESummary DEBUG : 54.0% complete
|
|
|
2020-05-22 23:27:58 PESummary DEBUG : 55.00000000000001% complete
|
|
|
2020-05-22 23:27:58 PESummary DEBUG : 56.00000000000001% complete
|
|
|
2020-05-22 23:27:59 PESummary DEBUG : 56.99999999999999% complete
|
|
|
2020-05-22 23:27:59 PESummary DEBUG : 57.99999999999999% complete
|
|
|
2020-05-22 23:28:00 PESummary DEBUG : 59.0% complete
|
|
|
2020-05-22 23:28:00 PESummary DEBUG : 60.0% complete
|
|
|
2020-05-22 23:28:01 PESummary DEBUG : 61.0% complete
|
|
|
2020-05-22 23:28:02 PESummary DEBUG : 62.0% complete
|
|
|
2020-05-22 23:28:02 PESummary DEBUG : 63.0% complete
|
|
|
2020-05-22 23:28:03 PESummary DEBUG : 64.0% complete
|
|
|
2020-05-22 23:28:03 PESummary DEBUG : 65.0% complete
|
|
|
2020-05-22 23:28:04 PESummary DEBUG : 66.0% complete
|
|
|
2020-05-22 23:28:04 PESummary DEBUG : 67.0% complete
|
|
|
2020-05-22 23:28:05 PESummary DEBUG : 68.0% complete
|
|
|
2020-05-22 23:28:05 PESummary DEBUG : 69.0% complete
|
|
|
2020-05-22 23:28:06 PESummary DEBUG : 70.0% complete
|
|
|
2020-05-22 23:28:06 PESummary DEBUG : 71.0% complete
|
|
|
2020-05-22 23:28:07 PESummary DEBUG : 72.0% complete
|
|
|
2020-05-22 23:28:07 PESummary DEBUG : 73.0% complete
|
|
|
2020-05-22 23:28:08 PESummary DEBUG : 74.0% complete
|
|
|
2020-05-22 23:28:08 PESummary DEBUG : 75.0% complete
|
|
|
2020-05-22 23:28:09 PESummary DEBUG : 76.0% complete
|
|
|
2020-05-22 23:28:09 PESummary DEBUG : 77.0% complete
|
|
|
2020-05-22 23:28:10 PESummary DEBUG : 78.0% complete
|
|
|
2020-05-22 23:28:10 PESummary DEBUG : 79.0% complete
|
|
|
2020-05-22 23:28:11 PESummary DEBUG : 80.0% complete
|
|
|
2020-05-22 23:28:11 PESummary DEBUG : 81.0% complete
|
|
|
2020-05-22 23:28:12 PESummary DEBUG : 82.0% complete
|
|
|
2020-05-22 23:28:12 PESummary DEBUG : 83.0% complete
|
|
|
2020-05-22 23:28:13 PESummary DEBUG : 84.0% complete
|
|
|
2020-05-22 23:28:13 PESummary DEBUG : 85.0% complete
|
|
|
2020-05-22 23:28:14 PESummary DEBUG : 86.0% complete
|
|
|
2020-05-22 23:28:14 PESummary DEBUG : 87.0% complete
|
|
|
2020-05-22 23:28:15 PESummary DEBUG : 88.0% complete
|
|
|
2020-05-22 23:28:15 PESummary DEBUG : 89.0% complete
|
|
|
2020-05-22 23:28:16 PESummary DEBUG : 90.0% complete
|
|
|
2020-05-22 23:28:16 PESummary DEBUG : 91.0% complete
|
|
|
2020-05-22 23:28:17 PESummary DEBUG : 92.0% complete
|
|
|
2020-05-22 23:28:17 PESummary DEBUG : 93.0% complete
|
|
|
2020-05-22 23:28:18 PESummary DEBUG : 94.0% complete
|
|
|
2020-05-22 23:28:18 PESummary DEBUG : 95.0% complete
|
|
|
2020-05-22 23:28:19 PESummary DEBUG : 96.0% complete
|
|
|
2020-05-22 23:28:19 PESummary DEBUG : 97.0% complete
|
|
|
2020-05-22 23:28:20 PESummary DEBUG : 98.0% complete
|
|
|
2020-05-22 23:28:20 PESummary DEBUG : 99.0% complete
|
|
|
2020-05-22 23:28:21 PESummary DEBUG : 100.0% complete
|
|
|
2020-05-22 23:28:21 PESummary DEBUG : 100.0% complete
|
|
|
```
|
|
|
|
|
|
To check that it is appropriately written to the log file within the PESummary workflow, we run the following example:
|
|
|
|
|
|
```bash
|
|
|
summarypages --redshift_method exact --webdir /home/charlie.hoy/public_html/projects/pesummary_review/remnant_fits/parallel_evolved/parallel --samples /home/charlie.hoy/projects/pesummary_review/remnant_fits/parallel_evolved/PhenomPv3HM_samples.hdf5 --evolve_spins --approximant IMRPhenomPv3HM --labels parallel --multi_process 10
|
|
|
```
|
|
|
|
|
|
The log can be seen here: https://ldas-jobs.ligo.caltech.edu/~charlie.hoy/projects/pesummary_review/remnant_fits/parallel_evolved/parallel/html/Logging.html. As you can see, the log messages now contain the `tqdm` output.
|
|
|
|
|
|
### Review comments
|
|
|
|
|
|
### sign-off
|
|
|
|
|
|
@nicola.delillo signs off on 26th May 2020 ✔ |
|
|
\ No newline at end of file |