stella.ccd
Class E2VGeometry

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.ccd.E2VGeometry
All Implemented Interfaces:
MultiMode, Cloneable, MomentsGeometric, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class E2VGeometry
extends PropertyBundles
implements MomentsGeometric, MultiMode

Default conversion of focus star position to readout frame on CCD for Robotel, 2k with two amp readout.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFMODENAMES
          The names of all supported modes.
private static Dimension DEFMOMENTSBOX
          Default size of the moments ccd readout.
private static Dimension DEFMOMENTSINSET
          Default size of the moments ccd readout.
private static String DEFSTARTUPMODE
          The mode that is selected after startup.
private  Rectangle focbox
          The focus frame.
private  int focext
          The extension the focus frame is in.
static String KEY_MODENAMES
          The name of the supported modes.
static String KEY_MOMENTSBOX
          The size of the focus readout box.
static String KEY_MOMENTSINSET
          The insets of the focus readout box to get to the moments frame.
static String KEY_STARTUPMODE
          We start with this mode per default.
private  String lastmode
          The last mode set.
 
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 util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
E2VGeometry(Map<String,String> prop)
           
 
Method Summary
private  void calc(int xc, int yc)
           
private  void calcFake(int xc, int yc)
           
private  void calcTrue(int xc, int yc)
           
 String getActiveMode()
          The last mode successfully set.
 Rectangle getBox(int xpix, int ypix)
          Returns the rectangle that defines the readout-area on a ccd from the focus star position for the Wifsip geometry.
 int getExtension(int xpix, int ypix)
          Returns the extension the moment focusser should use.
 List<String> getModes()
          Returns all modes supported.
 Rectangle getMomentsFrame(int xpix, int ypix)
          Returns the moment frame, which is always the size of the focbox minus the insets.
 boolean selectMode(String mode)
          Select this mode, if supported.
 boolean supportMode(String mode)
          Return true if this mode is supported.
 
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, init, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_MOMENTSBOX

public static final String KEY_MOMENTSBOX
The size of the focus readout box.

See Also:
Constant Field Values

KEY_MOMENTSINSET

public static final String KEY_MOMENTSINSET
The insets of the focus readout box to get to the moments frame.

See Also:
Constant Field Values

KEY_MODENAMES

public static final String KEY_MODENAMES
The name of the supported modes.

See Also:
Constant Field Values

KEY_STARTUPMODE

public static final String KEY_STARTUPMODE
We start with this mode per default.

See Also:
Constant Field Values

DEFMODENAMES

private static final String DEFMODENAMES
The names of all supported modes.

See Also:
Constant Field Values

DEFSTARTUPMODE

private static final String DEFSTARTUPMODE
The mode that is selected after startup. Two-amplifier readout.

See Also:
Constant Field Values

DEFMOMENTSBOX

private static final Dimension DEFMOMENTSBOX
Default size of the moments ccd readout.


DEFMOMENTSINSET

private static final Dimension DEFMOMENTSINSET
Default size of the moments ccd readout.


focbox

private Rectangle focbox
The focus frame.


focext

private int focext
The extension the focus frame is in.


lastmode

private String lastmode
The last mode set.

Constructor Detail

E2VGeometry

public E2VGeometry(Map<String,String> prop)
Method Detail

getModes

public List<String> getModes()
Returns all modes supported.

Specified by:
getModes in interface MultiMode

supportMode

public boolean supportMode(String mode)
Return true if this mode is supported. This is done by looking up the requested mode in the list of supported modes.

Specified by:
supportMode in interface MultiMode

getActiveMode

public String getActiveMode()
The last mode successfully set.

Specified by:
getActiveMode in interface MultiMode

selectMode

public boolean selectMode(String mode)
Select this mode, if supported. Though the vclkdir does not change in the default setup, it is set here anyway. Depending on the mode, also the hclkdir, the outputchannel and the maximum pixel are set. The read-out frame is reset to full frame by passing the maximal window to the set window method, once the mode has been selected.

Specified by:
selectMode in interface MultiMode

getBox

public Rectangle getBox(int xpix,
                        int ypix)
Returns the rectangle that defines the readout-area on a ccd from the focus star position for the Wifsip geometry.

Specified by:
getBox in interface MomentsGeometric

getExtension

public int getExtension(int xpix,
                        int ypix)
Returns the extension the moment focusser should use. Returns -1 if close to center.

Specified by:
getExtension in interface MomentsGeometric

getMomentsFrame

public Rectangle getMomentsFrame(int xpix,
                                 int ypix)
Returns the moment frame, which is always the size of the focbox minus the insets.

Specified by:
getMomentsFrame in interface MomentsGeometric

calc

private void calc(int xc,
                  int yc)

calcFake

private void calcFake(int xc,
                      int yc)

calcTrue

private void calcTrue(int xc,
                      int yc)