|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
astro.WcsFit
public class WcsFit
Tries to fit pixels pairs in a fits image to a 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(vec_math.VectorG[], vec_math.VectorG[]) throws an IllegalArgumentException, if the two arrays
are not of corresponding size.
| Nested Class Summary | |
|---|---|
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.Variable
We solve for a wcs, reading the pixel pairs and the matched catalog from an ascii file. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
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
|
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
WcsFit(Map<String,String> prop)
Constructs a WCS regression analyser. |
|
| Method Summary | |
|---|---|
private VectorG |
amoebaSolve(VectorG start,
VectorG len,
WcsFit.Minimization how)
We solve with an Amoeba and return the result. |
private static void |
around(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 nom.tam.fits.Fits |
createSigma(WcsFit fit)
Save three sigma plots. |
private static nom.tam.fits.Fits |
createSigma(WcsFit fit,
Dimension size,
int comp,
int blowup)
Save three sigma plots. |
private static nom.tam.fits.BasicHDU |
extractImageHDU(File fits)
From a file, we extract the first image header (with two axes). |
private static nom.tam.fits.Header |
extractImageHeader(File fits)
From a file, we extract the first image header (with two axes). |
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. |
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(nom.tam.fits.Header 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 nom.tam.fits.ImageHDU |
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. |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, 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, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Methods inherited from interface util.Initializable |
|---|
init |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public WcsFit(Map<String,String> prop)
| Method Detail |
|---|
public WcsModel getWcsModel()
public void setWcsProjection(WcsProjection wcs)
getWcsModel().
public void setMatches(VectorG[] xy,
VectorG[] rade)
public VectorG prepareFit(nom.tam.fits.Header h)
throws nom.tam.fits.HeaderCardException
nom.tam.fits.HeaderCardExceptionpublic VectorG solve(VectorG start)
public 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 coordinate
public 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 coordinate
private nom.tam.fits.ImageHDU sigmaImage(Multidimensional sigma,
Dimension box,
int compress,
int blowup)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static void around(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 nom.tam.fits.BasicHDU extractImageHDU(File fits)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static nom.tam.fits.Header extractImageHeader(File fits)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static nom.tam.fits.Fits createSigma(WcsFit fit)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static nom.tam.fits.Fits createSigma(WcsFit fit,
Dimension size,
int comp,
int blowup)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
private static void saveSigma(WcsFit fit)
throws nom.tam.fits.FitsException,
IOException
nom.tam.fits.FitsException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||