public class WcsFit extends PropertyContainer
WcsProjection that
minimizes the differences from the projected pixel pairs to the catalog
pairs. The matching, i.e. ensuring that pixel pair at index n correponds to
the catalog position a t n, must be performed on the outside, calling
setMatches(math.VectorG[], math.VectorG[]) throws an IllegalArgumentException, if the two arrays are
not of corresponding size.| Modifier and Type | Class and Description |
|---|---|
static class |
WcsFit.Linear
We solve for a wcs, reading the pixel pairs and the matched catalog from
an ascii file.
|
static class |
WcsFit.Minimization
Three different minimization functions, increasing in robustness.
|
private static class |
WcsFit.Parser |
static class |
WcsFit.Polynomial
We solve for a wcs, reading the pixel pairs and the matched catalog from
an ascii file.
|
static class |
WcsFit.PositionExchange
To check if the uncertainty in the WCS determination is from the
sextractor positions, we take the IRAF positions as input for the wcs
fitter.
|
static class |
WcsFit.Residual
This class tries to fit the residuals on command the command line
|
static class |
WcsFit.SigmaMaps
Takes a valid WCS from a file plus a matched file and outputs the sigma
maps.
|
static class |
WcsFit.Stepper
We solve for a wcs, reading the pixel pairs and the matched catalog from
an ascii file.
|
static class |
WcsFit.Tnx
We solve for a wcs, reading the pixel pairs and the matched catalog from
an ascii file.
|
static class |
WcsFit.Variable
We solve for a wcs, reading the pixel pairs and the matched catalog from
an ascii file.
|
static class |
WcsFit.Zpn
We solve for a wcs, reading the pixel pairs and the matched catalog from
an ascii file.
|
| Modifier and Type | Field and Description |
|---|---|
private static String |
AUX |
private VectorG[] |
catalog
The model uses these catalog positions to the stars in the image.
|
private static double |
DEFRESTARTSCALE
Default property value.
|
private static double |
DEFTOLERANCE
Default property value.
|
static String |
KEY_RESTARTSCALE
Muliplier in simplex size on restart.
|
static String |
KEY_TOLERANCE
Muliplier in simplex tolerance.
|
private WcsModel |
model
The wcs model we are using.
|
private VectorG[] |
pixel
The model uses these pixel as the identified location of stars.
|
private WcsProjection |
projection
The model is composed with this projection.
|
private VectorG |
solution
After solving, this is the result.
|
private static String |
WIFSIP |
private static String |
WIFSIPOLD |
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
WcsFit(Map<String,String> prop)
Constructs a WCS regression analyser.
|
| Modifier and Type | Method and Description |
|---|---|
private VectorG |
amoebaSolve(VectorG start,
VectorG len,
WcsFit.Minimization how)
We solve with an Amoeba and return the result.
|
private static void |
around(FitsHeader layout,
float[] adu,
int x0,
int y0,
int box,
float v) |
int |
clip(int maxreject,
double sigma)
After solving, this method rejects up to the maximum stated number of
measures that are outside the specified RMS-range.
|
int |
clip(int maxreject,
VectorG rms)
After solving, this method rejects up to the maximum stated number of
measures that are outside the specified RMS-range.
|
private static MFits |
createSigma(WcsFit fit)
Save three sigma plots.
|
private static MFits |
createSigma(WcsFit fit,
Dimension size,
int comp,
int blowup)
Save three sigma plots.
|
double |
getRms()
Returns the rms of the fitted model to the model data.
|
WcsModel |
getWcsModel()
Returns the WCS-model used for fitting the coordinate systems.
|
VectorG |
improve(VectorG start)
We try to solve the WCS with Levenberg Marquardt.
|
private static VectorG[] |
linkMatched(File iraf,
File sex,
double pix)
Helper method that links an IRAF-output match containing CCD positions,
ra and dec, but no magnitude to a daofind-like output provided by
sextractor.
|
VectorG |
prepareFit(MHeader h)
From a fits header we try to deduce our starting conditions for fitting
the WCS model.
|
private static VectorG[][] |
readIraf(File f)
Helper method that reads an ascii-file into an ra/de vectorG array and a
vectorG array of pixel x/y.
|
private static VectorG[][] |
readMatched(File f)
Helper method that reads an ascii-file into an ra/de vectorG array and a
vectorG array of pixel x/y.
|
private static void |
saveSigma(WcsFit fit) |
void |
setMatches(VectorG[] xy,
VectorG[] rade)
Sets the matched pixel position and the corresponding catalog entries.
|
void |
setWcsProjection(WcsProjection wcs)
Sets the WCSprojection we use for fitting our model.
|
private MImageHDU |
sigmaImage(Multidimensional sigma,
Dimension box,
int compress,
int blowup)
We take the residuals to the solution and return an sigma-fits from them.
|
VectorG |
solve(VectorG start)
We try to solve for the WCS with a chi-2 model.
|
VectorG |
solve(VectorG start,
WcsFit.Minimization how)
We try to solve for the WCS.
|
augment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringpublic static final String KEY_RESTARTSCALE
public static final String KEY_TOLERANCE
private static final double DEFRESTARTSCALE
private static final double DEFTOLERANCE
private WcsModel model
private WcsProjection projection
private VectorG[] pixel
private VectorG[] catalog
private VectorG solution
private static final String WIFSIP
private static final String WIFSIPOLD
private static final String AUX
public WcsModel getWcsModel()
public void setWcsProjection(WcsProjection wcs)
getWcsModel().public void setMatches(VectorG[] xy, VectorG[] rade)
public VectorG prepareFit(MHeader h) throws HeaderException
HeaderExceptionpublic VectorG solve(VectorG start, WcsFit.Minimization how)
private VectorG amoebaSolve(VectorG start, VectorG len, WcsFit.Minimization how)
public double getRms()
public int clip(int maxreject,
double sigma)
maxreject - Maximum number of measures to reject, zero for no boundrms - The RMS of the current solution is multiplied with this vector
and returns the maximum residual per coordinatepublic int clip(int maxreject,
VectorG rms)
maxreject - Maximum number of measures to reject, zero for no boundrms - The RMS of the current solution is multiplied with this
vector2D and returns the maximum residual per coordinateprivate MImageHDU sigmaImage(Multidimensional sigma, Dimension box, int compress, int blowup) throws BasicFitsException
BasicFitsExceptionprivate static void around(FitsHeader layout, float[] adu, int x0, int y0, int box, float v)
private static final VectorG[] linkMatched(File iraf, File sex, double pix)
pix - maximum allowed pixel tolerance, >1.private static final VectorG[][] readMatched(File f)
private static final VectorG[][] readIraf(File f)
private static MFits createSigma(WcsFit fit, Dimension size, int comp, int blowup) throws BasicFitsException
BasicFitsExceptionprivate static MFits createSigma(WcsFit fit) throws BasicFitsException
BasicFitsExceptionprivate static void saveSigma(WcsFit fit) throws BasicFitsException, IOException
BasicFitsExceptionIOException