|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.util.FocusSpindleFit
public class FocusSpindleFit
This class allows the determination of the ellipticity of the focus spindel or the focus sledge used on STELLA-1/STELLA-2. We assume that the position on the CCD (x,y) can be described by a tilted ellipse, describing the polar angle as a linear function of the focus position, plus drifts in the x/y direction. The following formulars apply:
φ=φ_0+2π·focus%leadWith θ_0 being the tilt angle of the ellipse to the x/y direction, focus is the focus position in whatever units, while the lead is the distance the focus has to travel for a full rotation. In STELLA-1, the focus spindle has a flank lead of 5mm, such that we asume this value.
r=a*e/sqrt(1-e^2·cos^2(2φ)
x=r*cos(θ_0+φ)+v_x*focus+x_0
y=r*sin(θ_0+φ)+v_y*focus+y_0
The process then boils down to fitting the 8 (9 if lead is also unknown) parameters x_0, y_0, v_x, v_y, θ_0, φ_0, and a and e of the ellipse. This is a nonlinear problem, thus we use an amoeba.
| Nested Class Summary | |
|---|---|
private class |
FocusSpindleFit.AbstractPosition
|
private class |
FocusSpindleFit.CorkScrew
Full model, including a cork-screw like dependency. |
private class |
FocusSpindleFit.Drift
Simple model, center plus linear drift. |
static interface |
FocusSpindleFit.PositionModel
|
static class |
FocusSpindleFit.Ses
This solves for SES firecam-fits taken with thar-lamp on and using the linear slider. |
static class |
FocusSpindleFit.Wifsip
This solves for Wifsip focus sequences. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private List<Point2D> |
ccd
The list of pixels on the CCD. |
private static int |
DEFREJECT
Default rejection number. |
private List<Double> |
focus
The measured focus positions, at the same index as ccd positions. |
static String |
KEY_FLANKLEAD
If this parameter is set, we fix the lead and solve for one par. |
static String |
KEY_MODEL
The class name for the model |
static String |
KEY_REJECT
Default rejection number. |
private FocusSpindleFit.PositionModel |
model
The model for the measures. |
| 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 | |
|---|---|
FocusSpindleFit(Map<String,String> prop)
No defaults. |
|
| Method Summary | |
|---|---|
boolean |
addHdu(double fpos,
nom.tam.fits.ImageHDU img,
Rectangle window,
double sigfac,
boolean invert)
From an Image HDU, we extract an area around the given center, estimate the background by the mode, then do a CoG on all pixel that are at least the specified number of sigmas above the background. |
int |
addMeasure(Point2D xy,
double f)
Adds a measure, consisting of the focus position in arbitrary units and of a CCD position in pixel. |
int |
getMeasureCount()
Returns the current number of measures. |
List<Point2D> |
getModel(VectorG solution)
Returns the model on the same focus positions as the measures. |
double[] |
getResiduals(VectorG solution)
Returns the distance between measurement and model in pixel. |
double |
getRms(VectorG solution)
Returns the rms of the fitted model to the model data. |
void |
init()
Loads URL-resources, if there are any. |
VectorG |
solve()
We try to solve for the spindle model. |
| 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, 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 |
| Field Detail |
|---|
public static final String KEY_FLANKLEAD
public static final String KEY_REJECT
public static final String KEY_MODEL
private static final int DEFREJECT
private List<Point2D> ccd
private List<Double> focus
private FocusSpindleFit.PositionModel model
| Constructor Detail |
|---|
public FocusSpindleFit(Map<String,String> prop)
| Method Detail |
|---|
public void init()
PropertyResources
init in interface Initializableinit in class PropertyResources
public int addMeasure(Point2D xy,
double f)
public int getMeasureCount()
public VectorG solve()
public List<Point2D> getModel(VectorG solution)
public double getRms(VectorG solution)
public double[] getResiduals(VectorG solution)
solution - The model parameters, not necessarily the best fit.
public boolean addHdu(double fpos,
nom.tam.fits.ImageHDU img,
Rectangle window,
double sigfac,
boolean invert)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||