public class OffAxisTracker extends GuidingUnit
createGuiderLoop(long).| Modifier and Type | Class and Description |
|---|---|
private class |
OffAxisTracker.GuiderLoop
The timer task that does the actual guiding.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Rectangle2D |
catalog
Extra space on guiding, normally zero.
|
private static String |
CONTINUOUSSEEING
Properties of the internal seeing monitor.
|
private ShelfStatistic |
contseeing
The value with continuous seeing.
|
private int |
currentguider
Counting the guider frames.
|
private int |
datamax
Datamax on guiding, from guider mode.
|
private int |
datamin
Datamin on guiding, from guider mode.
|
private static double |
DEFABORTLEFT
The default minimum time left for reacquire requests, ms.
|
static int |
DEFAPERTURE
An integer value of the aperture size.
|
private static Dimension |
DEFENLARGEGUIDE
The default pixel enlargement during guide.
|
static String |
DEFEXPOSURETIMELEFT
The default name of the parameter holding the exposure time left .
|
private static double |
DEFFRACTION
The default maximum fraction for reacquire/mode switch requests.
|
static String |
DEFFRACTIONALEXPOSE
The default name of the parameter holding the fractional exposure time.
|
private static boolean |
DEFKEEPGUIDEFITS
If true, all guiding fits are kept on disc.
|
private static int |
DEFKEEPGUIDEWHAT
An integer specifying which guider fits to keep.
|
static String |
DEFLIGHTGAIN
The default name of the parameter accumulating light losses.
|
static String |
DEFLIGHTLOSS
The default name of the parameter accumulating light losses.
|
static String |
DEFLOSTCOUNT
The default name of the parameter counting guiding losses
|
private static double |
DEFMAGERROR
An estimate of the mgnitude error.
|
private static double |
DEFMAXDEVBACK
Which quadrant in the background box to use.
|
private static double |
DEFMINSIGNAL
Signal, if 3 sigma above background.
|
private static int |
DEFMODECHANGE
The default number of minimum guider losts for mode change.
|
private static double |
DEFMODEFREQUENCY
The default minimum occurence frequency of guider losts.
|
private static double |
DEFMODESEEING
The default maximum seeing for good seeing guiding.
|
private static double |
DEFMODESWITCHLEFT
The default minimum time left for mode switch requests, ms.
|
private static double |
DEFMODEWIND
The default maximum wind speed for non-wind guiding.
|
static String |
DEFOFFSETAVERAGE
The default name of the parameter counting arcsec offsets.
|
private static int |
DEFPINHOLEBACK
Background around pinhole box.
|
private static int |
DEFPINHOLEBOX
Box around pinhole, half-size unbinned.
|
private static double |
DEFPOSITIONERROR
An estimate of the catalog errors in pixels on ccd.
|
private static double |
DEFREACQUIRELEFT
The default minimum time left for reacquire requests, ms.
|
private static long |
DEFROWTIMING
Read out time for a single row, acquire frame.
|
static String |
DEFSEEING
The default name of the parameter accumulating guiding seeing.
|
static String |
DEFSPURIOUSCOUNT
The default name of the parameter counting guidng losses
|
private static double |
DEFSPURIOUSSIGNAL
ADU sum of valid points must not be lower than this.
|
private static int |
DEFVALIDPOINTS
For the offset recovered, at least this number of points with signal.
|
private static boolean |
DEFWAITONGUIDE
If true, we wait for offset completion on guide.
|
static String |
DEFWINDMAX
The default name of the parameter holding windspeed max.
|
private Value |
exposuretimeleft
The Value holding the exposure time left.
|
private Value |
fractionalexpose
The value holding the fractional exposure time.
|
private Star |
guide |
private long |
guideexpose
The exposure time for the guider applied on the CCD.
|
private long |
guiderawexpose
The exposure time for the guider without increase.
|
private int |
guidinglost
The counter of repetitive guiding failures.
|
private String |
guidingmode
The identifier of the guider mode, set by the master before unit task.
|
private Value |
highwind
The value with wind peaks.
|
private double |
increase
A value set from the outside signaling increased exposure time.
|
static String |
KEY_ABORTLEFT
To request an abort, at least this exposure time must remain.
|
static String |
KEY_APERTURE
On aperture photometry the radius of the square box, unbinned.
|
static String |
KEY_ENLARGEGUIDE
A gray-zone around the guide field for catalog star inclusion.
|
static String |
KEY_EXPOSURETIMELEFT
The parameter holding the exposure time left.
|
static String |
KEY_FRACTION
No reposition or change mode after this fraction of exposure time.
|
static String |
KEY_FRACTIONALEXPOSE
The parameter holding the fractional exposure time.
|
static String |
KEY_KEEPGUIDEFITS
If true, all guiding fits are kept on disc.
|
static String |
KEY_KEEPGUIDEWHAT
An integer specifying which guider fits to keep.
|
static String |
KEY_LIGHTGAIN
Issued to the local parameter cluster as the light loss estimate.
|
static String |
KEY_LIGHTLOSS
Issued to the local parameter cluster as the light loss estimate.
|
static String |
KEY_LOSTCOUNT
Issued to the local parameter cluster as number of target losts.
|
static String |
KEY_MAGERROR
An estimate of the magnitude errors.
|
static String |
KEY_MAXDEVBACK
Which quadrant in the background box to use.
|
static String |
KEY_MINSIGNAL
Signal, if 3 sigma above background.
|
static String |
KEY_MODECHANGE
Minimum lost guidings to allow mode change.
|
static String |
KEY_MODEFREQUENCY
Minimum frequency of guiding losts to allow mode change.
|
static String |
KEY_MODEPROPERTIES
Modes are defined as MODE_XXX+this key, e.g.
|
static String |
KEY_MODESEEING
Minimum seeing at guiding to allow mode change.
|
static String |
KEY_MODESWITCHLEFT
To request a mode switch, at least this exposure time must remain.
|
static String |
KEY_MODEWIND
Minimum wind speed at guiding to allow mode change.
|
static String |
KEY_OFFSETAVERAGE
Issued to the local parameter cluster as average offset.
|
static String |
KEY_PINHOLEBACK
Background around pinhole box.
|
static String |
KEY_PINHOLEBOX
Box around pinhole.
|
static String |
KEY_POSITIONERROR
An estimate of the catalog errors in pixels on ccd.
|
static String |
KEY_REACQUIRELEFT
To request a reposition, at least this exposure time must remain.
|
static String |
KEY_ROWTIMING
Row read-out time for bright strip detection.
|
static String |
KEY_SPURIOUSCOUNT
Issued to the local parameter cluster as number of guiding losts.
|
static String |
KEY_SPURIOUSSIGNAL
ADU sum of valid points must not be lower than this.
|
static String |
KEY_VALIDPOINTS
For the offset recovered, at least this number of points with signal.
|
static String |
KEY_WAITONGUIDE
If true, we wait for offset completion on guide.
|
private Value |
lightgain
The value with median of light gain.
|
private Value |
lightloss
The value averaging light-loss
|
private Value |
lostcount
The value counting the severe guiding losts.
|
private List<Vector2D> |
losts
A list of az/alt offsets, used on permanent misses, but not star lost.
|
private GuiderMode |
mode
The current guiding mode, initialized on unit task.
|
private int |
modeswitch
The counter of absolute guider losts for mode change.
|
private EncoderOffsetTelescope |
offsetcommand
Re-use the offset command.
|
private List<Vector2D> |
offsets
A list of az/alt offsets.
|
private boolean |
onstar
True, if we are currently on star.
|
private Value |
pinholemiss
The value averaging pinhole-offsets.
|
private static boolean |
running
If this method is true, another task is running and we exit.
|
private int |
searchbox
Search box on guiding, from guider mode.
|
private Value |
spuriouscount
The value counting the spurious guiding losts.
|
private int |
starlost
The counter of repetitive star-not-visible.
|
private int |
targetlost
The counter of repetitive target failures.
|
private Value |
targetseeing
The value averaging per-target seeing.
|
allowswitch, KEY_SEEING, KEY_WINDMAX, MODE_AUTO, MODE_NORMAL, MODE_SEEING, MODE_TRACKING, MODE_WIND, offrecord, pidrecordACQUIRETYPE, GUIDERTYPE, PYRAMIDTYPEKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
OffAxisTracker(Map<String,String> prop)
Constructs a new guider unit.
|
| Modifier and Type | Method and Description |
|---|---|
protected TimerTask |
createGuiderLoop(long repeatperiod)
Creates the guider loop, which can be used as a timer task.
|
protected ErrorEvent |
doUnitTask(String m)
Doing the unit task means start guiding.
|
protected long |
getExposureTime()
Returns the guider exposure time, available after unit task.
|
protected Star |
getGuideStar()
Returns the guide star.
|
protected GuiderMode |
getMode()
Returns the currently active guider mode.
|
protected String |
getUnitType()
The type of the guider unit is
AdapterUnit.GUIDERTYPE. |
void |
init() |
protected boolean |
isValid()
We are valid only if a guider mode is set.
|
private boolean |
isViable(double left)
Checks, if sending an error to request new guiding mode or to reposition
the telescope is feasible.
|
protected void |
requestMode(String newmode)
Sets the guiding mode as the identifier string.
|
protected void |
resetUnit()
Resets the guider unit.
|
private double |
seeingAndPhotometry(Guiding.RawStar pinhole)
Takes a guiding signal and estimates seeing and photometry from it.
|
protected void |
setExposure(Value timeleft,
Value fractional)
Sets the values related to exposure time.
|
protected void |
setGuideStar(Star parsed)
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 |
setGuidingLost(Value losses)
Sets the value counting the spurious guiding losses.
|
protected void |
setLightGain(Value gain)
Sets the value with the light gain median.
|
protected void |
setLightLoss(Value loss)
Sets the value with the light loss averager.
|
protected void |
setMaster(AdapterMaster chef)
Sets the adapter master.
|
protected void |
setPinholeMiss(Value miss)
Sets the value with the target seeing.
|
protected void |
setSeeing(Value seeing)
Sets the value with the target seeing.
|
protected void |
setTargetLost(Value losses)
Sets the value counting the spurious guiding losses.
|
protected void |
setWindPeak(Value windmax)
Sets the value with the high-peaked winds.
|
setAllowSwitch, setIncrease, setOffsetStream, setPIDStreamgetGuider, getMaster, getTelescope, isManual, setGuider, setManual, setTelescopeclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiespublic static final String KEY_LOSTCOUNT
public static final String KEY_SPURIOUSCOUNT
public static final String KEY_OFFSETAVERAGE
public static final String KEY_LIGHTLOSS
public static final String KEY_LIGHTGAIN
public static final String KEY_EXPOSURETIMELEFT
public static final String KEY_FRACTIONALEXPOSE
public static final String KEY_MODEPROPERTIES
public static final String KEY_ENLARGEGUIDE
public static final String KEY_WAITONGUIDE
public static final String KEY_KEEPGUIDEFITS
public static final String KEY_KEEPGUIDEWHAT
public static final String KEY_ROWTIMING
public static final String KEY_APERTURE
public static final String KEY_POSITIONERROR
public static final String KEY_MAGERROR
public static final String KEY_MODECHANGE
public static final String KEY_MODEFREQUENCY
public static final String KEY_MODEWIND
public static final String KEY_MODESEEING
public static final String KEY_REACQUIRELEFT
public static final String KEY_ABORTLEFT
public static final String KEY_MODESWITCHLEFT
public static final String KEY_FRACTION
public static final String KEY_PINHOLEBOX
public static final String KEY_PINHOLEBACK
public static final String KEY_MAXDEVBACK
public static final String KEY_MINSIGNAL
public static final String KEY_VALIDPOINTS
public static final String KEY_SPURIOUSSIGNAL
public static final String DEFLOSTCOUNT
public static final String DEFSPURIOUSCOUNT
public static final String DEFOFFSETAVERAGE
public static final String DEFSEEING
public static final String DEFLIGHTLOSS
public static final String DEFLIGHTGAIN
public static final String DEFWINDMAX
public static final String DEFEXPOSURETIMELEFT
public static final String DEFFRACTIONALEXPOSE
private static final Dimension DEFENLARGEGUIDE
private static final boolean DEFWAITONGUIDE
private static final boolean DEFKEEPGUIDEFITS
private static final int DEFKEEPGUIDEWHAT
public static final int DEFAPERTURE
private static final long DEFROWTIMING
private static final double DEFPOSITIONERROR
private static final double DEFMAGERROR
private static final int DEFMODECHANGE
private static final double DEFMODEFREQUENCY
private static final double DEFMODEWIND
private static final double DEFMODESEEING
private static final double DEFREACQUIRELEFT
private static final double DEFABORTLEFT
private static final double DEFMODESWITCHLEFT
private static final double DEFFRACTION
private static final String CONTINUOUSSEEING
private static final int DEFPINHOLEBOX
private static final int DEFPINHOLEBACK
private static final double DEFMAXDEVBACK
private static final double DEFMINSIGNAL
private static final int DEFVALIDPOINTS
private static final double DEFSPURIOUSSIGNAL
private String guidingmode
private GuiderMode mode
private Value spuriouscount
private Value lostcount
private Value highwind
private Value lightloss
private Value lightgain
private final ShelfStatistic contseeing
private Value targetseeing
private Value pinholemiss
private Value exposuretimeleft
private Value fractionalexpose
private double increase
private Rectangle2D catalog
private long guiderawexpose
private long guideexpose
private int datamin
private int datamax
private int searchbox
private static boolean running
private int currentguider
private boolean onstar
private int guidinglost
private int starlost
private int targetlost
private int modeswitch
private EncoderOffsetTelescope offsetcommand
private List<Vector2D> losts
private Star guide
public OffAxisTracker(Map<String,String> prop)
public void init()
throws InitException
init in interface Initializableinit in class AdapterUnitInitExceptionprotected boolean isValid()
isValid in class AdapterUnitprotected long getExposureTime()
getExposureTime in class GuidingUnitprotected void requestMode(String newmode)
requestMode in class GuidingUnitprotected void setMaster(AdapterMaster chef)
setMaster in class AdapterUnitprotected void setGuidingLost(Value losses)
protected void setTargetLost(Value losses)
protected void setWindPeak(Value windmax)
protected void setSeeing(Value seeing)
protected void setLightLoss(Value loss)
protected void setLightGain(Value gain)
protected void setPinholeMiss(Value miss)
protected void setExposure(Value timeleft, Value fractional)
timeleft - The value holding the exposure time left.fractional - The value holding the fraction of exposure done.protected String getUnitType()
AdapterUnit.GUIDERTYPE.getUnitType in class AdapterUnitprotected GuiderMode getMode()
getMode in class GuidingUnitprotected ErrorEvent doUnitTask(String m)
GuidingUnit.MODE_AUTO, the mode is calculated from the current wind,
otherwise the appropriate guider mode is loaded. The unit task does not
start or create the guider loop, this must be done after the unti
task by a call to createGuiderLoop(long).doUnitTask in class AdapterUnitm - If the unit supports more than a single mode, otherwise nullprotected void setGuideStar(Star parsed)
protected Star getGuideStar()
protected TimerTask createGuiderLoop(long repeatperiod)
createGuiderLoop in class GuidingUnitprotected void resetUnit()
resetUnit in class AdapterUnitprivate double seeingAndPhotometry(Guiding.RawStar pinhole)
pinhole - The direct image of the star on the pinholeprivate boolean isViable(double left)
left - The time in ms that must be left on the exposure.