public class FireDriver extends SynchronousCcdDriver implements Resettable, LongTerm
CcdDriver interface. The firwire camera itself
is mainly used in adapter as a main guider or a fiber viewing unit.
The camera itself only supports full-frame transfer, so 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).
SynchronousCcdDriver.ExposureThread, SynchronousCcdDriver.ThreadShotAbstractCcdDriver.Endurance, AbstractCcdDriver.Exposure, AbstractCcdDriver.Shot| Modifier and Type | Field and Description |
|---|---|
private MFits |
async
The data buffer for asynchroneous retrieval.
|
static String |
DATE
Estimated start of exposure.
|
static String |
DATEREM |
static String |
DBGAIN
Raw gain in 25/723 dB.
|
static String |
DBGREM |
static int |
DC1394_SUCCESS
The constant that indicates success in core library.
|
private static double |
DEFAREAREADOUT
Always zero.
|
private static double |
DEFATMOSTIME
Default characteristic time scale of the atmosphere, in seconds.
|
private static int |
DEFDBGAIN
Default gain in db to set on startup.
|
static String |
DEFDRIVERNAME
Default name of the unibrain ccd driver.
|
private static double |
DEFFIXEDREADOUT
Always read the full frame.
|
static double |
DEFFRAMERATE
Default frame rate.
|
private static long |
DEFMAXEXPOSE
Default exposure time 65 sec.
|
private static long |
DEFMINEXPOSE
Default minimal exposure time 5 microseconds.
|
private static int |
DEFRPCTIMEOUT
Default property value.
|
private static String |
DEFSERVERNAME
Default property value.
|
private static int |
DEFXCHIPSIZE
Default size.
|
private static int |
DEFYCHIPSIZE
Default size.
|
static String |
EXPOSE
Exposure time in ms.
|
static String |
EXPREM |
private static FirecamClient |
fire
RPC client instance.
|
static double[] |
FRAMES
Frame rates supported.
|
static String |
KEY_ATMOSTIME
The atmospheric characteristic time.
|
static String |
KEY_DBGAIN
The gain to set on startup.
|
static String |
KEY_MAXEXPOSE
The maximum exposure time allowed in microsec.
|
static String |
KEY_MINEXPOSE
The minimum exposure time allowed in microsec.
|
static String |
KEY_RESETSERVER
FCDN of the host where the fircam reset server is running.
|
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.
|
private boolean |
lowlev
Different logging levels.
|
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 |
|---|
FireDriver(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()
Not supported.
|
int |
exposeDark()
Not supported.
|
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.
|
double |
getFramerate()
Returns the gain setting in the camera, which is a setting in decibel.
|
int |
getFramesToAdd()
Returns the current active number of co-added frames.
|
int |
getGainDecibel()
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
|
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.
|
boolean |
reset()
Resets the firewire bus by issuing a reset to the server.
|
boolean |
setBinning(int xb,
int yb)
Set the binning values in x (columns) and y (rows).
|
boolean |
setExposureTime(double expt)
Set the current exposure time in milliseconds.
|
boolean |
setFramerate(double frate)
Allows to change the frame rate to one of the supported frames rates.
|
boolean |
setFramesToAdd(int n)
Sets the number of frames that should be co-added on the server side.
|
boolean |
setGainDecibel(int db)
Allows to change the gain setting in the camera, which is a setting in
decibel.
|
void |
setLongTerm(boolean islongterm) |
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, waitgetDriverName, opengetDetectorSize, getReadoutMaximumpublic static final double[] FRAMES
public static final double DEFFRAMERATE
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 int DC1394_SUCCESS
public static final String KEY_SERVERNAME
public static final String KEY_RESETSERVER
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_ATMOSTIME
public static final String DEFDRIVERNAME
private static final String DEFSERVERNAME
private static final int DEFXCHIPSIZE
private static final int DEFYCHIPSIZE
private static final double DEFAREAREADOUT
private static final double DEFFIXEDREADOUT
private static final int DEFRPCTIMEOUT
private static final long DEFMAXEXPOSE
private static final long DEFMINEXPOSE
private static final int DEFDBGAIN
private static final double DEFATMOSTIME
private static FirecamClient fire
private MFits async
private int nframe
private int xbin
private int ybin
private Rectangle window
private boolean lowlev
public FireDriver(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 boolean openController()
throws IOException
openController in class AbstractCcdDriverIOException - If controller connection fails.public boolean isOpen()
public boolean close()
throws IOException
close in interface DriverIOExceptionpublic boolean reset()
throws IOException
reset in interface ResettableIOExceptionpublic boolean setBinning(int xb,
int yb)
setBinning in interface CcdDriverxb - binning factor in x-direction (1 <= binning factor <= 255)yb - binning factor in y-direction (1 <= binning factor <= 255)public Dimension getBinning()
getBinning in interface CcdDriverpublic boolean setWindow(Rectangle w)
public Rectangle getWindow() throws IOException
getWindow in interface CcdDriverIOException - Any subclass of IOException.public double getMaximumExposureTime()
CcdDrivergetMaximumExposureTime in interface CcdDrivergetMaximumExposureTime in class AbstractCcdDriverpublic double getMinimumExposureTime()
CcdDrivergetMinimumExposureTime in interface CcdDrivergetMinimumExposureTime in class AbstractCcdDriverpublic boolean setExposureTime(double expt)
throws IOException
setExposureTime in interface CcdDriverexpt - exposure time in *micro*seconds. (0 <= expTime < 65000000 mus)IOException - Any subclass of IOException.public double getExposureTime()
throws IOException
getExposureTime in interface CcdDriverIOException - 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.getData in interface CcdDriverIOException - Any subclass of IOException.public Map<String,Object> getCcdInfo()
getCcdInfo in interface CcdDriverpublic boolean setFramesToAdd(int n)
public int getFramesToAdd()
public boolean setFramerate(double frate)
throws IOException
IOExceptionpublic double getFramerate()
throws IOException
IOExceptionpublic boolean setGainDecibel(int db)
throws IOException
IOExceptionpublic int getGainDecibel()
throws IOException
IOExceptionpublic int exposeBias()
exposeBias in interface CcdDriverpublic int exposeDark()
exposeDark in interface CcdDriverpublic int expose()
throws IOException
setFramesToAdd(int).expose in interface CcdDriverIOException - 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)
public void setLongTerm(boolean islongterm)
setLongTerm in interface LongTerm