stella.util
Class GuidingStatistic

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

public class GuidingStatistic
extends PropertyBundles

A class that reads serialized guider-offset files and produces statistic information out of it. The input file must have a minimum number of data points KEY_MINLENGTH to be considered. If that is the case, the data in both axes is fit to a straight line. If the slope and the offset of these lines are below KEY_MAXOFFSET KEY_MAXSLOPE, the residuals to the line fits are used to calculate an RMS of the image motion in azimuth, altitude, and, using the combined fits, in total. The exposure time plus the seeing and wind information in the guider file is then used to create artifical expected image motion from seeing effects. The RMS of this is calculated and printed out together with the wind-speed, the seeing and the measured RMSs.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFMAXOFFSET
          Default property value.
private static double DEFMAXSLOPE
          Default property value.
private static int DEFMINLENGTH
          Default property value.
private static double DEFSEESCALE
          Default property value.
private static double DEFTELESCOPE
          Default property value.
private static double DEFWINDSCALE
          Default property value.
static String KEY_MAXOFFSET
          The maximum zero offset in the linear fit.
static String KEY_MAXSLOPE
          The maximum slope in the linear fit.
static String KEY_MINLENGTH
          The minimum length of the guider offset set.
static String KEY_SEESCALE
          The multiplier for reported seeing.
static String KEY_TELESCOPE
          The telescope diameter.
static String KEY_WINDSCALE
          The multiplier for reported wind.
 
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
GuidingStatistic(Map<String,String> prop)
          Constructs a new GuidingStatistic object.
 
Method Summary
static void main(String[] arg)
          Reads a file given in the first command line and prints the statistic.
 boolean printStatistic(File serial, PrintWriter out)
          Prints the statistic for the given file.
 
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, init, 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
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_MINLENGTH

public static final String KEY_MINLENGTH
The minimum length of the guider offset set.

See Also:
Constant Field Values

KEY_MAXOFFSET

public static final String KEY_MAXOFFSET
The maximum zero offset in the linear fit.

See Also:
Constant Field Values

KEY_MAXSLOPE

public static final String KEY_MAXSLOPE
The maximum slope in the linear fit.

See Also:
Constant Field Values

KEY_TELESCOPE

public static final String KEY_TELESCOPE
The telescope diameter.

See Also:
Constant Field Values

KEY_SEESCALE

public static final String KEY_SEESCALE
The multiplier for reported seeing.

See Also:
Constant Field Values

KEY_WINDSCALE

public static final String KEY_WINDSCALE
The multiplier for reported wind.

See Also:
Constant Field Values

DEFMINLENGTH

private static final int DEFMINLENGTH
Default property value.

See Also:
Constant Field Values

DEFMAXOFFSET

private static final double DEFMAXOFFSET
Default property value.

See Also:
Constant Field Values

DEFMAXSLOPE

private static final double DEFMAXSLOPE
Default property value.

See Also:
Constant Field Values

DEFTELESCOPE

private static final double DEFTELESCOPE
Default property value.

See Also:
Constant Field Values

DEFSEESCALE

private static final double DEFSEESCALE
Default property value.

See Also:
Constant Field Values

DEFWINDSCALE

private static final double DEFWINDSCALE
Default property value.

See Also:
Constant Field Values
Constructor Detail

GuidingStatistic

public GuidingStatistic(Map<String,String> prop)
Constructs a new GuidingStatistic object. Defaults all necessarry values.

Method Detail

printStatistic

public boolean printStatistic(File serial,
                              PrintWriter out)
                       throws IOException
Prints the statistic for the given file.

Returns:
False, if data fails requirements on length or linearity.
Throws:
IOException

main

public static void main(String[] arg)
                 throws IOException
Reads a file given in the first command line and prints the statistic.

Throws:
IOException