vec_math
Interface DataModel

All Known Subinterfaces:
AbstractPinholeModel.PinholeModel, GradientModel
All Known Implementing Classes:
AbstractDataModel, AbstractGradientModel, AveragePinhole.FullPinhole, ExpressionFit.AmoebaModel, Gl586.GlieseModel, Gl586.HaloModel, HarmonicFit.HarmonicModel, LevenbergMarquardt.LMSineModel, LevenbergMarquardt.SinusModel, ModelDrift.PinholeDrift, ModelShift.PinholeModel, MultipleFrequencyFit.FourierComponents, OrbitModel, Overscan.WifsipOverscan, PhaseRegression.PhaseModel, PointingModel.PointingDataModel

public interface DataModel

A data model evaluates a data model for all measurements x for given model parameters. If used with a chi-square multidimensional, general minimization can solve for the model parameters.


Method Summary
 double evaluateModel(VectorG parameters, VectorG t)
          Evaluates the data model on a single point in the independant parameter space, normally the time.
 int getMeasureCount()
          Return the number of measurements in the data model.
 double[] getMeasurementErrors()
          Returns the measurement errors without systematic errors of the measurements or null if unknown.
 double[] getMeasures()
          Returns the measurements ('y') as a single vector.
 double[] getModel(VectorG parameters)
          Returns model data for the given set of model parameters.
 int getParameterCount()
          The number of model parameters should be less than the number of data points in the model, otherwise you fit a underdetermined problem.
 double[] getResiduals(VectorG a)
          Returns the residuals of the measures to the data model.
 VectorG[] getTimes()
          Returns the 'times' of the measurements ('x') as an array of vectors.
 double[] getTotalErrors()
          Returns the total errors including systematic errors of the measurements or null if unknown.
 

Method Detail

evaluateModel

double evaluateModel(VectorG parameters,
                     VectorG t)
Evaluates the data model on a single point in the independant parameter space, normally the time. Note that the model can be evaluated also at times not identically to the measurement times.

Parameters:
parameters - The model parameters
t - The (one)dimensional vector of independant variables.

getModel

double[] getModel(VectorG parameters)
Returns model data for the given set of model parameters. This method is identical to calling evaluateModel(vec_math.VectorG, vec_math.VectorG) with all times available in the second argument. Note that the dimension of the vector returned is the same as the #getPointCount method and will differ from the input dimension, which is normally smaller than the number of data points.

Parameters:
parameters - The model parameters
Returns:
A model for the data points depending on the model parameters.

getResiduals

double[] getResiduals(VectorG a)
Returns the residuals of the measures to the data model. This equals calling getMeasures() and getModel(vec_math.VectorG) and returning the difference between both.

Parameters:
a - The model parameters, not necessarily the best fit.

getMeasures

double[] getMeasures()
Returns the measurements ('y') as a single vector. Strictly speaking, this returns the vector of all dependant measures. Its dimension equals the number of individual measures, getMeasureCount().


getTimes

VectorG[] getTimes()
Returns the 'times' of the measurements ('x') as an array of vectors. In many cases, this will be an array of 1-dimensional vectors, if the time is the only independant parameter. More general, this returns for each measurement (which is the index in the vector array) the value of all independant varaibles (which are packed together in a vector).

Returns:
An array of dimension getMeasureCount().

getTotalErrors

double[] getTotalErrors()
Returns the total errors including systematic errors of the measurements or null if unknown.


getMeasurementErrors

double[] getMeasurementErrors()
Returns the measurement errors without systematic errors of the measurements or null if unknown.


getParameterCount

int getParameterCount()
The number of model parameters should be less than the number of data points in the model, otherwise you fit a underdetermined problem.

Returns:
The number of parameters in the model. This equals the dimension of the input vector in getModel(vec_math.VectorG).

getMeasureCount

int getMeasureCount()
Return the number of measurements in the data model. The number of model parameters should be less than the number of data points in the model, otherwise you fit a underdetermined problem.

Returns:
The number of measurements in the data model. This equals the dimension of the return vector in getModel(vec_math.VectorG).