public class TwoFibreFixedPropWatsonFitter extends MarquardtMinimiser
Constructor and Description |
---|
TwoFibreFixedPropWatsonFitter(Vector3D[] axes,
double prop) |
Modifier and Type | Method and Description |
---|---|
void |
fitEstimatedParams(Vector3D mu1,
Vector3D mu2,
double innerCone1,
double outerCone1,
double innerCone2,
double outerCone2,
double initK1,
double initK2,
int attemptsOnCone)
Make estimates of the initial parameters and attempt a minimisation with each.
|
void |
fitEstimatedParams(Vector3D mu1,
Vector3D mu2,
int attemptsOnCone)
Two cones are defined for each mean axis, centered on the mean axis.
|
WatsonDistribution[] |
getDistributions() |
WatsonDistribution[] |
getDistributions(java.util.Random r) |
double[] |
getKappas() |
double |
getMixingParameter() |
Vector3D[] |
getMus() |
double[] |
getParameters()
Returns the values of the parameters.
|
static void |
main(java.lang.String[] args) |
void |
setFixedParams(boolean[] ai) |
void |
setInitParams(double[] aInit)
Sets the initial values of the parameters.
|
void |
setInitParams(Vector3D mu1,
Vector3D mu2,
double k1,
double k2)
Set an initial estimate of the parameters.
|
void |
setKappa1Variable(boolean variable) |
void |
setKappa2Variable(boolean variable) |
void |
setMu1Variable(boolean variable) |
void |
setMu2Variable(boolean variable) |
getCONVERGETHRESH, getFObjVal, minimise, setConvergence, setCONVERGETHRESH, setMAXITER
public TwoFibreFixedPropWatsonFitter(Vector3D[] axes, double prop)
public WatsonDistribution[] getDistributions()
public WatsonDistribution[] getDistributions(java.util.Random r)
public Vector3D[] getMus()
public double getMixingParameter()
public double[] getKappas()
public void setInitParams(double[] aInit) throws MarquardtMinimiserException
setInitParams
in class MarquardtMinimiser
aInit
- Array containing the new parameter values starting
from index 0: {theta1, phi1, kappa1, theta2, phi2, kappa2}. (theta, phi) are the spherical
polar coordinates of the mean axes of the distributions.MarquardtMinimiserException
public void setInitParams(Vector3D mu1, Vector3D mu2, double k1, double k2) throws MarquardtMinimiserException
MarquardtMinimiserException
public void fitEstimatedParams(Vector3D mu1, Vector3D mu2, double innerCone1, double outerCone1, double innerCone2, double outerCone2, double initK1, double initK2, int attemptsOnCone) throws MarquardtMinimiserException
Two cones are defined for each mean axis, centered on the mean axis. The fitter will attempt a minimization with the mean axes oriented on the radius of each of the cones.
attemptsOnCone
- the number of sets of parameters to try on the inner and outer cone.MarquardtMinimiserException
public void fitEstimatedParams(Vector3D mu1, Vector3D mu2, int attemptsOnCone) throws MarquardtMinimiserException
This method attmempts to guess the initial values of kappa, and the semi-angle of the cones. The cone radii come from the spherical standard error of the mean axes when the vectors are sorted into two separate distributions (the vectors are sorted to maximise concentration about mu1 and mu2).
mu1
- an estimate of the first principal axis.mu2
- an estimate of the second principal axis.attemptsOnCone
- the number of mean axes to try one each cone. Starting points will be distributed equally around the radius of the cone.MarquardtMinimiserException
public double[] getParameters()
MarquardtMinimiser
getParameters
in class MarquardtMinimiser
public void setFixedParams(boolean[] ai)
ai
- an array of boolean. Parameter i is fixed if ai[i] == false.public void setMu1Variable(boolean variable)
variable
- true if the principal axis mu1 is to be variable (default is variable)public void setMu2Variable(boolean variable)
variable
- true if the principal axis mu2 is to be variable (default is variable)public void setKappa1Variable(boolean variable)
variable
- true if kappa1 is to be variable (default is variable)public void setKappa2Variable(boolean variable)
variable
- true if kappa2 is to be variable (default is variable)public static void main(java.lang.String[] args)