stella.parameter
Class AbstractFitsValue

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.parameter.AbstractParameter
          extended by stella.parameter.AbstractRemoteParameter
              extended by stella.parameter.AbstractFitsParameter
                  extended by stella.parameter.AbstractFitsValue
All Implemented Interfaces:
Cloneable, Remote, EventListener, EventTrigger, Parameter, RemoteFitsParameter, RemoteParameter, Value, ExitCleaning, Initializable, PropertyBearing, RmiCaster
Direct Known Subclasses:
Efficiency, SignalToNoise

public abstract class AbstractFitsValue
extends AbstractFitsParameter
implements Value

A class of values that deal with read-in fits files, where a (small) window is extracted to get some statistics. For asynchronous access, we notify a sleeping object on ADU arrival.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private  List<Double> adus
          The pixel extracted from the fits file as a list of Doubles.
private  double aduscale
          To correct the extraxted pixel, we need scale and zero.
private  double aduzero
          To correct the extraxted pixel, we need scale and zero.
private static Rectangle DEFWINDOW
          Default window, order 88, to the blue of Hα.
static String KEY_WINDOW
          Window used on SES spectrum for efficiency estimate.
 
Fields inherited from class stella.parameter.AbstractRemoteParameter
DEFBIND, KEY_BIND
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractFitsValue(Map<String,String> prop)
          Constructs a new fits measuring tool.
 
Method Summary
 Object get()
          Links the Parameter.get() to the Value.getValue() method.
protected  List<Double> getAdus()
          Returns the list of adus, as retrieved from fits tools.
protected  Rectangle getWindow()
          Returns the read-out window on the FITS file.
protected  boolean processFits(nom.tam.fits.Fits file, Rectangle readout, Dimension bin, Date when, long registered, double t)
          The fits file and the exposure time should be registered just when the fits file resides in memory.
protected  double rescanned(String key, String old, String newval)
          Reparses the readout window after calling super.
 Number setValue(Number number)
          Links the Parameter.set(java.lang.Object) to the Value.setValue(java.lang.Number) method.
 
Methods inherited from class stella.parameter.AbstractFitsParameter
addRmiListener, getDateObs, getExposureTime, getRegistered, registerFits, registerMonitor, removeRmiListener, rmiDateObs, rmiExposureTime, rmiRegistered, set, setDateObs, setExposureTime, setRegistered
 
Methods inherited from class stella.parameter.AbstractRemoteParameter
bindToRegistry, exit, init, isValid, remoteGet, unbindFromRegistry
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.Value
getValue
 
Methods inherited from interface stella.Parameter
getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertyBearing
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface stella.rmi.RemoteParameter
remoteGet
 
Methods inherited from interface util.rmi.RmiCaster
bindToRegistry, isValid, unbindFromRegistry
 

Field Detail

KEY_WINDOW

public static final String KEY_WINDOW
Window used on SES spectrum for efficiency estimate.

See Also:
Constant Field Values

DEFWINDOW

private static final Rectangle DEFWINDOW
Default window, order 88, to the blue of Hα.


adus

private List<Double> adus
The pixel extracted from the fits file as a list of Doubles.


aduzero

private double aduzero
To correct the extraxted pixel, we need scale and zero.


aduscale

private double aduscale
To correct the extraxted pixel, we need scale and zero.

Constructor Detail

AbstractFitsValue

protected AbstractFitsValue(Map<String,String> prop)
Constructs a new fits measuring tool. After construct, call registerFits before retrieve the value.

Method Detail

rescanned

protected double rescanned(String key,
                           String old,
                           String newval)
Reparses the readout window after calling super.

Overrides:
rescanned in class AbstractRemoteParameter

processFits

protected boolean processFits(nom.tam.fits.Fits file,
                              Rectangle readout,
                              Dimension bin,
                              Date when,
                              long registered,
                              double t)
The fits file and the exposure time should be registered just when the fits file resides in memory. Then, a Value.getValue() will retrieve the daughter class value. The fits values extracted are zero and scale corrected and promoted to doubles.

Specified by:
processFits in class AbstractFitsParameter
Parameters:
file - The fits object holding the data
readout - The readout frame
bin - The applied binning
when - The time of the exposure or the register time, if dateobs unknown.
registered - The time this fits was registered.
t - Exposure time in seconds.

get

public Object get()
Links the Parameter.get() to the Value.getValue() method.

Specified by:
get in interface Parameter

setValue

public Number setValue(Number number)
Links the Parameter.set(java.lang.Object) to the Value.setValue(java.lang.Number) method. If the argument cannot be cast into a number or is null an IllegalArgumentException is thrown.

Specified by:
setValue in interface Value

getAdus

protected List<Double> getAdus()
Returns the list of adus, as retrieved from fits tools. Counting starts therefore at 0,0, first index is in x direction.


getWindow

protected Rectangle getWindow()
Returns the read-out window on the FITS file.