Skip to content

Commit

Permalink
add some noise model parameter docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-j committed Aug 6, 2023
1 parent bd9f3e3 commit db11c34
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions prospect/likelihood/noise_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def __init__(self, frac_out_name="f_outlier",
self.nsigma_out_name = nsigma_out_name
self.kernels = []

def _available_parameters(self):
new_pars = [(self.frac_out_name, "Fraction of data points that are outliers"),
(self.nsigma_out_name, "Dispersion of the outlier distribution, in units of chi")]
return new_pars

def update(self, **params):
self.f_outlier = params.get(self.frac_out_name, 0)
self.n_sigma_outlier = params.get(self.nsigma_out_name, 50)
Expand Down Expand Up @@ -100,6 +105,13 @@ def __init__(self, frac_out_name="f_outlier",
self.metric_name = metric_name
self.mask_name = mask_name

def _available_parameters(self):
new_pars = [(self.frac_out_name, "Fraction of data points that are outliers"),
(self.nsigma_out_name, "Dispersion of the outlier distribution, in units of chi")]
for kernel in self.kernels:
new_pars += getattr(kernel, "_available_parameters", [])
return new_pars

def construct_covariance(self, **vectors):
"""Construct a covariance matrix from a metric, a list of kernel
objects, and a list of weight vectors (of same length as the metric)
Expand Down

0 comments on commit db11c34

Please sign in to comment.