|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
io.AbstractDriver
ccd.AbstractCcdDriver<T>
ccd.SynchronousCcdDriver<nom.tam.fits.Fits>
ccd.sta0500.MagellanDriver
public class MagellanDriver
This class interfaces to Thomas Fechner's Wifsip controller (Magellan) type. Due to increased version spread, each new RPC package is put in its own directory.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ccd.SynchronousCcdDriver |
|---|
SynchronousCcdDriver.ExposureThread |
| Nested classes/interfaces inherited from class ccd.AbstractCcdDriver |
|---|
AbstractCcdDriver.Endurance, AbstractCcdDriver.Exposure, AbstractCcdDriver.Shot |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private nom.tam.fits.Fits |
async
The data buffer for asynchroneous retrieval. |
private static WifsipMagellanClient |
ccdclient
RPC client instance. |
static String |
CCDSEC
Fits key for entering y-pregap info to header. |
static String |
CCDSECREM
Comment for entering y-pregap info to header. |
static String |
COPYREM
Comment for a key that was copied from the primary. |
private static int |
DEFAMPLIFIERS
Default property value. |
private static int |
DEFCOLAMPLIFIERS
Default property value. |
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 |
DETSIZE
Fits key for entering x-pregap info to header. |
static String |
DETSIZEREM
Comment for entering x-pregap info to header. |
static String |
KEY_COLAMPLIFIERS
Total number of amplifiers expected in row direction. |
static String |
KEY_EXPOSEMULTIPLY
The multiplier for exposure times returned to ms. |
static String |
KEY_MINTIME
The minimum exposure time in milliseconds. |
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. |
| Fields inherited from class ccd.AbstractCcdDriver |
|---|
KEY_AMPLIFIERS, KEY_AREAREADOUT, KEY_COLUMNPOST, KEY_COLUMNPRIOR, KEY_COLUMNREADOUT, KEY_FIXEDREADOUT, KEY_INITSIZE, KEY_ROWPOST, KEY_ROWPRIOR, KEY_ROWREADOUT, KEY_XBINNING, KEY_XCHIPSIZE, KEY_XORIGIN, KEY_XSIZE, KEY_YBINNING, KEY_YCHIPSIZE, KEY_YORIGIN, KEY_YSIZE |
| Fields inherited from class io.AbstractDriver |
|---|
KEY_DRIVERNAME |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface ccd.CcdDriver |
|---|
FITSEXTENSION |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
MagellanDriver(Map<String,String> info)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addPrimaryCards(List<nom.tam.fits.HeaderCard> pcard)
Adds header cards for the primary HDU. |
protected void |
addSecondaryCards(List<nom.tam.fits.HeaderCard> pcard,
nom.tam.fits.Header p,
int arow,
int acol)
Adds header cards for the secondary HDU. |
boolean |
close()
Close the RPC communication. |
private boolean |
doDark()
Does a dark exposure. |
private boolean |
doExposure()
Does an open-shutter exposure. |
private boolean |
download(ergf result)
Takes the result of an exposure and makes a fits file out of it. |
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). |
Class<nom.tam.fits.Fits> |
getBufferType()
We work directly on a fits object. |
Map |
getCcdInfo()
This ccd does not provide any additional info. |
nom.tam.fits.Fits |
getDataBuffer()
Returns the output buffer. |
long |
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. |
protected double |
getReadoutDirectionX(int x0,
int y0,
int n)
Get the readout direction in x for the current amplifier position |
protected double |
getReadoutDirectionY(int x0,
int y0,
int n)
Get the readout direction in y for the current amplifier position |
private static String |
getSection(int xl,
int yd,
int xll,
int ydd)
Formats a window to a section string. |
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 |
setDataBuffer(nom.tam.fits.Fits file)
Sets the output buffer. |
boolean |
setExposureTime(long 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. |
| Methods inherited from class ccd.SynchronousCcdDriver |
|---|
ensureReady, isExposing, threadedDarkExpose, threadedExpose |
| Methods inherited from class ccd.AbstractCcdDriver |
|---|
getChipSize, getReadoutTime, open |
| Methods inherited from class io.AbstractDriver |
|---|
createDriver, equals, getDriverName, hashCode |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, 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, isNew, parseObject, 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 io.Driver |
|---|
getDriverName |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final int OK
public static final String DETSIZE
public static final String DETSIZEREM
public static final String CCDSEC
public static final String CCDSECREM
public static final String COPYREM
public static final String KEY_SERVERNAME
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_MINTIME
public static final String KEY_RPCTIMEOUT
public static final String KEY_WRONGENDIAN
public static final String KEY_COLAMPLIFIERS
public static final String DEFDRIVERNAME
private static final String DEFSERVERNAME
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 final boolean DEFWRONGENDIAN
private static final int DEFAMPLIFIERS
private static final int DEFCOLAMPLIFIERS
private static WifsipMagellanClient ccdclient
private nom.tam.fits.Fits async
| Constructor Detail |
|---|
public MagellanDriver(Map<String,String> info)
init().
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class AbstractCcdDriver<nom.tam.fits.Fits>
protected boolean openController()
throws IOException
openController in class AbstractCcdDriver<nom.tam.fits.Fits>IOException - If controller connection fails.public boolean isOpen()
public boolean close()
throws IOException
IOException
protected 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)
IOException
protected Dimension getMaxPixel()
throws IOException
IOException
public 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 IOException
public 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(long exptime)
throws IOException
expTime - exposure time in milliseconds. (0 <= expTime < 65536 ms)
IOException - Any subclass of IOException.
public long getExposureTime()
throws IOException
IOException - Any subclass of IOException.public Class<nom.tam.fits.Fits> getBufferType()
public boolean setDataBuffer(nom.tam.fits.Fits file)
throws IOException
file - Any sort of buffer the driver knows to store CCD-data in.
IOException - Any subclass of IOException.
public nom.tam.fits.Fits getDataBuffer()
throws IOException
setDataBuffer(nom.tam.fits.Fits), 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 Map getCcdInfo()
public int expose()
throws IOException
IOException - Any subclass of IOException.startExpose
public int exposeBias()
throws IOException
IOException - Any subclass of IOException.
public int exposeDark()
throws IOException
IOException - Any subclass of IOException.
private Point getPregap()
throws IOException
IOException
private static short[] swap(short[] little,
int start,
int len)
private Dimension getReadoutArea()
throws IOException
IOException
private boolean setShutter(boolean open)
throws IOException
IOExceptionprotected void addPrimaryCards(List<nom.tam.fits.HeaderCard> pcard)
protected void addSecondaryCards(List<nom.tam.fits.HeaderCard> pcard,
nom.tam.fits.Header p,
int arow,
int acol)
Point x0y0 = getPregap();
// add as origin if known
HeaderCard org;
if (x0y0 != null) {
org = new HeaderCard(XORIGIN, x0y0.x, XORGREM);
cards.add(org.toString());
org = new HeaderCard(YORIGIN, x0y0.y, YORGREM);
cards.add(org.toString());
}
protected double getReadoutDirectionX(int x0,
int y0,
int n)
protected double getReadoutDirectionY(int x0,
int y0,
int n)
private static String getSection(int xl,
int yd,
int xll,
int ydd)
private boolean doExposure()
throws IOException
StreamClient#DO_EXPOSURE_2, 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.
// the END card is always missing, but we want to add origin
IOException
private boolean doDark()
throws IOException
StreamClient#DO_DARK_2, 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.
// the END card is always missing, but we want to add origin
IOException
private boolean download(ergf result)
throws nom.tam.fits.FitsException
nom.tam.fits.FitsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||