ccd
Class AbstractCcdDriver<T>

java.lang.Object
  extended by util.PropertyContainer
      extended by io.AbstractDriver
          extended by ccd.AbstractCcdDriver<T>
All Implemented Interfaces:
CcdDriver<T>, Driver, Cloneable, Initializable, PropertyBearing
Direct Known Subclasses:
AsynchronousCcdDriver, SynchronousCcdDriver

public abstract class AbstractCcdDriver<T>
extends AbstractDriver
implements CcdDriver<T>

Abstract base class for CCD-drivers. Defines general keys etc.


Nested Class Summary
static class AbstractCcdDriver.Endurance
          Class to take a ccd driver as the first command line argument, open it and makes an endurance test by randomizing the exposure times between the two optional values that follow the driver definition.
static class AbstractCcdDriver.Exposure
          Enumeration of possible exposure types.
static class AbstractCcdDriver.Shot
          Class to take a ccd driver as the first command line argument, open it and make a science exposure.
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static int DEFAMPLIFIERS
          Default property value.
private static double DEFCOLUMNPOST
          Default property value.
private static double DEFCOLUMNPRIOR
          Default property value.
private static double DEFCOLUMNREADOUT
          Default property value.
private static boolean DEFINITSIZE
          Per default, we do not init the size on boot.
private static double DEFROWPOST
          Default property value.
private static double DEFROWPRIOR
          Default property value.
private static double DEFROWREADOUT
          Default property value.
private static int DEFXBINNING
          Default property value.
private static int DEFYBINNING
          Default property value.
static String KEY_AMPLIFIERS
          The number of amplifiers.
static String KEY_AREAREADOUT
          The read-out time per square pixel.
static String KEY_COLUMNPOST
          The read-out time per column-pixel dumped.
static String KEY_COLUMNPRIOR
          The read-out time per column-pixel dumped.
static String KEY_COLUMNREADOUT
          The read-out time per column.
static String KEY_FIXEDREADOUT
          The read-out time for clearing the ccd.
static String KEY_INITSIZE
          Set default window on init.
static String KEY_ROWPOST
          The read-out time per row-pixel dumped.
static String KEY_ROWPRIOR
          The read-out time per row-pixel dumped.
static String KEY_ROWREADOUT
          The read-out time per row.
static String KEY_XBINNING
          Binning for x (columns) (can be overridden by CcdDriver.setBinning(int, int).
static String KEY_XCHIPSIZE
          Maximum pixel values for x (columns).
static String KEY_XORIGIN
          Image origin for x (columns)at init.
static String KEY_XSIZE
          Image size for x (columns) at init.
static String KEY_YBINNING
          Binning for y (rows) (can be overridden by CcdDriver.setBinning(int, int).
static String KEY_YCHIPSIZE
          Maximum pixel values for y (rows) .
static String KEY_YORIGIN
          Image origin for y (rows) at init.
static String KEY_YSIZE
          Image size for y (rows) at init.
 
Fields inherited from class io.AbstractDriver
KEY_DRIVERNAME
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface ccd.CcdDriver
FITSEXTENSION
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractCcdDriver(Map<String,String> prop)
          Defaults binning and the row/column readout times.
 
Method Summary
 Dimension getChipSize()
          Queries for the chip size in the ccd.
 long getReadoutTime(Rectangle area)
          Queries for the readout time of the given window in ms.
 void init()
          Initializing means checking if the chip size and readout-times are set, otherwise we fail here before opening.
 boolean open()
          To open a CCD, first the openController() method is called.
protected abstract  boolean openController()
          This method opens the connection to the ccd controller.
 
Methods inherited from class io.AbstractDriver
createDriver, equals, getDriverName, hashCode
 
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, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ccd.CcdDriver
ensureReady, expose, exposeBias, exposeDark, getBinning, getBufferType, getCcdInfo, getDataBuffer, getExposureTime, getWindow, isExposing, setBinning, setDataBuffer, setExposureTime, setWindow, threadedDarkExpose, threadedExpose
 
Methods inherited from interface io.Driver
close, getDriverName, isOpen
 

Field Detail

KEY_XCHIPSIZE

public static final String KEY_XCHIPSIZE
Maximum pixel values for x (columns).

See Also:
Constant Field Values

KEY_YCHIPSIZE

public static final String KEY_YCHIPSIZE
Maximum pixel values for y (rows) .

See Also:
Constant Field Values

KEY_AMPLIFIERS

public static final String KEY_AMPLIFIERS
The number of amplifiers.

See Also:
Constant Field Values

KEY_AREAREADOUT

public static final String KEY_AREAREADOUT
The read-out time per square pixel.

See Also:
Constant Field Values

KEY_ROWREADOUT

public static final String KEY_ROWREADOUT
The read-out time per row. Can be zero if readout-dir is different.

See Also:
Constant Field Values

KEY_ROWPRIOR

public static final String KEY_ROWPRIOR
The read-out time per row-pixel dumped.

See Also:
Constant Field Values

KEY_ROWPOST

public static final String KEY_ROWPOST
The read-out time per row-pixel dumped.

See Also:
Constant Field Values

KEY_COLUMNREADOUT

public static final String KEY_COLUMNREADOUT
The read-out time per column. Zero if readout-dir is different.

See Also:
Constant Field Values

KEY_COLUMNPRIOR

public static final String KEY_COLUMNPRIOR
The read-out time per column-pixel dumped.

See Also:
Constant Field Values

KEY_COLUMNPOST

public static final String KEY_COLUMNPOST
The read-out time per column-pixel dumped.

See Also:
Constant Field Values

KEY_FIXEDREADOUT

public static final String KEY_FIXEDREADOUT
The read-out time for clearing the ccd.

See Also:
Constant Field Values

KEY_XBINNING

public static final String KEY_XBINNING
Binning for x (columns) (can be overridden by CcdDriver.setBinning(int, int).

See Also:
Constant Field Values

KEY_YBINNING

public static final String KEY_YBINNING
Binning for y (rows) (can be overridden by CcdDriver.setBinning(int, int).

See Also:
Constant Field Values

KEY_XORIGIN

public static final String KEY_XORIGIN
Image origin for x (columns)at init.

See Also:
Constant Field Values

KEY_YORIGIN

public static final String KEY_YORIGIN
Image origin for y (rows) at init.

See Also:
Constant Field Values

KEY_XSIZE

public static final String KEY_XSIZE
Image size for x (columns) at init.

See Also:
Constant Field Values

KEY_YSIZE

public static final String KEY_YSIZE
Image size for y (rows) at init.

See Also:
Constant Field Values

KEY_INITSIZE

public static final String KEY_INITSIZE
Set default window on init.

See Also:
Constant Field Values

DEFAMPLIFIERS

private static final int DEFAMPLIFIERS
Default property value.

See Also:
Constant Field Values

DEFXBINNING

private static final int DEFXBINNING
Default property value.

See Also:
Constant Field Values

DEFYBINNING

private static final int DEFYBINNING
Default property value.

See Also:
Constant Field Values

DEFROWREADOUT

private static final double DEFROWREADOUT
Default property value.

See Also:
Constant Field Values

DEFROWPRIOR

private static final double DEFROWPRIOR
Default property value.

See Also:
Constant Field Values

DEFROWPOST

private static final double DEFROWPOST
Default property value.

See Also:
Constant Field Values

DEFCOLUMNREADOUT

private static final double DEFCOLUMNREADOUT
Default property value.

See Also:
Constant Field Values

DEFCOLUMNPRIOR

private static final double DEFCOLUMNPRIOR
Default property value.

See Also:
Constant Field Values

DEFCOLUMNPOST

private static final double DEFCOLUMNPOST
Default property value.

See Also:
Constant Field Values

DEFINITSIZE

private static final boolean DEFINITSIZE
Per default, we do not init the size on boot.

See Also:
Constant Field Values
Constructor Detail

AbstractCcdDriver

protected AbstractCcdDriver(Map<String,String> prop)
Defaults binning and the row/column readout times.

Method Detail

init

public void init()
Initializing means checking if the chip size and readout-times are set, otherwise we fail here before opening.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyContainer

open

public boolean open()
             throws IOException
To open a CCD, first the openController() method is called. If that returns true, the binning is set according to KEY_XBINNING and KEY_YBINNING. If all of the KEY_XORIGIN, KEY_YORIGIN, KEY_XSIZE, and KEY_YSIZE parameters are set, an initial window is also defined.

Specified by:
open in interface Driver
Returns:
True if initialization was successful.
Throws:
IOException

openController

protected abstract boolean openController()
                                   throws IOException
This method opens the connection to the ccd controller. It is implementation-specific, but should return true on success, false otherwise.

Throws:
IOException - If controller connection fails.

getChipSize

public Dimension getChipSize()
Queries for the chip size in the ccd. Defined in properties.

Specified by:
getChipSize in interface CcdDriver<T>

getReadoutTime

public long getReadoutTime(Rectangle area)
Queries for the readout time of the given window in ms. The formular to calculate this is
       t = d+(k*A+rr*y+cr*x+rprior*x0+rpost*xs+cprior*y0+cpots*ys)/N,
       d  ...  fixed readout time
       k  ...  read-out time per pixel^2
       rr ...  read-out time per row (if shifted up/down)
       cr ...  read-out time per column (if shifted left/right)
       rprior ... time per pixel that are before the amplifier in x-dir.
       rpost  ... time per pixel that are after  the amplifier in x-dir.
       cprior ... time per pixel that are before the amplifier in y-dir.
       cpost  ... time per pixel that are after  the amplifier in y-dir.
       N      ... Number of amplifiers.
       
All times here are in micro-second! The amplifier are spaced at equal distances, starting at zero. Depending on the read-out direction one of rr/cr will be zero. Only in very elaborated systems it makes sense to also define the extra time that is used to shift the charges without actually digitizing them (rprior etc.). In the lastter case, rr and cr will be zero.
Per definition, at least d, k and N, which defaults to one, will be set.

Specified by:
getReadoutTime in interface CcdDriver<T>