public class FlatQuality extends AbstractFitsMomentsValue implements ErrorDependingParameter
#KEY_GRABBERDEATH.#evaluate.| Modifier and Type | Class and Description |
|---|---|
private class |
FlatQuality.Gather
This thread waits on notification from the fits moment parameter and
adds a new moments statistic whenever it receivesd one.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Map<String,Double> |
avmax
Parsed mapping from properties.
|
private Map<String,Double> |
avmin
Parsed mapping from properties.
|
private List<Double> |
bias
All quadrants average bias level.
|
private static String |
DEFAVERAGEMAX
The default maximum averages per filter and quadrant.
|
private static String |
DEFAVERAGEMIN
The default minimum averages per filter and quadrant.
|
private static String |
DEFBIASADU
The default bias ADU per quadrant, measured on robotel, 24-07-09.
|
private static String |
DEFGAIN
The default gains.
|
private static Rectangle |
DEFMOMENTBOX
Default box size spares the five outer pixel.
|
private static int |
DEFMOMENTORDER
Default order is average and sigma.
|
private static String |
DEFMOMENTSDEV
Allowed deviation from moment median to be allowed, negativ for all.
|
private static String |
DEFMOMENTSMAX
The default maximum moments value per filter and quadrant.
|
private static String |
DEFMOMENTSMIN
The default minimum moments values per filter and quadrant.
|
static String |
DEFNAME
Default name.
|
private static String |
DEFSIGMAMAX
The default maximum standard deviation per filter and quadrant.
|
private static String |
DEFSIGMAMIN
The default minimum standard deviations per filter and quadrant.
|
private static int |
DEFSTATISTICS
The default number after which also current statistic should be used.
|
private String |
filter
The last filter registered.
|
private List<Double> |
gain
All quadrant's target ADU for a good flat.
|
private FlatQuality.Gather |
gather
The thread that gathers all recorded moments during flats.
|
static double |
INVALID
Default return if invalid.
|
static String |
KEY_AVERAGEMAX
The mapping of filters plus quadrants to their maximum average ADU.
|
static String |
KEY_AVERAGEMIN
The mapping of filters plus quadrants to their minimum average ADU.
|
static String |
KEY_BIASADU
The crude bias estimation of the quadrants.
|
static String |
KEY_CONSTANT
The name of the setup constant that holds the filter.
|
static String |
KEY_GAIN
The gains of the quadrants.
|
static String |
KEY_MOMENTBOX
The box which we should include during exposure estimate.
|
static String |
KEY_MOMENTORDER
The order to which we should calculate during exposure estimate.
|
static String |
KEY_MOMENTSDEV
The list of allowed deviations from moment median.
|
static String |
KEY_MOMENTSMAX
Filter plus quadrants to the list of minimum central moments.
|
static String |
KEY_MOMENTSMIN
Filter plus quadrants to the list of minimum central moments.
|
static String |
KEY_SETUP
The setup section that carries the flat-field filter.
|
static String |
KEY_SIGMAMAX
The mapping of filters plus quadrants to their maximum standard dev.
|
static String |
KEY_SIGMAMIN
The mapping of filters plus quadrants to their minimum standard dev.
|
static String |
KEY_STATISTIC
The minimum nuber of flats to additionally consider moment statistic.
|
private Map<String,List<Double>> |
momentdev
Parsed mapping from properties.
|
private Map<String,List<Double>> |
momentmax
Parsed mapping from properties.
|
private Map<String,List<Double>> |
momentmin
Parsed mapping from properties.
|
private long |
pick
The time the target was chosen.
|
private Map<String,Double> |
sigmax
Parsed mapping from properties.
|
private Map<String,Double> |
sigmin
Parsed mapping from properties.
|
KEY_FITSMOMENTSKEY_INDEXKEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
FlatQuality(Map<String,String> prop)
Construction of the flat exposure time calculator.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
basicFulfill(List<CentralMoments> check)
We check if the moments fulfill the basic requirements, i.e.
|
double |
estimateSignal(List<List<CentralMoments>> valid)
From the list of moments that fulfilled all selection criteria, we
estimate the ADUs from the average per quadrant, subtract the bias level
there and convert it via the gain factors to a number of photons.
|
private List<List<CentralMoments>> |
filterFulfill(List<List<CentralMoments>> basic)
If enough moments have been collected, we can narrow the valid ones
further down by lokking at the statistics of the moment.
|
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 field quality already accumulated.
|
void |
init()
On init, we create the table for calculating the times.
|
private static Map<String,Double> |
parseDoubleMapping(String in) |
private static Map<String,List<Double>> |
parseListofDouble(String in) |
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 |
registerTarget(TargetDefinition td)
We register the target.
|
getDateObs, getExposureTime, getFits, getRegistered, registerMonitor, registerParameter, setValueget, setgetAsStar, getConstant, getFormattedFor, getSetupcreateParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, rescanned, setName, toStringclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiesgetFormattedForpublic static final String KEY_SETUP
public static final String KEY_CONSTANT
public static final String KEY_MOMENTORDER
public static final String KEY_MOMENTBOX
public static final String KEY_BIASADU
public static final String KEY_GAIN
public static final String KEY_AVERAGEMIN
public static final String KEY_AVERAGEMAX
public static final String KEY_SIGMAMIN
public static final String KEY_SIGMAMAX
public static final String KEY_MOMENTSMIN
public static final String KEY_MOMENTSMAX
public static final String KEY_STATISTIC
public static final String KEY_MOMENTSDEV
public static final String DEFNAME
public static final double INVALID
private static final int DEFMOMENTORDER
private static final Rectangle DEFMOMENTBOX
private static final String DEFBIASADU
private static final String DEFGAIN
private static final String DEFAVERAGEMIN
private static final String DEFAVERAGEMAX
private static final String DEFSIGMAMIN
private static final String DEFSIGMAMAX
private static final String DEFMOMENTSMAX
private static final String DEFMOMENTSMIN
private static final int DEFSTATISTICS
private static final String DEFMOMENTSDEV
private String filter
private FlatQuality.Gather gather
private long pick
public void init()
throws InitException
init in interface Initializableinit in class AbstractFitsMomentsValueInitExceptionpublic 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()
#Gather thread. If enough data has been collected to allow
statistics to operate, we filter those with too high divergences and
pass the resulting averages to the estimateSignal(java.util.List<java.util.List<math.CentralMoments>>) routine.
If invalid for any reason, -1 is returned.public Number getForTarget(TargetDefinition td)
getForTarget in interface TargetDependingParametergetForTarget in interface TargetDependingValuepublic Number getForError(ErrorEvent td)
getForError in interface ErrorDependingParameterprivate List<List<CentralMoments>> filterFulfill(List<List<CentralMoments>> basic)
public double estimateSignal(List<List<CentralMoments>> valid)
private boolean basicFulfill(List<CentralMoments> check)
getValue().