public class FlatGroup extends AbstractParameter implements Refreshing
| Modifier and Type | Class and Description |
|---|---|
static class |
FlatGroup.Db
Test class that retrieves statistic from db and prints it out.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private List<String> |
dawn
All flat objects in dawn (sun rising).
|
static String |
DAWN
Default object start name for dusk flat groups.
|
private static String |
DEFFILTERLIST
The list of filters served.
|
private static String |
DEFFLATGROUPS
The name of the flat group versus its members.
|
private static String |
DEFFLATMEMBERS
For each filter in filterlist the sky-flat targets to check.
|
private static String |
DEFFLATTYPES
This types indicate flat fields.
|
private static String |
DEFGROUPDEFAULT
Order imposed if multiple groups remain.
|
static String |
DEFNAME
Default name of this parameter.
|
private static String |
DEFPRIORITYDEFAULT
The default filter priority list.
|
private static String |
DEFSCIENCETYPES
These types indicate science targets.
|
private static String |
DEFSETUPIDS
These setups may contain the filter definition.
|
private static String |
DEFTELESCOPE
The name of the telescope for db access.
|
private List<String> |
dusk
All flat objects in dusk (sun setting).
|
static String |
DUSK
Default object start name for dusk flat groups.
|
private Map<String,Date> |
flat
The mapping of served flat objects names to dates of last flat fields.
|
private Map<String,List<String>> |
groups
For each filter group name, we have the list of filters in it.
|
private boolean |
havedusk
Gets true on first announcement that we had a successful dusk group.
|
private HistorySql |
hsql
The done db.
|
static String |
KEY_DAWNFLAT
If explicitly set, this is the list of object names at dawn.
|
static String |
KEY_DUSKFLAT
If explicitly set, this is the list of object names at dusk.
|
static String |
KEY_FILTERLIST
The list of filters served.
|
static String |
KEY_FLATGROUPS
The name of the flat group versus its members.
|
static String |
KEY_FLATMEMBERS
For each filter in filterlist the sky-flat targets to check.
|
static String |
KEY_FLATTYPES
This types indicate flat fields.
|
static String |
KEY_GROUPDEFAULT
Order imposed if multiple groups remain.
|
static String |
KEY_HISTORYDB
This are the done database properties, if needed.
|
static String |
KEY_OBSERVEDB
This are the obs database properties, if needed.
|
static String |
KEY_PRIORITYDEFAULT
The default filter priority list.
|
static String |
KEY_SETUPIDS
These setups may contain the filter definition.
|
static String |
KEY_TELESCOPE
The name of the telescope for db access.
|
private Map<String,List<String>> |
members
The mapping of filter names to sky flat target name lists.
|
private boolean |
nodusk
Gets true on first announcement that we had no dusk group.
|
private boolean |
noobs |
KEY_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 |
|---|
FlatGroup(Map<String,String> prop)
Constructs a new flat group parameter object, defaulting all values.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get()
The filter group is determined by grabbing the filters in the priority
order and than selecting a filter group out of all.
|
private Object |
getFilterGroup(String filter)
Returns the filter group this filter is in.
|
private Object |
getOldestGroup() |
long |
getRefreshInterval()
We are a cron for noon.
|
void |
init()
On init, we update our current knowledge of recently observed filters and
flats by refreshing.
|
boolean |
isFixedRate()
We are a cron for noon.
|
void |
refresh()
We update the list of observed filters and successfully executed flat
fields.
|
private List<String> |
screen(List<String> from,
String filt)
In a non-destructive way we screen all entries from the provided list
that
refer to a flat group name that has the filter in question not in it.
|
Object |
set(Object no)
Sets the value of this parameter.
|
private boolean |
updateFlats()
For each filter in our sky-flat memeber list we check for the last
successful observation and keep the most actual one.
|
createParameter, 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, stringPropertiespublic static final String DUSK
public static final String DAWN
public static final String KEY_TELESCOPE
public static final String KEY_FILTERLIST
public static final String KEY_FLATGROUPS
public static final String KEY_GROUPDEFAULT
public static final String KEY_FLATMEMBERS
public static final String KEY_SETUPIDS
public static final String KEY_PRIORITYDEFAULT
public static final String KEY_FLATTYPES
public static final String KEY_HISTORYDB
public static final String KEY_OBSERVEDB
public static final String KEY_DUSKFLAT
public static final String KEY_DAWNFLAT
public static final String DEFNAME
private static final String DEFTELESCOPE
private static final String DEFFILTERLIST
private static final String DEFFLATGROUPS
private static final String DEFGROUPDEFAULT
private static final String DEFFLATMEMBERS
private static final String DEFSETUPIDS
private static final String DEFPRIORITYDEFAULT
private static final String DEFFLATTYPES
private static final String DEFSCIENCETYPES
private Map<String,List<String>> members
private Map<String,List<String>> groups
private Map<String,Date> flat
private transient HistorySql hsql
private boolean nodusk
private boolean havedusk
private boolean noobs
public void init()
throws InitException
init in interface Initializableinit in class AbstractParameterInitExceptionpublic Object get()
private Object getOldestGroup()
private Object getFilterGroup(String filter)
public Object set(Object no)
Parameterpublic void refresh()
refresh in interface Refreshingpublic boolean isFixedRate()
isFixedRate in interface Refreshingpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingprivate List<String> screen(List<String> from, String filt)
private boolean updateFlats()
throws InitException
InitException