stella.adapter
Class MirrorFocus

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.adapter.AdapterUnit
                  extended by stella.adapter.FocussingUnit
                      extended by stella.adapter.FocussingMoments
                          extended by stella.adapter.MirrorFocus
All Implemented Interfaces:
Cloneable, Abortable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class MirrorFocus
extends FocussingMoments

Tries to focus using moments on the mirrored image of the fiber entrance. Should work to lower light levels than the PyramidUnit.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFALTSHIFT
          Shift the image by 30 pixel to avoid obsuration by the pinhole.
static String DEFFOCUSMODEL
          The default name of the focus parameter.
private static double DEFFOCUSOFFSET
          Default focusoffset fine.
private static long DEFMAXFOCUSEXPOSE
          The maximum exposure time for true moment analysis.
private static double DEFMAXIMUMFOCUS
          Soft limit for minimum focus (hard at 89.).
private static double DEFMINIMUMFOCUS
          Soft limit for minimum focus (hard at 0.).
private static double DEFSEARCHOFFSET
          Default focusoffset on step, where we search a coarse focus.
static String KEY_ALTSHIFT
          Points to the offset to apply to altitude before focusing.
static String KEY_FOCUSMODEL
          The focus of the telescope as a parameter.
static String KEY_MAXIMUMFOCUS
          The minimum focus we allow with this method.
static String KEY_MINIMUMFOCUS
          The minimum focus we allow with this method.
static String MIRRORTYPE
          Id for prime focus coarse.
private  Value tempfocus
          For coarse focusing, we need the environemt focus.
 
Fields inherited from class stella.adapter.FocussingMoments
EXTRAFOCAL, INTRAFOCAL, KEY_A4ERROR, KEY_A4SLOPE, KEY_ADUSIZE, KEY_BLOBSIZE, KEY_DOSAVE, KEY_DOSEARCH, KEY_ERRORZERNIKE, KEY_EXPOSEFOCUS, KEY_FOCUSBINNING, KEY_FOCUSFRAME, KEY_FOCUSOFFSET, KEY_FOCUSORDER, KEY_HIGHSKYSIGMA, KEY_LOWSKYSIGMA, KEY_MAXFOCUSEXPOSE, KEY_MEDIANSKY, KEY_MOMENTS, KEY_MOMENTSFRAME, KEY_SEARCHOFFSET, KEY_SEARCHORDER, KEY_SEARCHSTEPS, KEY_SKYFRAME, KEY_ZERNIKESTEP, KEY_ZEXPOSE, SEARCH
 
Fields inherited from class stella.adapter.FocussingUnit
increase
 
Fields inherited from class stella.adapter.AdapterUnit
ACQUIRETYPE, GUIDERTYPE, PYRAMIDTYPE
 
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
MirrorFocus(Map<String,String> prop)
          Constructs a new focussing unit.
 
Method Summary
protected  double crudeFocus()
          We position the linear sledge at the temperature model focus.
protected  ErrorEvent doUnitTask(String mode)
          Task of this unit is to auto focus after a successful acquire.
 double getMaximumFocus()
          Returns the maximum focus step this unit can reach, which is step 31400 something.
 double getMinimumFocus()
          Returns the minimum focus step this unit can reach, which is step 0.
protected  String getUnitType()
          The type of this unit is equal to AdapterUnit.PYRAMIDTYPE.
protected  boolean setFocus(double mm)
          Sets the focus position on the telescope as an absolute mm value.
protected  boolean setFocusOffset(double mm)
          Sets the focus position on the telescope as an absolute mm value.
protected  void setMaster(AdapterMaster chef)
          Sets the adapter master.
 
Methods inherited from class stella.adapter.FocussingMoments
doFocusTask, isValid, setAbort
 
Methods inherited from class stella.adapter.FocussingUnit
setIncrease
 
Methods inherited from class stella.adapter.AdapterUnit
getGuider, getMaster, getTelescope, isManual, resetUnit, setGuider, setManual, setTelescope
 
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

MIRRORTYPE

public static final String MIRRORTYPE
Id for prime focus coarse.

See Also:
Constant Field Values

KEY_FOCUSMODEL

public static final String KEY_FOCUSMODEL
The focus of the telescope as a parameter.

See Also:
Constant Field Values

KEY_MINIMUMFOCUS

public static final String KEY_MINIMUMFOCUS
The minimum focus we allow with this method.

See Also:
Constant Field Values

KEY_MAXIMUMFOCUS

public static final String KEY_MAXIMUMFOCUS
The minimum focus we allow with this method.

See Also:
Constant Field Values

KEY_ALTSHIFT

public static final String KEY_ALTSHIFT
Points to the offset to apply to altitude before focusing.

See Also:
Constant Field Values

DEFFOCUSMODEL

public static final String DEFFOCUSMODEL
The default name of the focus parameter.

See Also:
Constant Field Values

DEFMAXIMUMFOCUS

private static final double DEFMAXIMUMFOCUS
Soft limit for minimum focus (hard at 89.). Temperature mod at -5

See Also:
Constant Field Values

DEFMINIMUMFOCUS

private static final double DEFMINIMUMFOCUS
Soft limit for minimum focus (hard at 0.). Temperature mod at +25.

See Also:
Constant Field Values

DEFFOCUSOFFSET

private static final double DEFFOCUSOFFSET
Default focusoffset fine.

See Also:
Constant Field Values

DEFSEARCHOFFSET

private static final double DEFSEARCHOFFSET
Default focusoffset on step, where we search a coarse focus.

See Also:
Constant Field Values

DEFALTSHIFT

private static final double DEFALTSHIFT
Shift the image by 30 pixel to avoid obsuration by the pinhole.

See Also:
Constant Field Values

DEFMAXFOCUSEXPOSE

private static final long DEFMAXFOCUSEXPOSE
The maximum exposure time for true moment analysis.

See Also:
Constant Field Values

tempfocus

private Value tempfocus
For coarse focusing, we need the environemt focus.

Constructor Detail

MirrorFocus

public MirrorFocus(Map<String,String> prop)
Constructs a new focussing unit. On registering of the master we query the driver for the linear stage.

Method Detail

getMinimumFocus

public double getMinimumFocus()
Returns the minimum focus step this unit can reach, which is step 0.

Specified by:
getMinimumFocus in class FocussingMoments

getMaximumFocus

public double getMaximumFocus()
Returns the maximum focus step this unit can reach, which is step 31400 something.

Specified by:
getMaximumFocus in class FocussingMoments

getUnitType

protected String getUnitType()
The type of this unit is equal to AdapterUnit.PYRAMIDTYPE.

Specified by:
getUnitType in class AdapterUnit

setMaster

protected void setMaster(AdapterMaster chef)
Sets the adapter master.

Overrides:
setMaster in class FocussingMoments

doUnitTask

protected ErrorEvent doUnitTask(String mode)
Task of this unit is to auto focus after a successful acquire. Currently, no offset from the acquire position is neecded, thus we can directly spawn the FocussingMoments.doFocusTask(java.lang.String)

Specified by:
doUnitTask in class AdapterUnit
Parameters:
mode - If the unit supports more than a single mode, otherwise null
Returns:
null on okay, or an ErrorEvent desribing the failure.

crudeFocus

protected double crudeFocus()
We position the linear sledge at the temperature model focus. This position is returned, if applicable, otherwise -1 is returned.

Specified by:
crudeFocus in class FocussingMoments

setFocus

protected boolean setFocus(double mm)
Sets the focus position on the telescope as an absolute mm value. Checking of range is done by the underlying driver.

Specified by:
setFocus in class FocussingUnit

setFocusOffset

protected boolean setFocusOffset(double mm)
Sets the focus position on the telescope as an absolute mm value. Checking of range is done by the underlying driver.

Specified by:
setFocusOffset in class FocussingUnit