public abstract class AbstractGigeDriver extends SynchronousCcdDriver
CcdDriver interface. The ethernet camera
itself
is mainly used in an adapter as a main guider or a fiber viewing unit.
Sub-frames and binning is done in the java part.
Additionally, a setFramesToAdd(int) method is present that allows the
user to specify up to 16 frames that should be co-added on the server side.
This circumvents the 12-bit weakness of the camera somehow. A unique feature
is also the possibility to change the gain from zero to 723, which
corresponds to 25dB. Combining that with measured gains (what astronomers see
as it), this 0-723g translates to a gain of
gain = 2.8*10ˆ(-2.0082e-3*g)This also means that the gain of the camera is adjustable between 2.8 and 0.1 (0 and 723, respectively).
The camera on use at WiFSIP is currently a acA2000-50gm. Different then to the specs, it supports exposure times up to 10 sec
SynchronousCcdDriver.ExposureThread, SynchronousCcdDriver.ThreadShotAbstractCcdDriver.Endurance, AbstractCcdDriver.Exposure, AbstractCcdDriver.Shot| Modifier and Type | Field and Description |
|---|---|
static String |
AOISEPARATOR |
private MFits |
async
The data buffer for asynchroneous retrieval.
|
static String |
BLACKLEV
black level dB.
|
static String |
BLCKLREM |
private boolean |
connected
For permanent connections: this is open connection.
|
static String |
DATE
Estimated start of exposure.
|
static String |
DATEREM |
static String |
DBGAIN
Raw gain in 25/723 dB.
|
static String |
DBGREM |
private static double |
DEFAREAREADOUT
Always zero.
|
private static double |
DEFATMOSTIME
Default characteristic time scale of the atmosphere, in seconds.
|
private static double |
DEFFIXEDREADOUT
Always read the full frame.
|
private static int |
DEFMAXFRAMES
Maximum number of frames to add.
|
private static boolean |
DEFPERMANENT
Default keep connection permanent.
|
private static int |
DEFRPCTIMEOUT
Default property value.
|
private static String |
DEFSERVERNAME
Default property value.
|
private static boolean |
DEFSOFTBIN
Default no software binning.
|
static String |
EXPOSE
Exposure time in ms.
|
static String |
EXPREM |
private static EthcamClient |
gige
RPC client instance.
|
static int |
GIGE_SUCCESS
The constant that indicates success in core library.
|
static String |
KEY_ATMOSTIME
The atmospheric characteristic time.If exposure time is below, we add.
|
static String |
KEY_BLACKLEVEL
The black level to set.
|
static String |
KEY_CAMERAIP
The camera IP address as a string.
|
static String |
KEY_DBGAIN
The gain to set on startup.
|
static String |
KEY_MAXEXPOSE
The maximum exposure time allowed in microsec.
|
static String |
KEY_MAXFRAMES
The maximum number of frames to add.
|
static String |
KEY_MINEXPOSE
The minimum exposure time allowed in microsec.
|
static String |
KEY_PERMANENT
If connection can be kept open permanently.
|
static String |
KEY_RPCTIMEOUT
The RPC time-out in millisecond.
|
static String |
KEY_SERVERNAME
FCDN of the host where the fircam rpc server is running.
|
static String |
KEY_SOFTBIN
If true, use software binning.
|
private int |
nframe
Number of frames to co-add, 1 to 16.
|
static String |
NFRAME
Numbers of frame added on server side.
|
static String |
NREM |
private Rectangle |
window
Active window on chip.
|
private int |
xbin
Current binning in x.
|
static String |
XBIN
Binning used in x.
|
static String |
XBINREM |
static String |
XORGREM
Comment for entering x-pregap info to header.
|
static String |
XORIGIN
All FITS header is manufactured by us, this is the unbinned x pregap.
|
static String |
XSIZE
Fits key for entering chip total size in x.
|
static String |
XSIZEREM |
private int |
ybin
Current binning in x.
|
static String |
YBIN
Binning used in y.
|
static String |
YBINREM |
static String |
YORGREM
Comment for entering y-pregap info to header.
|
static String |
YORIGIN
Fits key for entering y-pregap info to header.
|
static String |
YSIZE
Fits key for entering chip total size in y.
|
static String |
YSIZEREM |
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 |
|---|
AbstractGigeDriver(Map<String,String> info)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
Close the RPC communication.
|
private int |
connectCamera() |
protected abstract EthcamClient |
createCameraClient(InetAddress server,
int protocoltype)
Forks to the different RPC-client stubs.
|
private int |
disconnectCamera() |
private boolean |
doExposure()
Does an exposure.
|
private boolean |
errorCamera(boolean forceclose) |
int |
expose()
Make an exposure.
|
int |
exposeBias()
Not supported.
|
int |
exposeDark()
Not supported.
|
private Pair<Rectangle,Dimension> |
getAreaOfInterest(boolean docon)
Queries the CCD driver for readout window and binning.
|
Dimension |
getBinning()
Get the binning values in x (columns) and y (rows) as a cached copy.
|
Dimension |
getBinningFromServer()
Queries the server for the current binning.
|
int |
getBlackLevel()
Returns the gain setting in the camera, which is a setting in decibel.
|
private int |
getBlackLevel(boolean docon)
Returns the gain setting in the camera, which is a setting in decibel.
|
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.
|
private double |
getExposureTime(boolean docon)
Get the current exposure time in milliseconds.
|
int |
getFramesToAdd()
Returns the current active number of co-added frames.
|
double |
getGainDecibel()
Returns the gain setting in the camera, which is a setting in decibel.
|
private double |
getGainDecibel(boolean docon)
Returns the gain setting in the camera, which is a setting in decibel.
|
double |
getMaximumExposureTime()
Maximum allowed exposure time in milliseconds.
|
double |
getMinimumExposureTime()
Minimum allowed exposure time in milliseconds.
|
long |
getReadoutTime(Rectangle area)
Always read out the whole frame, multiply this with internal number of
frames.
|
Rectangle |
getWindow()
Get the current image origin (pre-gap) in x (columns) and y (rows) and
the size as a cached copy.
|
Rectangle |
getWindowFromServer()
Queries the server for the current read-out window.
|
void |
init()
Clear any leftovers.
|
boolean |
isOpen()
We consider the driver to be open if the ccdclient is initialized.
|
private short[][] |
manufacture(short[] yx,
Rectangle to,
int xb,
int yb)
Manufactures a binned and sliced image array out from the full frame.
|
protected boolean |
openController()
Initializes the fechner driver.
|
private boolean |
setAreaOfInterest(Rectangle win,
int xb,
int yb)
Sets the area of interest AOI on the chip using a slightly updated
format.
|
boolean |
setBinning(int xb,
int yb)
Set the binning values in x (columns) and y (rows).
|
boolean |
setBlackLevel(int db)
Allows to change the ADU-level for black.
|
boolean |
setExposureTime(double exptime)
Set the current exposure time in milliseconds.
|
private boolean |
setFramesToAdd(int n)
Sets the number of frames that should be co-added on the server side.
|
boolean |
setGainDecibel(double db)
Allows to change the gain setting in the camera, which is a setting in
decibel.
|
boolean |
setWindow(Rectangle w)
Set the current image window.
|
cancelContinuous, ensureReady, getRunning, isExposing, isReadingOut, startContinuous, stopContinuous, threadedBiasExpose, threadedDarkExpose, threadedExposegetDetectorSize, getReadoutMaximum, 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, getReadoutMaximumgetDriverName, openpublic static final String AOISEPARATOR
public static final String XORIGIN
public static final String XORGREM
public static final String YORIGIN
public static final String YORGREM
public static final String XSIZE
public static final String XSIZEREM
public static final String YSIZE
public static final String YSIZEREM
public static final String XBIN
public static final String XBINREM
public static final String YBIN
public static final String YBINREM
public static final String EXPOSE
public static final String EXPREM
public static final String DATE
public static final String DATEREM
public static final String NFRAME
public static final String NREM
public static final String DBGAIN
public static final String DBGREM
public static final String BLACKLEV
public static final String BLCKLREM
public static final int GIGE_SUCCESS
public static final String KEY_SERVERNAME
public static final String KEY_CAMERAIP
public static final String KEY_RPCTIMEOUT
public static final String KEY_MAXEXPOSE
public static final String KEY_MINEXPOSE
public static final String KEY_DBGAIN
public static final String KEY_BLACKLEVEL
public static final String KEY_ATMOSTIME
public static final String KEY_MAXFRAMES
public static final String KEY_PERMANENT
public static final String KEY_SOFTBIN
private static final String DEFSERVERNAME
private static final double DEFAREAREADOUT
private static final double DEFFIXEDREADOUT
private static final int DEFRPCTIMEOUT
private static final double DEFATMOSTIME
private static final int DEFMAXFRAMES
private static final boolean DEFPERMANENT
private static final boolean DEFSOFTBIN
private static EthcamClient gige
private MFits async
private int nframe
private int xbin
private int ybin
private Rectangle window
private boolean connected
public AbstractGigeDriver(Map<String,String> info)
openController().public void init()
throws InitException
openController().init in interface Initializableinit in class AbstractCcdDriverInitExceptionpublic long getReadoutTime(Rectangle area)
getReadoutTime in interface CcdDrivergetReadoutTime in class AbstractCcdDriverprotected abstract EthcamClient createCameraClient(InetAddress server, int protocoltype) throws org.acplt.oncrpc.OncRpcException, IOException
server - org.acplt.oncrpc.OncRpcExceptionIOExceptionprotected boolean openController()
throws IOException
openController in class AbstractCcdDriverIOException - If controller connection fails.private int connectCamera()
throws IOException,
org.acplt.oncrpc.OncRpcException
IOExceptionorg.acplt.oncrpc.OncRpcExceptionprivate int disconnectCamera()
throws IOException,
org.acplt.oncrpc.OncRpcException
IOExceptionorg.acplt.oncrpc.OncRpcExceptionprivate boolean errorCamera(boolean forceclose)
public boolean isOpen()
public boolean close()
throws IOException
IOExceptionpublic boolean setBinning(int xb,
int yb)
throws IOException
xb - binning factor in x-direction (1 <= binning factor <= 255)yb - binning factor in y-direction (1 <= binning factor <= 255)IOExceptionpublic Dimension getBinning()
public boolean setWindow(Rectangle w) throws IOException
w - The origin being the upper left corner of the rectangle.IOExceptionpublic Rectangle getWindow() throws IOException
IOException - Any subclass of IOException.public Rectangle getWindowFromServer() throws IOException
IOExceptionpublic Dimension getBinningFromServer() throws IOException
IOExceptionprivate boolean setAreaOfInterest(Rectangle win, int xb, int yb) throws IOException
IOExceptionprivate Pair<Rectangle,Dimension> getAreaOfInterest(boolean docon) throws IOException
IOExceptionpublic double getMaximumExposureTime()
CcdDrivergetMaximumExposureTime in interface CcdDrivergetMaximumExposureTime in class AbstractCcdDriverpublic double getMinimumExposureTime()
CcdDrivergetMinimumExposureTime in interface CcdDrivergetMinimumExposureTime in class AbstractCcdDriverpublic boolean setExposureTime(double exptime)
throws IOException
expt - exposure time in *micro*seconds. (0 <= expTime < 65000000 mus)IOException - Any subclass of IOException.public double getExposureTime()
throws IOException
IOException - Any subclass of IOException.private double getExposureTime(boolean docon)
throws IOException
expTime - exposure time in milliseconds. (0 <= expTime < 65000 ms)IOExceptionpublic 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.private boolean setFramesToAdd(int n)
public int getFramesToAdd()
public boolean setGainDecibel(double db)
throws IOException
IOExceptionpublic double getGainDecibel()
throws IOException
IOExceptionprivate double getGainDecibel(boolean docon)
throws IOException
IOExceptionpublic boolean setBlackLevel(int db)
throws IOException
IOExceptionpublic int getBlackLevel()
throws IOException
IOExceptionprivate int getBlackLevel(boolean docon)
throws IOException
IOExceptionpublic int exposeBias()
public int exposeDark()
public int expose()
throws IOException
setFramesToAdd(int).IOException - Any subclass of IOException.startExposeprivate boolean doExposure()
throws IOException
FirecamClient.START_TRANSMISSION_1() to start a grab,
FirecamClient.GRAB_IMAGES_1(int) to sum up the requested number of
images on the server, FirecamClient.GET_IMAGE_1() to transfer the
image data as a short array to this client and ends the grab with a call
to FirecamClient.STOP_TRANSMISSION_1(). Currently, frame grabbing
of multiple frames is only supported, if the exposure time of a single
frame is below 0.54sec. Single grabs may extend up to 65 sec.
Binning and slicing of the image is done at the client, if different from full-frame and 1x1.
IOExceptionprivate final short[][] manufacture(short[] yx,
Rectangle to,
int xb,
int yb)