public class OffLimitAlarm extends NightlyStatistic
NightlyStatistic.Duty, NightlyStatistic.Env, NightlyStatistic.NightAbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Map<String,Statistic> |
env
The retrieved data as column names to statistics.
|
private Map<String,Statistic> |
envtimes
The retrieved data as column names to statistics.
|
static String |
KEY_DONELIST
The fields to query from the env table.
|
static String |
KEY_DONENAMES
How the returned columns are named.
|
static String |
KEY_DONEWHERE
Additional constraints for the done table query.
|
static String |
KEY_ENVLIST
The fields to query from the env table.
|
static String |
KEY_ENVNAMES
How the returned columns are named.
|
static String |
KEY_JOINTLIST
The fields to query from the env table.
|
static String |
KEY_JOINTNAMES
How the returned columns are named.
|
static String |
KEY_JOINTWHERE
Additional constraints for the joint table query.
|
static String |
KEY_MULTILIST
The fields to query from the env table.
|
static String |
KEY_MULTINAMES
How the returned columns are named.
|
static String |
KEY_MULTIWHERE
Additional constraints for the joint table query.
|
static String |
KEY_OBSLIST
The fields to query from the obs table.
|
static String |
KEY_OBSNAMES
How the returned columns are named.
|
static String |
KEY_OBSWHERE
Additional constraints for the obs table query.
|
static String |
KEY_SCILIST
The fields to query from the obs table, with imagetyp=1.
|
static String |
KEY_SCINAMES
How the returned columns are named.
|
static String |
KEY_SCIWHERE
Additional constraints for the sci query, should include imagetyp=1.
|
static String |
KEY_TELESCOPE
The issuing telescopes.
|
static String |
NULL
String instead of limits indicating that this has no meaning.
|
private Map<String,Map<String,Statistic>> |
tel
The retrieved data as column names to statistics.
|
static char |
TELESCOPESEPARATOR
character sparating telescope name from offending column name.
|
private Map<String,Map<String,List<Object>>> |
telkeys
The retrieved data as column names to keys (unique ids).
|
private Map<String,Map<String,Statistic>> |
teltimes
The retrieved data as column names to statistics.
|
KEY_RISETWILIGHT, KEY_SETTWILIGHTKEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
OffLimitAlarm(Map<String,String> prop)
Constructs a new off-limit alarm log.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDone(List<String> donelist,
List<String> doneas,
Map<String,Function> f,
String add,
Date now)
Retrieve and cache all information for the date in question.
|
void |
addEnvironment(List<String> envlist,
List<String> envas,
Map<String,Function> f,
Date now)
Retrieve and cache all information for the date in question.
|
void |
addJoint(List<String> jointlist,
List<String> jointas,
Map<String,Function> f,
String add,
Date now)
Retrieve and cache all information for the date in question.
|
void |
addMultiple(List<String> multlist,
List<String> multas,
Map<String,Function> f,
String add,
Date now)
Retrieve and cache all information for the date in question.
|
void |
addObs(List<String> obslist,
List<String> obsas,
Map<String,Function> f,
String add,
Date now)
Retrieve and cache all information for the date in question.
|
void |
clearStats() |
static Map<String,Statistic> |
convertToStatistic(Map<String,List<DataCard>> log,
int index)
Converts a mapping of strings to List of doubles into a mapping of
strings to statistics.
|
static Map<String,List<Object>> |
extractUnique(Map<String,List<DataCard>> log)
We take all the data cards and extract the unique IDs found for the
given field names.
|
Map<String,Double> |
getAverageEnvOffs(Map<String,Vector2D> avmap)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose average are outside the bounds
mapped to the average.
|
private Map<String,Double> |
getAverageOffenders(Map<String,Statistic> stats,
Map<String,Vector2D> avmap)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose average are outside the bounds
mapped to the average.
|
Map<String,Double> |
getAverageTelOffs(String telescope,
Map<String,Vector2D> avmap)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose average are outside the bounds
mapped to the average.
|
Statistic |
getEnvStatistic(String key)
Returns the statistic on a column in the env table.
|
Statistic |
getEnvTimes(String key)
Returns the statistic on a column in the env table.
|
Map<String,Double> |
getMinMaxEnvOffs(Map<String,Vector2D> avmap)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose average are outside the bounds
mapped to the average.
|
private Map<String,Double> |
getMinMaxOffenders(Map<String,Statistic> stats,
Map<String,Vector2D> avmap)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose min/max are outside the bounds
mapped to the offending value.
|
Map<String,Double> |
getMinMaxTelOffs(String telescope,
Map<String,Vector2D> avmap)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose min/max are outside the bounds
mapped to the offending value.
|
Map<String,Double> |
getSigmaEnvOffs(Map<String,Double> limit)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose average are outside the bounds
mapped to the average.
|
private Map<String,Double> |
getSigmaOffenders(Map<String,Statistic> stats,
Map<String,Double> limit)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose standard deviaition is higher
than the allowed maximum,
mapped to the offending value.
|
Map<String,Double> |
getSigmaTelOffs(String telescope,
Map<String,Double> limit)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose standard deviaition is higher
than the allowed maximum,
mapped to the offending value.
|
Map<String,Double> |
getSpanEnvOffs(Map<String,Double> limit)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose average are outside the bounds
mapped to the average.
|
private Map<String,Double> |
getSpanOffenders(Map<String,Statistic> stats,
Map<String,Double> limit)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose span deviaition is higher
than the allowed maximum,
mapped to the offending value.
|
Map<String,Double> |
getSpanTelOffs(String telescope,
Map<String,Double> limit)
From the retireved mappings of column names to list of doubles, we
return the column names of those whose span deviaition is higher
than the allowed maximum,
mapped to the offending value.
|
List<Object> |
getTelescopeKeys(String telescope,
String key)
Returns the list of uniques for a telescope.
|
List<String> |
getTelescopes()
Returns the list of telescopes.
|
Statistic |
getTelescopeStatistic(String telescope,
String key)
Returns the statistic on a column in the env table.
|
Statistic |
getTelescopeTimes(String telescope,
String key)
Returns the statistic on a column in the env table.
|
void |
init()
If we are not the default user of the database, try to add ourself here.
|
static Map<String,Map<String,Double>> |
telescopeDoubleMapping(List<String> tels,
String prop)
Converts a string-to-string mapping into a string-toVector2D mapping,
using the telescope names provided.
|
static Map<String,Map<String,Vector2D>> |
telescopeVectorMapping(List<String> tels,
String prop)
Converts a string-to-string mapping into a string-toVector2D mapping,
using the telescope names provided.
|
static Map<String,Vector2D> |
vectorMapping(String prop)
Converts a string-to-string mapping into a string-to Vector2D mapping
|
duskToDawn, duskToDawn, getDone, getDone, getDone, getEnvironment, getEnvironment, getEnvironment, getExposureTimeSum, getJoint, getJoint, getJoint, getMultiple, getMultiple, getNightCount, getObs, getObs, getObs, getRoofOpenCount, getScienceTimeSumdelete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, 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, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, 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 NULL
public static final char TELESCOPESEPARATOR
public static final String KEY_TELESCOPE
public static final String KEY_ENVLIST
public static final String KEY_ENVNAMES
public static final String KEY_OBSLIST
public static final String KEY_OBSNAMES
public static final String KEY_OBSWHERE
public static final String KEY_SCILIST
public static final String KEY_SCINAMES
public static final String KEY_SCIWHERE
public static final String KEY_DONELIST
public static final String KEY_DONENAMES
public static final String KEY_DONEWHERE
public static final String KEY_JOINTLIST
public static final String KEY_JOINTNAMES
public static final String KEY_JOINTWHERE
public static final String KEY_MULTILIST
public static final String KEY_MULTINAMES
public static final String KEY_MULTIWHERE
private Map<String,Map<String,Statistic>> teltimes
public void init()
throws InitException
AbstractSqlinit in interface Initializableinit in class AbstractSqlInitExceptionpublic void clearStats()
public void addEnvironment(List<String> envlist, List<String> envas, Map<String,Function> f, Date now)
public void addObs(List<String> obslist, List<String> obsas, Map<String,Function> f, String add, Date now)
public void addDone(List<String> donelist, List<String> doneas, Map<String,Function> f, String add, Date now)
public void addJoint(List<String> jointlist, List<String> jointas, Map<String,Function> f, String add, Date now)
public void addMultiple(List<String> multlist, List<String> multas, Map<String,Function> f, String add, Date now)
public Statistic getEnvStatistic(String key)
public Statistic getEnvTimes(String key)
public Statistic getTelescopeStatistic(String telescope, String key)
public Statistic getTelescopeTimes(String telescope, String key)
public List<Object> getTelescopeKeys(String telescope, String key)
public static Map<String,Vector2D> vectorMapping(String prop) throws ParseException
ParseExceptionpublic static Map<String,Map<String,Vector2D>> telescopeVectorMapping(List<String> tels, String prop) throws ParseException
dettemp=-200,-100;-220,-80:further keys
ParseExceptionpublic static Map<String,Map<String,Double>> telescopeDoubleMapping(List<String> tels, String prop) throws ParseException
dettemp=-200;-220:further keys
ParseExceptionpublic Map<String,Double> getAverageEnvOffs(Map<String,Vector2D> avmap)
public Map<String,Double> getMinMaxEnvOffs(Map<String,Vector2D> avmap)
public Map<String,Double> getSigmaEnvOffs(Map<String,Double> limit)
public Map<String,Double> getSpanEnvOffs(Map<String,Double> limit)
public Map<String,Double> getAverageTelOffs(String telescope, Map<String,Vector2D> avmap)
public Map<String,Double> getMinMaxTelOffs(String telescope, Map<String,Vector2D> avmap)
public Map<String,Double> getSigmaTelOffs(String telescope, Map<String,Double> limit)
public Map<String,Double> getSpanTelOffs(String telescope, Map<String,Double> limit)
public static Map<String,Statistic> convertToStatistic(Map<String,List<DataCard>> log, int index)
public static Map<String,List<Object>> extractUnique(Map<String,List<DataCard>> log)
private Map<String,Double> getAverageOffenders(Map<String,Statistic> stats, Map<String,Vector2D> avmap)
private Map<String,Double> getMinMaxOffenders(Map<String,Statistic> stats, Map<String,Vector2D> avmap)
private Map<String,Double> getSigmaOffenders(Map<String,Statistic> stats, Map<String,Double> limit)
private Map<String,Double> getSpanOffenders(Map<String,Statistic> stats, Map<String,Double> limit)