public class OrbitModel extends AbstractGradientModel
v_r=v_0+e·K*cos(ω)+K*cos(ω+ν),where v_0 is the baricentric velocity of the system, K is the radial velocity amplitude, e is the excentricity of the system, ω is the argument of perihelion, and ν is the true anomaly. From the eccentricity and the eccentric anomaly, the true anomaly follows as
tan(ν/2) = sqrt((1+e)/(1-e))·tan(E/2)From the time of perihelion passage, the orbital period, and the numeric eccentricity from the orbit, get the excentric anomaly for the current time. Solve Kepler's equation
M=2π/P·(t-t0)=E-e·sin(E)which is done iteratively.
For calculating the quadrature of an orbit, saee the special class.
| Modifier and Type | Class and Description |
|---|---|
static class |
OrbitModel.Anomaly
Calculates excentric and true anomaly given M and e.
|
static class |
OrbitModel.Calculate
Supply the orbit parameters t0, P, e, omega, K1 and vB to the command
line to get the orbit solution for the specified time.
|
static class |
OrbitModel.Hss348
Orbital elements from RV solution for HSS 348.
|
static class |
OrbitModel.Orbit
Supply the orbit parameters t0, P, e, omega, K1 and vB to the command
line to get the orbit solution for the specified time.
|
static class |
OrbitModel.Quadrature
Calculates the phases of quadrature, defined as ν=±90, or, if a
second argument is given, which is then the argument of periastron, as
the times of maximum rv, which follows from the defintion of rv to
|
static class |
OrbitModel.Test
For testing.
|
AbstractDataModel.ChiSquare, AbstractDataModel.Lorentzian, AbstractDataModel.Robust| Modifier and Type | Field and Description |
|---|---|
private static double |
ACCURACY
Accuracy to reach in Kepler's equation.
|
private double |
erradd |
private static int |
ITERMAX
Maximum number of iterations, log_2(2/ACCURACY).
|
| Constructor and Description |
|---|
OrbitModel(VectorG[] times,
double[] y,
double[] err,
double off)
Measures at differnt point-in-time.
|
| Modifier and Type | Method and Description |
|---|---|
double |
evaluateModel(VectorG a,
VectorG t)
The model that fits an SB-1 orbit is given by
|
VectorG |
evaluateModelGradient(VectorG a,
VectorG t) |
static double |
getEccentricAnomaly(double m,
double e)
From the normal anomaly M and the excentricity e, we solve Kepler's
equation
|
static double |
getEccentricAnomaly(double t,
double t0,
double p,
double e)
From the time of perihelion passage, the orbital period, and the numeric
eccentricity from the orbit, get the excentric anomaly for the current
time.
|
static double |
getEccentricAnomalyInverse(double nu,
double e) |
VectorG |
getGradientAtMeasure(int row,
VectorG a) |
MyMatrix |
getGradientMatrix(VectorG a)
This is the derivative matrix of the orbital solution with respect to the
parameters.
|
static double |
getMeanAnomalyInverse(double nu,
double e) |
double[] |
getMeasurementErrors()
If we had an external error, we subtract it again.
|
double[] |
getModel(VectorG a)
The model that fits an SB-1 orbit is given by
|
private static double |
getOrbitSolution(double t,
VectorG a)
Calculates the orbit rv for the given time and the specified parameter
set.
|
int |
getParameterCount()
An orbit has six parameters, namely at indices:
0: The
perihelium time, in the units of our time, like JD.
1:
The orbital period, in our time units (e.g.
|
static double |
getTrueAnomaly(double e,
double exan)
From the eccentricity and the eccentric anomaly return the true anomaly.
|
check, check, getCovarianceForSolution, getCovarianceForSolution, getFixParameters, getFixParameters, getNegativeChi2HalfGradient, getNegativeChi2HalfGradient, getPseudoHessian, getPseudoHessian, LevenbergMarquardtSolverclip, getChi2, getChi2, getChiSquareModel, getChiSquareModel, getComponent, getFixParameters, getFixParameters, getLorentzianModel, getLorentzianSolving, getMeasureCount, getMeasurementTimes, getMeasures, getModel, getResiduals, getResiduals, getRms, getRms, getRobustModel, getRobustSolving, getSimplexSolving, getTimeOffset, getTimes, getTotalErrors, setMeasures, setTimes, setTotalErrorsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMeasureCount, getMeasures, getResiduals, getTimeOffset, getTimes, getTotalErrorsgetChiSquareModelprivate static double ACCURACY
private static int ITERMAX
private final double erradd
public OrbitModel(VectorG[] times, double[] y, double[] err, double off)
times - The times of the measure, a Vector1D array.y - The measurements of radial velocity.err - The errors of the measurements.public int getParameterCount()
public double[] getMeasurementErrors()
getMeasurementErrors in interface DataModelgetMeasurementErrors in class AbstractDataModelpublic double[] getModel(VectorG a)
v_r=v_0+e·K*cos(ω)+K*cos(ω+ν),where v_0 is the baricentric velocity of the system, K is the radial velocity amplitude, e is the excentricity of the system, ω is the argument of perihelion, and ν is the true anomaly.
getModel in interface DataModelgetModel in class AbstractDataModelgetParameterCountpublic double evaluateModel(VectorG a, VectorG t)
v_r=v_0+e·K*cos(ω)+K*cos(ω+ν),where v_0 is the baricentric velocity of the system, K is the radial velocity amplitude, e is the excentricity of the system, ω is the argument of perihelion, and ν is the true anomaly.
a - The fitted parametert - Only the zero'th component is used, this is the jd.getParameterCountprivate static double getOrbitSolution(double t,
VectorG a)
t - The time, same units as in the modela - The orbit model parameters, see getParameterCount() for
order.public MyMatrix getGradientMatrix(VectorG a)
Let v_nu be the partial derivative of vr with respect to ν
v_nu = -K*sin(&omega+&nu);Then, calling E the excentric anomaly, 2π/P*(t-t_0)=E-e·sinE, the respective gradients columns are:
public static final double getMeanAnomalyInverse(double nu,
double e)
nu - true anomaly in radianse - the numeric excentricitypublic static final double getEccentricAnomalyInverse(double nu,
double e)
nu - true anomaly in radianse - the numeric excentricitypublic static final double getEccentricAnomaly(double t,
double t0,
double p,
double e)
M=2π/P·(t-t0)=E-e·sin(E)with Newton's method. If that does not converge, we can trap a solution between M+1 and M-1 and bisector from there.
public static final double getEccentricAnomaly(double m,
double e)
M = E-e·sin(E)with Newton's method. If that does not converge, we can trap a solution between M+1 and M-1 and bisector from there.
public static final double getTrueAnomaly(double e,
double exan)
tan(ν/2) = sqrt((1+e)/(1-e))·tan(E/2)