cogwheel.postprocessing.EventdirPostprocessor¶
- class cogwheel.postprocessing.EventdirPostprocessor(eventdir, reference_rundir=None, tolerance_params=None)¶
Bases:
objectClass to gather information from multiple runs of an event and exporting summary to pdf file.
The method .postprocess_eventdir executes all the functionality of the class. It is suggested to use the top-level function postprocess_eventdir for simple usage.
- Parameters:
- eventdiros.PathLike
Path to directory containing rundirs.
- reference_rundiros.PathLike, optional
Path to reference run directory. Defaults to the first (by name) rundir in eventdir.
- tolerance_paramsdict
Items to update defaults from DEFAULT_TOLERANCE_PARAMS. Values higher than their tolerance are highlighted in the table. Keys include:
- ‘asd_drift_dlnl_std’
Tolerable standard deviation of log likelihood fluctuations due to choice of reference waveform for ASD-drift.
- ‘asd_drift_dlnl_max’
Tolerable maximum log likelihood fluctuation due to choice of reference waveform for ASD-drift.
- ‘lnl_max_exceeds_lnl_0’
Tolerable amount by which the log likelihood of the best sample may exceed that of the reference waveform.
- ‘lnl_0_exceeds_lnl_max’
Tolerable amount by which the log likelihood of the reference waveform may exceed that of the best sample.
- ‘relative_binning_dlnl_std’
Tolerable standard deviation of log likelihood fluctuations due to the relative binning approximation.
- ‘relative_binning_dlnl_max’
Tolerable maximum log likelihood fluctuation due to the relative binning approximation.
Methods
Return a list of rundirs in self.eventdir for which sampling has completed.
Return a pandas DataFrame with a table that summarizes the different runs in rundirs.
Make diagnostics plots aggregating multiple runs of an event and save them to pdf format in {eventdir}/{DIAGNOSTICS_FILENAME}.
Attributes
DEFAULT_TOLERANCE_PARAMSDIAGNOSTICS_FILENAME- get_rundirs()¶
Return a list of rundirs in self.eventdir for which sampling has completed. Ignores incomplete runs, printing a warning.
- make_table(rundirs=None)¶
Return a pandas DataFrame with a table that summarizes the different runs in rundirs. The columns report differences in the samplers’ run_kwargs, plus the runtime and number of samples of each run.
- Parameters:
- rundirssequence of pathlib.Path
Run directories.
- postprocess_eventdir(outfile=None)¶
Make diagnostics plots aggregating multiple runs of an event and save them to pdf format in {eventdir}/{DIAGNOSTICS_FILENAME}. These include a summary table of the parameters of the runs, number of samples vs time to completion, and corner plots comparing each run to a reference one.