stella.util
Class ExposureTime

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by vec_math.ExpressionCalculator
                  extended by stella.util.ExposureTime
All Implemented Interfaces:
Serializable, Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class ExposureTime
extends ExpressionCalculator
implements Serializable

A class to calculate an exposure time out of an aim S/N and vice verse. This calculation will heavenly depend on instrument characteristics and therefore extends the ExpressionCalculator. Formula used:

The unit of the time is arbitrary, as long as the gain is scaled appropriatedly. The default value for the gain assumes an exposure time in seconds.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFGAIN
          The default gain.
private static String DEFINITEXPRESSION
          The default forward expression to get exposure time.
private static String DEFREVERSEEXPRESSION
          The default backward expression.
private static double DEFSOURCE
          The default source.
static String KEY_GAIN
          The key to the gain value of the S/N calculator.
static String KEY_REVERSEEXPRESSION
          The key to the gain value of the S/N calculator.
static String KEY_SOURCE
          The key to the source value of the S/N calculator.
 
Fields inherited from class vec_math.ExpressionCalculator
KEY_INITEXPRESSION
 
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 util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
ExposureTime(Map info)
          Constructs a new exposure time calculator.
 
Method Summary
 Double getTimeFromSN(ParameterClustering set, TargetDefinition td, Number sn)
          Calculates the exposure time required to yield a target S/N.
 
Methods inherited from class vec_math.ExpressionCalculator
evaluate, getExpression, init, initCalculator
 
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, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
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
 

Field Detail

KEY_GAIN

public static final String KEY_GAIN
The key to the gain value of the S/N calculator.

See Also:
Constant Field Values

KEY_SOURCE

public static final String KEY_SOURCE
The key to the source value of the S/N calculator.

See Also:
Constant Field Values

KEY_REVERSEEXPRESSION

public static final String KEY_REVERSEEXPRESSION
The key to the gain value of the S/N calculator.

See Also:
Constant Field Values

DEFGAIN

private static final double DEFGAIN
The default gain.

See Also:
Constant Field Values

DEFSOURCE

private static final double DEFSOURCE
The default source.

See Also:
Constant Field Values

DEFINITEXPRESSION

private static final String DEFINITEXPRESSION
The default forward expression to get exposure time.

See Also:
Constant Field Values

DEFREVERSEEXPRESSION

private static final String DEFREVERSEEXPRESSION
The default backward expression.

See Also:
Constant Field Values
Constructor Detail

ExposureTime

public ExposureTime(Map info)
Constructs a new exposure time calculator. The main purpose of using a constructer here is to allow overriding of the default parameters.

Method Detail

getTimeFromSN

public Double getTimeFromSN(ParameterClustering set,
                            TargetDefinition td,
                            Number sn)
Calculates the exposure time required to yield a target S/N. The weather conditions and some target-depending variables are accessible through the parameter set handed over.

Returns:
Zero if the exposure time cannot be derived.