|
||||||||||
| 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.parameter.AbstractParameter
stella.parameter.AbstractTargetParameter
stella.parameter.AbstractTargetValue
stella.parameter.AbstractFitsMomentsValue
stella.parameter.FocusMeasure
public class FocusMeasure
We measure the focus by maximizing a central moment of the image fits. This is done in the following way:
CentralFocus, ExtraFocal and IntraFocal,
we get the central normalized moment of order KEY_FOCUSORDER
plus the current focus and fit a parabola into these three values,
the true focus being the maximum of the fitting parabola.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static int |
DEFFOCUSORDER
Default order is kurtosis. |
private static String |
DEFFOCUSPOSITION
Default property value. |
private static double |
DEFRISE
Default we should rise at least for 1000. |
private VectorG |
extrafocal
The focus position to the fits moments, extrafocale. |
private Value |
focus
The parameter that delivers current sky brightness. |
private VectorG |
infocus
The focus position to the fits moments, at estimated focus. |
private VectorG |
intrafocal
The focus position to the fits moments, intrafocale. |
static String |
KEY_FOCUSORDER
This key links to the moment we use for focus measure. |
static String |
KEY_FOCUSPOSITION
The name of the parameter that delivers the current focus position. |
static String |
KEY_RISE
The default minimum rise of the parabola against extra/intrafocal. |
| Fields inherited from class stella.parameter.AbstractFitsMomentsValue |
|---|
KEY_FITSMOMENTS |
| Fields inherited from class stella.parameter.AbstractTargetParameter |
|---|
KEY_INDEX |
| Fields inherited from class stella.parameter.AbstractParameter |
|---|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN |
| 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 stella.ErrorDependingParameter |
|---|
NAMING_EXTENSION |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
FocusMeasure(Map<String,String> prop)
Construction of the flat exposure time calculator. |
|
| Method Summary | |
|---|---|
private VectorG |
extractMoments(Value f,
int order)
We calculate an exposure time from the light sensor. |
private static Double |
getFocus(VectorG in,
VectorG out,
VectorG here,
double up)
Using the flat-field filter name and the fits moments, we estimate the best exposure time by using the average of the current fits compared to the target average in #KEY_TARGETLEVEL. |
Number |
getForError(ErrorEvent td)
If queried with an error, recording probably just starts. |
Number |
getForTarget(TargetDefinition td)
If queried with a target, we cannot return anything, thus null is returned here. |
Number |
getValue()
We get the estimated flat exposure time. |
void |
registerError(ErrorEvent ee)
If we receive an error AccumulationStart, we set the new moment
window, start our gather thread and clear any old list. |
void |
registerParameter(Parameter p)
We register a parameter that delivers sky brightness. |
void |
registerTarget(TargetDefinition td)
We register the target. |
| Methods inherited from class stella.parameter.AbstractFitsMomentsValue |
|---|
getDateObs, getExposureTime, getFits, getRegistered, init, registerMonitor, setValue |
| Methods inherited from class stella.parameter.AbstractTargetValue |
|---|
get, set |
| Methods inherited from class stella.parameter.AbstractTargetParameter |
|---|
getAsStar, getConstant, getFormattedFor, getSetup |
| Methods inherited from class stella.parameter.AbstractParameter |
|---|
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, rescanned, setName, toString |
| 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, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.Parameter |
|---|
get, getFormatted, getName, getString, set |
| 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 |
| Methods inherited from interface stella.TargetDependingParameter |
|---|
getFormattedFor |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Field Detail |
|---|
public static final String KEY_FOCUSORDER
public static final String KEY_FOCUSPOSITION
public static final String KEY_RISE
private static final int DEFFOCUSORDER
private static final String DEFFOCUSPOSITION
private static final double DEFRISE
private Value focus
private VectorG extrafocal
private VectorG intrafocal
private VectorG infocus
| Constructor Detail |
|---|
public FocusMeasure(Map<String,String> prop)
| Method Detail |
|---|
public void registerParameter(Parameter p)
registerParameter in interface ParameterDependingregisterParameter in class AbstractFitsMomentsValuepublic void registerTarget(TargetDefinition td)
registerTarget in interface TargetDependingpublic void registerError(ErrorEvent ee)
AccumulationStart, we set the new moment
window, start our gather thread and clear any old list.
registerError in interface ErrorDependingParameterpublic Number getValue()
getValue in interface Valuepublic Number getForTarget(TargetDefinition td)
getForTarget in interface TargetDependingValuegetForTarget in interface TargetDependingParameterpublic Number getForError(ErrorEvent td)
getForError in interface ErrorDependingParameter
private static Double getFocus(VectorG in,
VectorG out,
VectorG here,
double up)
#KEY_TARGETLEVEL. If there is no prior
fits average, we try to estimate the exposure time from the current
light level.
private VectorG extractMoments(Value f,
int order)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||