gravelamps.core.result¶
Implementations to handle result files.
- class gravelamps.core.result.GolumJpeResult(result_file: str)¶
Bases:
JointResultImplementation of JointResult for the GOLUM pipeline in Joint Parameter estimation configuration.
Methods
Get the posteriors for the lensing observables.
priors()Get the priors from the result file.
Get the posteriors for the binary source parameters.
- lens_observables()¶
Get the posteriors for the lensing observables.
- Returns:
- dict
Contains the keys relative_magnification, time_delay, and morse_index with the values for each key being the posterior.
- observable_key_map = {'delta_n': 'morse_index', 'delta_t': 'time_delay', 'relative_magnification': 'relative_magnification'}¶
- priors()¶
Get the priors from the result file.
- Returns:
- PriorDict
Contains keys corresponding to each of the source parameter and lens observables and the prior function for each in bilby compatible format.
- source_parameters()¶
Get the posteriors for the binary source parameters.
- Returns:
- dict
Contains keys corresponding to the source parameters and values containing the posterior for each sample.
- class gravelamps.core.result.JointResult(result_file: str)¶
Bases:
ABCBase for writing pipeline specific result objects in a common form so that they may be used for joint model selection.
- Attributes:
- result_file: str
Path to the result file.
- pipeline: str
Pipeline that the results were obtained using.
Methods
Get the posteriors for the lensing observables.
priors()Get the priors from the result file.
Get the posteriors for the binary source parameters.
- abstractmethod lens_observables() dict¶
Get the posteriors for the lensing observables.
- Returns:
- dict
Contains the keys relative_magnification, time_delay, and morse_index with the values for each key being the posterior.
- abstractmethod priors() PriorDict¶
Get the priors from the result file.
- Returns:
- PriorDict
Contains keys corresponding to each of the source parameter and lens observables and the prior function for each in bilby compatible format.
- abstractmethod source_parameters() dict¶
Get the posteriors for the binary source parameters.
- Returns:
- dict
Contains keys corresponding to the source parameters and values containing the posterior for each sample.
- gravelamps.core.result.get_result_class(pipeline: str) Callable¶
Get the corresponding result class to the pipeline string.
- Parameters:
- pipeline: str
Name of the pipeline for which the result class should correspond. Implemented values are: “GOLUM JPE”.
- Returns:
- result_class: Callable
Constructor for the JointResult subclass corresponding to the pipeline.
- Raises:
- ValueError
If pipeline string does not correspond to an implemented result.