LSST Applications g1653933729+a8ce1bb630,g171997e3ee+76e92115be,g1a997c3884+a8ce1bb630,g28da252d5a+4013ff5194,g2bbee38e9b+d6d0f9f6ae,g2bc492864f+d6d0f9f6ae,g2cdde0e794+ccb74358b7,g3156d2b45e+07302053f8,g347aa1857d+d6d0f9f6ae,g35bb328faa+a8ce1bb630,g3a166c0a6a+d6d0f9f6ae,g3e281a1b8c+130fae20e3,g4005a62e65+17cd334064,g414038480c+c9f68e2a12,g41af890bb2+3e1f62f438,g4e1a3235cc+9db7d56ad0,g7b55021d1b+7b623691d5,g80478fca09+334cc8d2bd,g82479be7b0+b568f6b267,g858d7b2824+37b39d8760,g9125e01d80+a8ce1bb630,ga5288a1d22+11cb34fefe,gae0086650b+a8ce1bb630,gb4ec7eb0ab+37b39d8760,gb58c049af0+d64f4d3760,gc081298178+284e133171,gc28159a63d+d6d0f9f6ae,gcf0d15dbbd+00fe2e0b07,gd6b7c0dfd1+8b62435e69,gda3e153d99+37b39d8760,gda6a2b7d83+00fe2e0b07,gdaeeff99f8+1711a396fd,gdd5a9049c5+23f3b3239a,ge2409df99d+5d9f551a54,ge33fd446bb+37b39d8760,ge79ae78c31+d6d0f9f6ae,gf0baf85859+2dea8344a2,gf5289d68f6+3777f3df5e,w.2024.41
LSST Data Management Base Package
Loading...
Searching...
No Matches
Classes | Functions | Variables
lsst.meas.modelfit.priors.priorsContinued Namespace Reference

Classes

class  SemiEmpiricalPrior
 
class  SoftenedLinearPrior
 

Functions

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

Variables

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

Function Documentation

◆ fitMixture()

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 54 of file priorsContinued.py.

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

Variable Documentation

◆ SemiEmpiricalPriorConfig

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

Definition at line 37 of file priorsContinued.py.

◆ SoftenedLinearPriorConfig

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

Definition at line 39 of file priorsContinued.py.