Basics
Tutorials
Models
Models utilising the george GPR library in Python and C++.
heron.models.georgebased.
Heron2dHodlr
[source]¶Bases: heron.models.georgebased.HodlrGPR
, heron.models.gw.BBHNonSpinSurrogate
, heron.models.gw.HofTSurrogate
Produce a BBH waveform generator using the Hodlr method.
Methods
|
Return a waveform from the GPR in a format expected by the Bilby ecosystem |
|
Construct the GP object |
|
Return the mean waveform and the variance at a given location in the BBH parameter space. |
|
Prepare the model to be evaluated. |
|
Evaluate the log-evidence of the model at a hyperparameter location k. |
|
Return the mean waveform at a given location in the BBH parameter space. |
|
Prepare the model to be trained. |
heron.models.georgebased.
Heron2dHodlrIMR
[source]¶Bases: heron.models.georgebased.HodlrGPR
, heron.models.gw.BBHNonSpinSurrogate
, heron.models.gw.HofTSurrogate
Produce a BBH waveform generator using the Hodlr method with IMRPhenomPv2 training data.
Methods
|
Return a waveform from the GPR in a format expected by the Bilby ecosystem |
|
Construct the GP object |
|
Return the mean waveform and the variance at a given location in the BBH parameter space. |
|
Prepare the model to be evaluated. |
|
Evaluate the log-evidence of the model at a hyperparameter location k. |
|
Return the mean waveform at a given location in the BBH parameter space. |
|
Prepare the model to be trained. |
heron.models.georgebased.
HeronHodlr
[source]¶Bases: heron.models.georgebased.HodlrGPR
, heron.models.gw.BBHSurrogate
, heron.models.gw.HofTSurrogate
Produce a BBH waveform generator using the Hodlr method.
Methods
|
Return a waveform from the GPR in a format expected by the Bilby ecosystem |
|
Construct the GP object |
|
Return the mean waveform and the variance at a given location in the BBH parameter space. |
|
Prepare the model to be evaluated. |
|
Evaluate the log-evidence of the model at a hyperparameter location k. |
|
Return the mean waveform at a given location in the BBH parameter space. |
|
Prepare the model to be trained. |
heron.models.georgebased.
HodlrGPR
[source]¶Bases: heron.models.Model
A GPR model using the hierarchical matrix approximation.
Methods
|
Construct the GP object |
|
Return the mean waveform and the variance at a given location in the BBH parameter space. |
|
Prepare the model to be evaluated. |
|
Evaluate the log-evidence of the model at a hyperparameter location k. |
|
Return the mean waveform at a given location in the BBH parameter space. |
|
Prepare the model to be trained. |
distribution
(self, p, times, samples=100, polarisation='h+')[source]¶Return the mean waveform and the variance at a given location in the BBH parameter space.
A dictionary of parameter locations.
The timestamps at which the model should be evaluated.
The number of samples to draw from the GP.
The polarisation which should be evaluated.
log_evidence
(self, k, n)[source]¶Evaluate the log-evidence of the model at a hyperparameter location k.
The number of points to be used to calculate the log likelihood.
This module contains objects which provide the specifically-GW parts of waveform surrogate models.
heron.models.gw.
BBHNonSpinSurrogate
[source]¶Bases: object
c_ind
= {'h+': 8, 'hx': 9, 'mass ratio': 1, 'time': 0}¶columns
= {0: 'time', 1: 'mass ratio', 8: 'h+', 9: 'hx'}¶problem_dims
= 2¶heron.models.gw.
BBHSurrogate
[source]¶Bases: object
c_ind
= {'h+': 8, 'hx': 9, 'mass ratio': 1, 'spin 1x': 2, 'spin 1y': 3, 'spin 1z': 4, 'spin 2x': 5, 'spin 2y': 6, 'spin 2z': 7, 'time': 0}¶columns
= {0: 'time', 1: 'mass ratio', 2: 'spin 1x', 3: 'spin 1y', 4: 'spin 1z', 5: 'spin 2x', 6: 'spin 2y', 7: 'spin 2z', 8: 'h+', 9: 'hx'}¶parameters
= ('mass ratio', 'spin 1x', 'spin 1y', 'spin 1z', 'spin 2x', 'spin 2y', 'spin 2z')¶problem_dims
= 8¶heron.models.gw.
HofTSurrogate
[source]¶Bases: object
Methods
|
Return a waveform from the GPR in a format expected by the Bilby ecosystem |
bilby
(self, time, mass_1, mass_2, luminosity_distance, theta_jn=0, phase=0, psi=0)[source]¶Return a waveform from the GPR in a format expected by the Bilby ecosystem
The times at which the model should be evaluated.
The mass (in solar masses) of the primary and secondary components.
The distance (in megaparsec) to the source
The orientation angle of the source.
The initial phase of the signal
The polarisation angle of the signal
heron.models.
Model
[source]¶Bases: object
This is the factory class for statistical models used for waveform generation.
A model class must expose the followi*** TODO Email about Away Dayc_ind = {j:i for i,j in columns.items()}c_ind = {j:i for i,j in columns.items()}ng methods: - distribution : produce a distribution of waveforms at a given point in the parameter space - mean : produce a mean waveform at a given point in the parameter space - train : provide an interface for training the model