public abstract class AbstractFitsImageModel extends Object implements MultidimensionalDataModel
| Modifier and Type | Field and Description |
|---|---|
private double[] |
adu
The ADUs.
|
private double[] |
err
The errors of the measures, can be constructed from adus.
|
private Dimension |
size |
private Point2D |
upleft
An offset to the data, normally the upper left corner of the ADU window.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFitsImageModel(double[] fits,
Rectangle box)
We construct an abstract fit image model by providing the adus plus an
eventual readout window.
|
protected |
AbstractFitsImageModel(MImageHDU fits)
We construct an abstract fit image model by providing the adus plus an
eventual readout window.
|
protected |
AbstractFitsImageModel(MImageHDU fits,
Rectangle box)
We construct an abstract fit image model by providing the adus plus an
eventual readout window.
|
| Modifier and Type | Method and Description |
|---|---|
protected Pair<Vector3D,double[]> |
aboveBackground(double back,
double rms,
double sigma,
double gain)
All ADU not at least sigma times rms above back are set to zero,
from all others, the background is subtracted.
|
int |
dimension()
Returns one.
|
int |
dimensionOfIndependent()
Returns two.
|
boolean |
equalData(MultidimensionalDataModel mdm)
Two fits model have equal data if their adus are the same
|
private float[] |
floatModelData(VectorG[] model)
Returns the data as output from the modeling as a double array
|
Dimension |
getArea() |
float[] |
getFloatImageData()
Returns the image data as a float array
|
float[] |
getFloatImageDataErrors()
Returns the errors of the image data.
|
float[] |
getFloatImageModel(VectorG parameters)
Returns the image model
|
float[] |
getFloatImageResiduals(VectorG parameters)
Returns the image residuals
|
double[] |
getImageData()
Returns the image data
|
double[] |
getImageDataErrors()
Returns the errors of the image data.
|
double[] |
getImageModel(VectorG parameters)
Returns the image model
|
double[] |
getImageResiduals(VectorG parameters)
Returns the image residuals
|
int |
getMeasureCount()
The number of data points is equal to the array size of the dependant
variable array.
|
VectorG[] |
getMeasurementErrors()
If the errors were set, we return the error vector here.
|
VectorG[] |
getMeasures()
Returns the measures as an VectorG array.
|
Metric |
getMetric()
Per default we return the euclidean arc length metric.
|
VectorG[] |
getModel(VectorG a)
Returns the entire model by stepping through all measurement times.
|
VectorG[] |
getResiduals(VectorG a)
Returns the residuals of the measures to the data model.
|
double |
getRms(VectorG a)
Return the rms of the average of the residuals squared.
|
VectorG[] |
getTimes()
Returns the times the measurements were taken.
|
VectorG[] |
getTotalErrors()
Default implementation returns the total errors here.
|
protected Point2D |
getUpLeft() |
protected int[] |
getYX(VectorG time)
Back-conversion of 2d location into image array, y first.
|
private double[] |
modelData(VectorG[] model)
Returns the data as output from the modeling as a double array
|
double[] |
photonAndReadoutNoise(double gain,
double ron)
Estimates the ADU errors by providing the CCD gain and read-out noise.
|
void |
setAduErrors(double[] sig)
Sets the errors of the image data explicitly.
|
void |
subtract(double back)
Subtracts a background from all ADUs.
|
private VectorG[] |
vectorData(double[] data)
Converts adus or their errors to an array of one-dimensional vectors.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluateModel, getParameterCountprivate final double[] adu
private double[] err
private final Point2D upleft
private final Dimension size
protected AbstractFitsImageModel(MImageHDU fits) throws BasicFitsException
BasicFitsExceptionprotected AbstractFitsImageModel(MImageHDU fits, Rectangle box) throws BasicFitsException
BasicFitsExceptionprotected AbstractFitsImageModel(double[] fits,
Rectangle box)
protected Point2D getUpLeft()
public void setAduErrors(double[] sig)
photonAndReadoutNoise(double, double).public void subtract(double back)
protected Pair<Vector3D,double[]> aboveBackground(double back, double rms, double sigma, double gain)
public double[] photonAndReadoutNoise(double gain,
double ron)
#setAduErrors(double[][]).public VectorG[] getTimes()
MultidimensionalDataModel. It
is constructed from the index in the adus array
plus the upper left corner in the original image.
Each element returned is a 2 dimensional vector.getTimes in interface MultidimensionalDataModelprotected int[] getYX(VectorG time)
time - public VectorG[] getMeasures()
MultidimensionalDataModel.
It is constructed from the adus of the image, the index is constructed as
in the measurments.getMeasures in interface MultidimensionalDataModelgetTimes()public VectorG[] getMeasurementErrors()
getMeasurementErrors in interface MultidimensionalDataModelprivate double[] modelData(VectorG[] model)
model - private float[] floatModelData(VectorG[] model)
model - private VectorG[] vectorData(double[] data)
err2 - public VectorG[] getTotalErrors()
getTotalErrors in interface MultidimensionalDataModelpublic VectorG[] getModel(VectorG a)
getModel in interface MultidimensionalDataModelpublic VectorG[] getResiduals(VectorG a)
getMeasures() and getModel(math.VectorG) and returning the
difference between both.getResiduals in interface MultidimensionalDataModela - The model parameters, not necessarily the best fit.public double getRms(VectorG a)
public Dimension getArea()
public int getMeasureCount()
getMeasureCount in interface MultidimensionalDataModelpublic int dimension()
dimension in interface MultidimensionalDataModelpublic int dimensionOfIndependent()
dimensionOfIndependent in interface MultidimensionalDataModelpublic Metric getMetric()
getMetric in interface MultidimensionalDataModelpublic boolean equalData(MultidimensionalDataModel mdm)
public double[] getImageData()
public double[] getImageDataErrors()
public double[] getImageModel(VectorG parameters)
public double[] getImageResiduals(VectorG parameters)
public float[] getFloatImageData()
public float[] getFloatImageDataErrors()
public float[] getFloatImageModel(VectorG parameters)
public float[] getFloatImageResiduals(VectorG parameters)