LSSTApplications  17.0+10,17.0+51,17.0+88,18.0.0+10,18.0.0+15,18.0.0+34,18.0.0+4,18.0.0+6,18.0.0-2-ge43143a+6,18.1.0-1-g0001055+2,18.1.0-1-g0896a44+10,18.1.0-1-g1349e88+9,18.1.0-1-g2505f39+7,18.1.0-1-g380d4d4+9,18.1.0-1-g5e4b7ea+2,18.1.0-1-g7e8fceb,18.1.0-1-g85f8cd4+7,18.1.0-1-g9a6769a+3,18.1.0-1-ga1a4c1a+6,18.1.0-1-gc037db8+2,18.1.0-1-gd55f500+3,18.1.0-1-ge10677a+7,18.1.0-10-g73b8679e+12,18.1.0-12-gf30922b,18.1.0-13-g451e75588,18.1.0-13-gbfe7f7f,18.1.0-2-g31c43f9+7,18.1.0-2-g9c63283+9,18.1.0-2-gdf0b915+9,18.1.0-2-gf03bb23+2,18.1.0-3-g52aa583+3,18.1.0-3-g8f4a2b1+1,18.1.0-3-g9cb968e+8,18.1.0-4-g7bbbad0,18.1.0-5-g510c42a+8,18.1.0-5-ga46117f,18.1.0-5-gaeab27e+9,18.1.0-6-gdda7f3e+11,18.1.0-8-g4084bf03+1,w.2019.34
LSSTDataManagementBasePackage
Classes | Functions | Variables
lsst.meas.modelfit.priors.priorsContinued Namespace Reference

Classes

class  SemiEmpiricalPrior
 
class  SoftenedLinearPrior
 

Functions

def fitMixture (data, nComponents, minFactor=0.25, maxFactor=4.0, nIterations=20, df=float("inf"))
 

Variables

 SemiEmpiricalPriorConfig = makeConfigClass(SemiEmpiricalPriorControl)
 
 SoftenedLinearPriorConfig = makeConfigClass(SoftenedLinearPriorControl)
 

Function Documentation

◆ fitMixture()

def lsst.meas.modelfit.priors.priorsContinued.fitMixture (   data,
  nComponents,
  minFactor = 0.25,
  maxFactor = 4.0,
  nIterations = 20,
  df = float("inf") 
)
Fit a ``Mixture`` distribution to a set of (e1, e2, r) data points,
returing a ``MixturePrior`` object.

Parameters
----------
data : numpy.ndarray
    array of data points to fit; shape=(N,3)
nComponents : int
    number of components in the mixture distribution
minFactor : float
    ellipticity variance of the smallest component in the initial mixture,
    relative to the measured variance
maxFactor : float
    ellipticity variance of the largest component in the initial mixture,
    relative to the measured variance
nIterations : int
    number of expectation-maximization update iterations
df : float
    number of degrees of freedom for component Student's T distributions
    (inf=Gaussian).

Definition at line 56 of file priorsContinued.py.

56  nIterations=20, df=float("inf")):
57  """Fit a ``Mixture`` distribution to a set of (e1, e2, r) data points,
58  returing a ``MixturePrior`` object.
59 
60  Parameters
61  ----------
62  data : numpy.ndarray
63  array of data points to fit; shape=(N,3)
64  nComponents : int
65  number of components in the mixture distribution
66  minFactor : float
67  ellipticity variance of the smallest component in the initial mixture,
68  relative to the measured variance
69  maxFactor : float
70  ellipticity variance of the largest component in the initial mixture,
71  relative to the measured variance
72  nIterations : int
73  number of expectation-maximization update iterations
74  df : float
75  number of degrees of freedom for component Student's T distributions
76  (inf=Gaussian).
77  """
78  components = Mixture.ComponentList()
79  rMu = data[:, 2].mean()
80  rSigma = data[:, 2].var()
81  eSigma = 0.5*(data[:, 0].var() + data[:, 1].var())
82  mu = np.array([0.0, 0.0, rMu], dtype=float)
83  baseSigma = np.array([[eSigma, 0.0, 0.0],
84  [0.0, eSigma, 0.0],
85  [0.0, 0.0, rSigma]])
86  for factor in np.linspace(minFactor, maxFactor, nComponents):
87  sigma = baseSigma.copy()
88  sigma[:2, :2] *= factor
89  components.append(Mixture.Component(1.0, mu, sigma))
90  mixture = Mixture(3, components, df)
91  restriction = MixturePrior.getUpdateRestriction()
92  for i in range(nIterations):
93  mixture.updateEM(data, restriction)
94  return mixture

Variable Documentation

◆ SemiEmpiricalPriorConfig

lsst.meas.modelfit.priors.priorsContinued.SemiEmpiricalPriorConfig = makeConfigClass(SemiEmpiricalPriorControl)

Definition at line 38 of file priorsContinued.py.

◆ SoftenedLinearPriorConfig

lsst.meas.modelfit.priors.priorsContinued.SoftenedLinearPriorConfig = makeConfigClass(SoftenedLinearPriorControl)

Definition at line 40 of file priorsContinued.py.