stella.adapter
Class AuxiliaryCaptureUnit

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.adapter.AuxiliaryUnit
                  extended by stella.adapter.AuxiliaryCaptureUnit
All Implemented Interfaces:
Cloneable, Guiding.RawFrame, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
Direct Known Subclasses:
AuxiliaryCoarseUnit, AuxiliaryFineUnit, AuxiliaryGuidingUnit

public abstract class AuxiliaryCaptureUnit
extends AuxiliaryUnit

The adapter sub-unit that does acquiring on a target star. This class splits further into a coarse and a fine acquire, this class only defines methods needed in both.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFMAGERROR
          An estimate of the mgnitude error.
private static long DEFMINOFFTIME
          Default minimum readout time, constatn offset in ms.
private static double DEFMINTIME
          Default minimum readout time per squre pixel.
private static double DEFPOSITIONERROR
          An estimate of the catalog errors in pixels on ccd.
private static boolean DEFUSECENTRAL
          Default use of central source.
private  StarDescription guide
          This star is set with a set-guide command or overruled with acquire.
private  boolean guidecenter
          If the guide star is at the center, this is true.
private  boolean guidenew
          This logger boolean gets true when a new guide star was set.
static String KEY_DATAMAX
          A default data maximum value for star detection.
static String KEY_DATAMIN
          A default data minimum value for star detection.
static String KEY_EXPOSE
          Signal to noise wanted on acquire.
static String KEY_KEEPFITS
          If true, all acquire fits are kept on disc.
static String KEY_KEEPWHAT
          An integer specifying which acquire fits to keep.
static String KEY_MAGERROR
          An estimate of the magnitude errors.
static String KEY_MINOFFTIME
          Minimum exposure time constant offset in ms.
static String KEY_MINTIME
          Minimum exposure time per pixel read in ms.
static String KEY_POSITIONERROR
          An estimate of the catalog errors in pixels on ccd.
static String KEY_ROWTIMING
          Row read-out time for bright strip detection.
static String KEY_SAFETYOFFSET
          The expected maximum distance of target to pinhole after pointing.
static String KEY_SEARCHBOX
          A search box for star detection, unbinned.
static String KEY_USECENTRAL
          On-axis instrument like spectrographs should deliver true here.
 
Fields inherited from class stella.adapter.AuxiliaryUnit
COARSETYPE, FINETYPE, GUIDERTYPE, KEY_FALLBACK, KEY_GUIDERTILE, PINHOLETYPE
 
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
protected AuxiliaryCaptureUnit(Map<String,String> prop)
          Constructs a new acquire unit.
 
Method Summary
protected  boolean canUseCentral()
          This method returns true if we should and can use the central star.
protected  double getCaptureSignal()
          Subclasses that have more than a single target S/N must intervene here, the default implementation returns its property value.
protected  long getCaptureTime(StarDescription onto)
          Calculates the exposure time that should be used for the guider ccd.
protected  Point2D getFocusPoint()
          For acquire or guiding, the focus of interest is always a pixel on the ccd close to the star that is used for acquiring and guiding.
protected  StarDescription getGuideStar()
          Returns the guide star.
protected  long getMinimumCaptureTime()
          Subclasses should return the minimum exposure time applicable to the auxiliar guider system here.
 void init()
          On init, we check if all quantities that have keys are there.
protected  boolean isGuideCenter()
          Returns true, if the guide star is also at the center of the FoV.
protected  boolean isUseCentral()
          If this returns true, acquiring on the main star and acquiring on the center of rotation (the optical axis) is desirable, even if this is not the brightest star in the fov.
protected  void setGuideStar(double ra, double de, float mag, float bv, boolean central)
          The acquire command carries the right ascension and declination as well as the magnitude and a possible color index of the central target star.
protected  void setGuideStar(StarDescription parsed, boolean central)
          The acquire command carries the right ascension and declination as well as the magnitude and a possible color index of the central target star.
 
Methods inherited from class stella.adapter.AuxiliaryUnit
doAuxiliaryTask, getAuxiliaryType, getBiasFrame, getBiasTime, getBinning, getDarkFrame, getDarkTime, getGuider, getMaster, getReadoutFrame, getTelescope, isManual, isValid, setGuider, setManual, setMaster, 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, 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
 

Field Detail

KEY_KEEPFITS

public static final String KEY_KEEPFITS
If true, all acquire fits are kept on disc.

See Also:
Constant Field Values

KEY_KEEPWHAT

public static final String KEY_KEEPWHAT
An integer specifying which acquire fits to keep.

See Also:
Constant Field Values

KEY_EXPOSE

public static final String KEY_EXPOSE
Signal to noise wanted on acquire.

See Also:
Constant Field Values

KEY_ROWTIMING

public static final String KEY_ROWTIMING
Row read-out time for bright strip detection.

See Also:
Constant Field Values

KEY_MINOFFTIME

public static final String KEY_MINOFFTIME
Minimum exposure time constant offset in ms.

See Also:
Constant Field Values

KEY_MINTIME

public static final String KEY_MINTIME
Minimum exposure time per pixel read in ms.

See Also:
Constant Field Values

KEY_DATAMIN

public static final String KEY_DATAMIN
A default data minimum value for star detection.

See Also:
Constant Field Values

KEY_DATAMAX

public static final String KEY_DATAMAX
A default data maximum value for star detection.

See Also:
Constant Field Values

KEY_SEARCHBOX

public static final String KEY_SEARCHBOX
A search box for star detection, unbinned.

See Also:
Constant Field Values

KEY_POSITIONERROR

public static final String KEY_POSITIONERROR
An estimate of the catalog errors in pixels on ccd.

See Also:
Constant Field Values

KEY_MAGERROR

public static final String KEY_MAGERROR
An estimate of the magnitude errors.

See Also:
Constant Field Values

KEY_USECENTRAL

public static final String KEY_USECENTRAL
On-axis instrument like spectrographs should deliver true here.

See Also:
Constant Field Values

KEY_SAFETYOFFSET

public static final String KEY_SAFETYOFFSET
The expected maximum distance of target to pinhole after pointing.

See Also:
Constant Field Values

DEFPOSITIONERROR

private static final double DEFPOSITIONERROR
An estimate of the catalog errors in pixels on ccd.

See Also:
Constant Field Values

DEFMAGERROR

private static final double DEFMAGERROR
An estimate of the mgnitude error.

See Also:
Constant Field Values

DEFUSECENTRAL

private static final boolean DEFUSECENTRAL
Default use of central source.

See Also:
Constant Field Values

DEFMINTIME

private static final double DEFMINTIME
Default minimum readout time per squre pixel.

See Also:
Constant Field Values

DEFMINOFFTIME

private static final long DEFMINOFFTIME
Default minimum readout time, constatn offset in ms.

See Also:
Constant Field Values

guide

private StarDescription guide
This star is set with a set-guide command or overruled with acquire.


guidecenter

private boolean guidecenter
If the guide star is at the center, this is true.


guidenew

private boolean guidenew
This logger boolean gets true when a new guide star was set.

Constructor Detail

AuxiliaryCaptureUnit

protected AuxiliaryCaptureUnit(Map<String,String> prop)
Constructs a new acquire unit.

Method Detail

init

public void init()
On init, we check if all quantities that have keys are there.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyResources

setGuideStar

protected void setGuideStar(double ra,
                            double de,
                            float mag,
                            float bv,
                            boolean central)
The acquire command carries the right ascension and declination as well as the magnitude and a possible color index of the central target star. This method should be called before the unit task is started.


setGuideStar

protected void setGuideStar(StarDescription parsed,
                            boolean central)
The acquire command carries the right ascension and declination as well as the magnitude and a possible color index of the central target star. This method should be called before the unit task is started.


getGuideStar

protected StarDescription getGuideStar()
Returns the guide star.


isGuideCenter

protected boolean isGuideCenter()
Returns true, if the guide star is also at the center of the FoV. This is always the case for guiding and fine acquire, but might be realxed for coarse acquire (where it might be the brightest star).


isUseCentral

protected boolean isUseCentral()
If this returns true, acquiring on the main star and acquiring on the center of rotation (the optical axis) is desirable, even if this is not the brightest star in the fov. Only if the main target will not be visible in the guider (i.e. the expected exposure time exceeds the maximum exposure time on the guider), the brightest star in the field is used. If this method returns false, acquiring is always done on the brightest star.


canUseCentral

protected boolean canUseCentral()
This method returns true if we should and can use the central star. First, isUseCentral() must return true and, second, the exposure time required on the central star must be smaller than the maximum exposure time on the guider.


getFocusPoint

protected Point2D getFocusPoint()
For acquire or guiding, the focus of interest is always a pixel on the ccd close to the star that is used for acquiring and guiding. From the star's position #getFocusStar, we calculate pixel positions using the guider calculus.

Specified by:
getFocusPoint in class AuxiliaryUnit

getMinimumCaptureTime

protected long getMinimumCaptureTime()
Subclasses should return the minimum exposure time applicable to the auxiliar guider system here. The minimum exposure time on a shutterless system depends on the read-out time and the size of the window that is read out. If the integration time gets too short, the star trail during readout may carry as much signal as the star itself. This must be avoided, either by reading out a smaller frame or by exposing longer.
The default implementation grabs the readout size and multiplies it with the area of the readout-rectangle.


getCaptureSignal

protected double getCaptureSignal()
Subclasses that have more than a single target S/N must intervene here, the default implementation returns its property value.


getCaptureTime

protected long getCaptureTime(StarDescription onto)
Calculates the exposure time that should be used for the guider ccd. This method does the following. First, it queries, if we should use the central star, which is the argument star. If so, the exposure time required for this star to reach the appropriate S/N is calculated. If this time is below the guiders maximum exposure time, we are finished. If this time is longer than the maximum exposure time, we select the brightest star out of the field of view (the brightest star is also selected, if we are not bound to use the central star). Note that the brightest star must also show up on the guider ccd, thus the pointing error plus the offset of this brightest star must be within the frame, see #getBrightestStar. Then, the exposure time for this star is calculated. If this again is above the threshold, 0 is returned.