public class SkyQualityModel extends AbstractDataModel implements QuickDesignMatrix
| Modifier and Type | Class and Description |
|---|---|
static class |
SkyQualityModel.QuickDM
Class to pre-calculate the design matrix for a stated number of
parameters and height validity zone.
|
AbstractDataModel.ChiSquare, AbstractDataModel.Lorentzian, AbstractDataModel.Robust| Modifier and Type | Field and Description |
|---|---|
private int |
box
Averaging box size, only needed for
QuickDesignMatrix. |
private static String |
DESIGN |
private static String |
EXT |
private int |
lmax
Maximum order of zonal harmonics.
|
private static String |
NAME |
private double |
xmax
Sine of maximum height.
|
private double |
xmin
Sine of minimum height.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SkyQualityModel() |
protected |
SkyQualityModel(double hmin,
double hmax) |
protected |
SkyQualityModel(double hmin,
double hmax,
int b) |
protected |
SkyQualityModel(VectorG[] azalt,
double[] sky,
double[] err)
Use factory methods to construct a sky quality model.
|
| Modifier and Type | Method and Description |
|---|---|
double |
evaluateModel(VectorG p,
VectorG azalt)
The ordering of the parameters must be such that at index 0 we have Y00,
then Y1-1, Y10, Y11; Y2-2, etc.
|
MImageHDU |
evaluateSkyImage(VectorG params) |
MImageHDU |
evaluateSkyImage(VectorG params,
AltAzFromFits aa)
Using the float data provided by
evaluateSkyModel(math.VectorG) we return
an ImageHDU ready to be writtn to a fits file. |
MImageHDU |
evaluateSkyImageResiduals(MImageHDU orgfits,
VectorG params,
AltAzFromFits aa) |
float[] |
evaluateSkyModel(VectorG params) |
float[] |
evaluateSkyModel(VectorG params,
AltAzFromFits aa)
Given the probably fitted model parameters (the parameters that are
the solution from the sky quality fit) we re-construct the original
sky-quality fits data in a rectangular area as returned as the fits
size in the provided projection (640x480 per default).
|
float[] |
evaluateSkyResiduals(float[] sqadu,
VectorG params,
AltAzFromFits aa)
Given the probably fitted model parameters (the parameters that are
the solution from the sky quality fit) we re-construct the original
sky-quality fits data in a rectangular area as returned as the fits
size in the provided projection (640x480 per default).
|
double[][] |
getDesignMatrix()
We try to locate a resource file
|
double |
getHeightMax()
Sets the maximum height the fit should operate on, normally 90 degrees.
|
double |
getHeightMin()
Minimum height the fit should be applied for.
|
private String |
getId()
Returns the maximum l, the height
zone and the averaging box size as a string-part for an resource name.
|
int |
getLmax() |
String |
getName()
Returns a resource name that identifies the maximum l, the height
zone and the averaging box size.
|
int |
getParameterCount()
The number of parameters is given by the maximum degree lmax.
|
String |
getPrecalculatedResourceName()
Returns a resource name that could provide a serialized version of
the design matrix.
|
static SkyQualityModel |
getSkyQualityModel(float[] adu,
LayoutImpl size,
int box,
float validmin,
double hmin,
double hmax,
AltAzFromFits azalt) |
static SkyQualityModel |
getSkyQualityModel(MFits avisa,
int box,
float validmin)
Takes a fits file of the sky quality, an averaging box size, and a
minimum sky quality value to be considered valid and return a sky model.
|
static SkyQualityModel |
getSkyQualityModel(MImageHDU avisa,
int box,
float validmin) |
static SkyQualityModel |
getSkyQualityModel(MImageHDU avisa,
int box,
float validmin,
double hmin,
double hmax,
AltAzFromFits azalt) |
private boolean |
inside(VectorG azalt) |
protected void |
setHeightMax(double hmax)
Sets the maximum zenith distance the fit should operate on, normally 90
degrees.
|
protected void |
setHeightMin(double hmin)
Sets the minimum height the fit should be applied for.
|
void |
setLmax(int lmax)
Sets the degree of the highest spherical harmonics (zonal for the upper
hemisphere) used in the model.
|
clip, getChi2, getChi2, getChiSquareModel, getChiSquareModel, getComponent, getFixParameters, getFixParameters, getLorentzianModel, getLorentzianSolving, getMeasureCount, getMeasurementErrors, getMeasurementTimes, getMeasures, getModel, getModel, getResiduals, getResiduals, getRms, getRms, getRobustModel, getRobustSolving, getSimplexSolving, getTimeOffset, getTimes, getTotalErrors, setMeasures, setTimes, setTotalErrorsprivate static final String EXT
private static final String DESIGN
private static final String NAME
private int lmax
private double xmin
private double xmax
private int box
QuickDesignMatrix.protected SkyQualityModel(VectorG[] azalt, double[] sky, double[] err)
azalt - All azimuth and altitude, where sky quality existssky - All sky-quality pixel values.err - Currently null as no error information providedprotected SkyQualityModel()
protected SkyQualityModel(double hmin,
double hmax)
protected SkyQualityModel(double hmin,
double hmax,
int b)
public String getPrecalculatedResourceName()
public String getName()
private String getId()
public double[][] getDesignMatrix()
getDesignMatrix in interface QuickDesignMatrixpublic int getLmax()
public void setLmax(int lmax)
lmax - the the highest degree to which Ylm are used.public double getHeightMax()
protected void setHeightMax(double hmax)
zmax - the zmax to set in degreespublic double getHeightMin()
protected void setHeightMin(double hmin)
zmin - the zmin to set in degreespublic double evaluateModel(VectorG p, VectorG azalt)
evaluateModel in interface DataModelpublic int getParameterCount()
getParameterCount in interface DataModelpublic MImageHDU evaluateSkyImage(VectorG params) throws BasicFitsException
BasicFitsExceptionpublic MImageHDU evaluateSkyImage(VectorG params, AltAzFromFits aa) throws BasicFitsException
evaluateSkyModel(math.VectorG) we return
an ImageHDU ready to be writtn to a fits file.params - aa - BasicFitsExceptionFitsExceptionpublic MImageHDU evaluateSkyImageResiduals(MImageHDU orgfits, VectorG params, AltAzFromFits aa) throws BasicFitsException
BasicFitsExceptionpublic float[] evaluateSkyModel(VectorG params)
public float[] evaluateSkyModel(VectorG params, AltAzFromFits aa)
params - aa - public float[] evaluateSkyResiduals(float[] sqadu,
VectorG params,
AltAzFromFits aa)
params - aa - private boolean inside(VectorG azalt)
public static SkyQualityModel getSkyQualityModel(MFits avisa, int box, float validmin) throws BasicFitsException, IOException
avisa - box - validmin - FitsExceptionIOExceptionBasicFitsExceptionpublic static SkyQualityModel getSkyQualityModel(MImageHDU avisa, int box, float validmin) throws BasicFitsException
BasicFitsExceptionpublic static SkyQualityModel getSkyQualityModel(MImageHDU avisa, int box, float validmin, double hmin, double hmax, AltAzFromFits azalt) throws BasicFitsException
BasicFitsExceptionpublic static SkyQualityModel getSkyQualityModel(float[] adu, LayoutImpl size, int box, float validmin, double hmin, double hmax, AltAzFromFits azalt)