public class FlatExposureTime extends AbstractFitsMomentsValue implements ExposureTimeMeasuring
| Modifier and Type | Class and Description |
|---|---|
static class |
FlatExposureTime.Test
Reads the fits file given at the command line, extract the exposure time
and does an exposure calculation using default bias levels.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private List<Double> |
bias
All quadrants average bias level.
|
private static double |
DEFADUTOLERANCE
The default tolerance if on exposure edge.
|
private static double |
DEFADUTWILIGHT
The default tolerance if on exposure edge.
|
private static String |
DEFBIASADU
The default bias ADU per quadrant, measured on STELLA1, 12-07-10.
|
private static String |
DEFFILTERLUX
The default lux-to-sec expressions for all filters.
|
private static String |
DEFGAIN
The default gains, measured 01-07-2010.
|
private static String |
DEFLUXSENSOR
The default lux value name.
|
static String |
DEFNAME
The default name.
|
private static String |
DEFTARGETADU
The default adus for a good flat.
|
private static double |
DEFTIMEHIGH
Default high time limit.
|
private static double |
DEFTIMELOW
Default low time limit.
|
private List<Double> |
desired
All quadrant's target ADU for a good flat.
|
private boolean |
dolog
For debugging purpose, a flag to write.
|
private String |
filter
The last filter registered.
|
private List<Double> |
gain
All quadrant's target ADU for a good flat.
|
static String |
KEY_ADUTOLERANCE
The tolerance in target adu if at exposure limit.
|
static String |
KEY_ADUTWILIGHT
If we have sol sink parameter, we add/subtract this from targetadu.
|
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_FILTERLUX
This key links filter names to expressions for time calculation.
|
static String |
KEY_GAIN
The gains of the quadrants.
|
static String |
KEY_LUXSENSOR
The name of the parameter that delivers the current sky brightness.
|
static String |
KEY_SETUP
The setup section that carries the flat-field filter.
|
static String |
KEY_TARGETADU
The list of desireged average ADUs after bias substraction.
|
static String |
KEY_TIMEHIGH
If exposure time falls below this limit, we increase the target adu.
|
static String |
KEY_TIMELOW
If exposure time falls below this limit, we increase the target adu.
|
static String |
KEY_USEQUADRANTS
If that is given, only use these quadrants for averaging.
|
private Value |
lux
The parameter that delivers current sky brightness.
|
private Map<String,Function> |
luxtime
The expressions on how we calculate from lux to exposure time.
|
private long |
pick
The time the target was chosen.
|
private SolSink |
sunset
We allow to distinguish berween sun rise and sun set.
|
private List<Integer> |
usequad
If this is set, only these quadrants are used.
|
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_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
FlatExposureTime(Map<String,String> prop)
Construction of the flat exposure time calculator.
|
| Modifier and Type | Method and Description |
|---|---|
private double |
getExposureEstimate(String f)
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. |
private double |
getExposureLevelTime(double texp,
List<CentralMoments> cm)
From the average of the exposure, do the calculation for the time.
|
Number |
getForTarget(TargetDefinition td)
If queried with a target, we always ignore the fits moments, as these
cannot be valid.
|
private double |
getLightLevelTime(String f)
We calculate an exposure time from the light sensor.
|
Number |
getValue()
We get the estimated flat exposure time.
|
void |
init()
On init, we create the table for calculating the times.
|
void |
registerParameter(Parameter p)
We register a parameter that delivers sky brightness.
|
void |
registerTarget(TargetDefinition td)
We register the target.
|
getDateObs, getExposureTime, getFits, getRegistered, registerMonitor, 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_FILTERLUX
public static final String KEY_LUXSENSOR
public static final String KEY_SETUP
public static final String KEY_CONSTANT
public static final String KEY_TARGETADU
public static final String KEY_ADUTOLERANCE
public static final String KEY_ADUTWILIGHT
public static final String KEY_BIASADU
public static final String KEY_GAIN
public static final String KEY_USEQUADRANTS
public static final String KEY_TIMELOW
public static final String KEY_TIMEHIGH
public static final String DEFNAME
private static final String DEFFILTERLUX
private static final String DEFLUXSENSOR
private static final String DEFTARGETADU
private static final double DEFADUTOLERANCE
private static final double DEFADUTWILIGHT
private static final String DEFBIASADU
private static final String DEFGAIN
private static final double DEFTIMELOW
private static final double DEFTIMEHIGH
private Map<String,Function> luxtime
private Value lux
private SolSink sunset
private String filter
private long pick
private boolean dolog
public void init()
throws InitException
init in interface Initializableinit in class AbstractFitsMomentsValueInitExceptionpublic void registerParameter(Parameter p)
registerParameter in interface ParameterDependingregisterParameter in class AbstractFitsMomentsValuepublic void registerTarget(TargetDefinition td)
registerTarget in interface TargetDependingpublic Number getValue()
public Number getForTarget(TargetDefinition td)
getForTarget in interface TargetDependingParametergetForTarget in interface TargetDependingValueprivate double getExposureEstimate(String f)
#KEY_TARGETLEVEL. If there is no prior fits
average, we try to estimate the exposure time from the current light
level.private double getExposureLevelTime(double texp,
List<CentralMoments> cm)
private double getLightLevelTime(String f)