CovarianceBase
- class pyMaCh3._pyMaCh3.covariance.CovarianceBase
Bases:
pybind11_object
Methods Summary
calculate_likelihood
(self)Calculate penalty term based on inverted covariance matrix.
get_fancy_par_name
(self, index)Get the name of this parameter.
get_internal_par_name
(self, index)Get the internally used name of this parameter.
get_n_pars
(self)Get the number of parameters that this covariance object knows about.
get_proposal_array
(self)Bind a python array to the parameter proposal values for this covariance object.
propose_step
(self)Propose a step based on the covariances.
throw_par_prop
(self[, mag])Throw the proposed parameter by magnitude mag X sigma.
Methods Documentation
- calculate_likelihood(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase) float
Calculate penalty term based on inverted covariance matrix.
- get_fancy_par_name(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase, index: int) str
- Get the name of this parameter.
- param index:
The global index of the parameter
- get_internal_par_name(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase, index: int) str
- Get the internally used name of this parameter.
- param index:
The global index of the parameter
- get_n_pars(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase) int
Get the number of parameters that this covariance object knows about.
- get_proposal_array(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase) memoryview
- Bind a python array to the parameter proposal values for this covariance object.
This allows you to set e.g. a numpy array to ‘track’ the parameter proposal values. You could either use this to directly set the proposals, or to just read the values proposed by e.g. throw_par_prop() :warning: This should be set AFTER all of the parameters have been read in from the config file as it resizes the array to fit the number of parameters. :param array: This is the array that will be set. Size and contents don’t matter as it will be changed to fit the parameters.
- propose_step(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase) None
Propose a step based on the covariances. Also feel free to overwrite if you want something more funky.
- throw_par_prop(self: pyMaCh3._pyMaCh3.covariance.CovarianceBase, mag: float = 1.0) None
- Throw the proposed parameter by magnitude mag X sigma.
- param mag:
This value multiplied by the prior value of each parameter will be the width of the distribution that the parameter values are drawn from.