public class StreamingCcdDriver extends SynchronousCcdDriver
SynchronousCcdDriver.ExposureThread, SynchronousCcdDriver.ThreadShotAbstractCcdDriver.Endurance, AbstractCcdDriver.Exposure, AbstractCcdDriver.Shot| Modifier and Type | Field and Description |
|---|---|
private MFits |
async
The data buffer for asynchroneous retrieval.
|
private static StreamClient |
ccdclient
RPC client instance.
|
static String |
DATESEND
Header keyword for send exposure start.
|
static String |
DATESENDREM
Comment for send exposure start.
|
static String |
DEFDRIVERNAME
The name of this ccd.
|
private static long |
DEFEXPOSEMULTIPLY
Default property value.
|
private static long |
DEFMINTIME
Default property value.
|
private static int |
DEFRPCTIMEOUT
Default property value.
|
private static String |
DEFSERVERNAME
Default property value.
|
private static int |
DEFSHUTTERCLOSE
Default property value.
|
private static int |
DEFSHUTTEROPEN
Default property value.
|
private static boolean |
DEFSUPPORTSHUTTER
Default property value.
|
private static boolean |
DEFWRONGENDIAN
Default property value.
|
static String |
KEY_EXPOSEMULTIPLY
The multiplier for exposure times returned to ms.
|
static String |
KEY_MANUALCLEAR
If true, we have to do a dummy exposure before every frame.
|
static String |
KEY_RPCTIMEOUT
The RPC time-out in millisecond.
|
static String |
KEY_SERVERNAME
FCDN of the host where the guider rpc server is running.
|
static String |
KEY_SHUTTERCLOSE
The short paramter for shutter-close.
|
static String |
KEY_SHUTTEROPEN
The short paramter for shutter-open.
|
static String |
KEY_SUPPORTSHUTTER
If true, driver supports shutter operation.
|
static String |
KEY_WRONGENDIAN
If true, endian of received short are little.
|
static int |
OK
General return code from rpc calls indicating okay.
|
static String |
XORGREM
Comment for entering x-pregap info to header.
|
static String |
YORGREM
Comment for entering y-pregap info to header.
|
KEY_AMPLIFIERS, KEY_AREAREADOUT, KEY_COLUMNPOST, KEY_COLUMNPRIOR, KEY_COLUMNREADOUT, KEY_FIXEDREADOUT, KEY_INITSIZE, KEY_MAXTIME, KEY_MINTIME, KEY_ROWPOST, KEY_ROWPRIOR, KEY_ROWREADOUT, KEY_XBINNING, KEY_XCHIPSIZE, KEY_XDETECTORSIZE, KEY_XORIGIN, KEY_XSIZE, KEY_YBINNING, KEY_YCHIPSIZE, KEY_YDETECTORSIZE, KEY_YORIGIN, KEY_YSIZEKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORFITSEXTENSIONCONFIG, KEY_CLASS| Constructor and Description |
|---|
StreamingCcdDriver(Map<String,String> info)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
Close the RPC communication.
|
private boolean |
doExposure()
Does an exposure.
|
int |
expose()
Make an exposure.
|
int |
exposeBias()
Makes a bias exposure.
|
int |
exposeDark()
Makes a dark exposure.
|
Dimension |
getBinning()
Get the binning values in x (columns) and y (rows).
|
Map<String,Object> |
getCcdInfo()
This ccd does not provide any additional info.
|
MFits |
getData()
Returns the output buffer.
|
double |
getExposureTime()
Get the current exposure time in milliseconds.
|
protected Dimension |
getMaxPixel()
Get the max_pixel values for x (columns) and y (rows).
|
private Point |
getPregap()
Returns the pregap.
|
private Dimension |
getReadoutArea()
Returns read-ouyt area as a dimension.
|
Rectangle |
getWindow()
Get the current image origin (pre-gap) in x (columns) and y (rows) and
the size
|
void |
init()
Clear any leftovers.
|
boolean |
isOpen()
We consider the driver to be open if the ccdclient is initialized.
|
protected boolean |
openController()
Initializes the fechner driver.
|
boolean |
setBinning(int xbin,
int ybin)
Set the binning values in x (columns) and y (rows).
|
boolean |
setExposureTime(double exptime)
Set the current exposure time in milliseconds.
|
protected boolean |
setMaxPixel(Dimension max)
Set the max_pixel values for x (columns) and y (rows).
|
private boolean |
setShutter(boolean open)
Sets the shutter position.
|
boolean |
setWindow(Rectangle window)
Set the current image window.
|
private static short[] |
swap(short[] little,
int start,
int len)
Swaps wrong endian in a short array.
|
cancelContinuous, ensureReady, getRunning, isExposing, isReadingOut, startContinuous, stopContinuous, threadedBiasExpose, threadedDarkExpose, threadedExposegetDetectorSize, getMaximumExposureTime, getMinimumExposureTime, getReadoutMaximum, getReadoutTime, opencreateDriver, equals, getDriverName, hashCodeaugment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetDetectorSize, getMaximumExposureTime, getMinimumExposureTime, getReadoutMaximum, getReadoutTimegetDriverName, openpublic static final int OK
public static final String XORGREM
public static final String YORGREM
public static final String KEY_SERVERNAME
public static final String KEY_WRONGENDIAN
public static final String KEY_EXPOSEMULTIPLY
public static final String KEY_SUPPORTSHUTTER
public static final String KEY_SHUTTEROPEN
public static final String KEY_SHUTTERCLOSE
public static final String KEY_RPCTIMEOUT
public static final String KEY_MANUALCLEAR
public static final String DATESEND
public static final String DATESENDREM
public static final String DEFDRIVERNAME
private static final String DEFSERVERNAME
private static final boolean DEFWRONGENDIAN
private static final boolean DEFSUPPORTSHUTTER
private static final int DEFSHUTTEROPEN
private static final int DEFSHUTTERCLOSE
private static final long DEFMINTIME
private static final long DEFEXPOSEMULTIPLY
private static final int DEFRPCTIMEOUT
private static StreamClient ccdclient
private MFits async
public StreamingCcdDriver(Map<String,String> info)
openController().public void init()
throws InitException
openController().init in interface Initializableinit in class AbstractCcdDriverInitExceptionprotected boolean openController()
throws IOException
openController in class AbstractCcdDriverIOException - If controller connection fails.public boolean isOpen()
public boolean close()
throws IOException
IOExceptionprotected boolean setMaxPixel(Dimension max) throws IOException
xmax - maximum CCD size in x-direction (1 <= value < 65536)ymax - maximum CCD size in y-direction (1 <= value < 65536)IOExceptionprotected Dimension getMaxPixel() throws IOException
IOExceptionpublic boolean setBinning(int xbin,
int ybin)
throws IOException
xbin - binning factor in x-direction (1 <= binning factor <= 255)ybin - binning factor in y-direction (1 <= binning factor <= 255)IOException - Any subclass of IOExceptionpublic Dimension getBinning() throws IOException
IOException - Any subclass of IOException.public boolean setWindow(Rectangle window) throws IOException
window - The origin being the upper left corner of the rectangle.IOException - Any subclass of IOException.public Rectangle getWindow() throws IOException
IOException - Any subclass of IOException.public boolean setExposureTime(double exptime)
throws IOException
expTime - exposure time in milliseconds. (0 <= expTime < 65536 ms)IOException - Any subclass of IOException.public double getExposureTime()
throws IOException
IOException - Any subclass of IOException.public MFits getData() throws IOException
#setDataBuffer, or null if not set and no exposure has been
taken. If an exposure has finished and the buffer has not been explicedly
set, a new fits object has been allocated, which will be returned here.IOException - Any subclass of IOException.public int expose()
throws IOException
IOException - Any subclass of IOException.startExposepublic int exposeBias()
throws IOException
IOException - Any subclass of IOException.public int exposeDark()
throws IOException
IOException - Any subclass of IOException.private Point getPregap() throws IOException
IOExceptionprivate Dimension getReadoutArea() throws IOException
IOExceptionprivate static short[] swap(short[] little,
int start,
int len)
private boolean setShutter(boolean open)
throws IOException
IOExceptionprivate boolean doExposure()
throws IOException
StreamClient.DO_EXPOSURE_1(ccd.cmd), grabs the returned fits
object and transforms it to the more general ImageHDU java
object. If a data buffer-fits is set, all of its HDU's are deleted and
the new Image is added to the fits file. If no async buffer was set, a
new fits file is generated with the current data.IOException