public class AuxiliaryGuidingUnit extends AuxiliaryCaptureUnit implements FrameShifting, PostReducing
#createGuiderLoop.PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowswitch
If true, the guider is allowed to request a guider mode change.
|
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.
|
static int |
DEFAPERTURE
An integer value of the aperture size.
|
private static Dimension |
DEFENLARGEGUIDE
The default pixel enlargement during guide.
|
private static double |
DEFFRACTION
The default maximum fraction for reacquire/mode switch requests.
|
static int |
DEFGUIDERTILE
An integer value of the guiding tile size index.
|
private static boolean |
DEFKEEPFITS
If true, all guiding fits are kept on disc.
|
private static int |
DEFKEEPWHAT
An integer specifying which guider fits to keep.
|
private static double |
DEFMAGERROR
An estimate of the mgnitude error.
|
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.
|
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, guiding frame in mu-seconds.
|
private static double |
DEFSIGNIFICANCE
The default maximum fraction for reacquire/mode switch requests.
|
private static boolean |
DEFWAITONGUIDE
If true, we wait for offset completion on guide.
|
private Value |
exposuretimeleft
The Value holding the exposure time left.
|
private long |
expt
The exposure time for the guider applied on the CCD.
|
private Value |
fractionalexpose
The value holding the fractional exposure time.
|
private long |
guideraw
The exposure time for the guider without increase.
|
private Star |
guidestar
The guide star.
|
private int |
guidinglost
The counter of repetitive guiding failures.
|
private Value |
highwind
The value with wind peaks.
|
private double |
increase
A value set from the outside signaling increased exposure time.
|
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_FRACTION
No reposition or change mode after this fraction of exposure time.
|
static String |
KEY_MODECHANGE
Minimum lost guidings to allow mode change, zero is no 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_REACQUIRELEFT
To request a reposition, at least this exposure time must remain.
|
static String |
KEY_SIGNIFICANCE
The sigma-level for an offset average to be significant.
|
static String |
KEY_WAITONGUIDE
If true, we wait for offset completion on guide.
|
private long |
lastsent
The time of the last PID query.
|
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.
|
static String |
MODE_AUTO
Auto mode, select best as you think...
|
static String |
MODE_NORMAL
Normal guider mode.
|
static String |
MODE_SEEING
Bad seeing guider mode.
|
static String |
MODE_TRACKING
No-guiding mode, pure tracking.
|
static String |
MODE_WIND
High wind guider mode.
|
private int |
modeswitch
The counter of absolute guider losts for mode change.
|
private DataOutputStream |
offrecord
An object output stream were we serialize our alt/az offs in.
|
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 DataOutputStream |
pidrecord
An object output stream were we serialize our alt/az offs in.
|
private Value |
pinholemiss
The value averaging pinhole-offsets.
|
private boolean |
running
If this method is true, another task is running and we exit.
|
private Value |
spuriouscount
The value counting the spurious guiding losts.
|
private int |
starlost
The counter of repetitive star-not-visible.
|
private long |
start
The starting time of the guider loop.
|
private int |
targetlost
The counter of repetitive target failures.
|
private Value |
targetseeing
The value averaging per-target seeing.
|
KEY_DATAMAX, KEY_DATAMIN, KEY_EXPOSE, KEY_KEEPFITS, KEY_KEEPWHAT, KEY_MAGERROR, KEY_MINOFFTIME, KEY_MINTIME, KEY_POSITIONERROR, KEY_ROWTIMING, KEY_SAFETYOFFSET, KEY_SEARCHBOX, KEY_USECENTRALCOARSETYPE, FINETYPE, GUIDERTYPE, KEY_BINNING, KEY_FALLBACK, KEY_GUIDERTILE, KEY_USETILING, PINHOLETYPEKEY_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 |
|---|
AuxiliaryGuidingUnit(Map<String,String> prop)
Constructs a new guider unit.
|
| Modifier and Type | Method and Description |
|---|---|
private Vector2D |
averageAzAltShift(List<Vector2D> shifts)
Averages a list of az/alt offsets stored as two-dimensional vectors.
|
private void |
cancel()
Canceling means stop the continuous mode.
|
private boolean |
check(Value v,
double above)
Check, if the value is non-null, its value is non-null and if this value
is higher than the supplied double.
|
protected ErrorEvent |
doAuxiliaryTask(String guidingmode)
Doing the unit task means start guiding.
|
protected String |
getAuxiliaryType()
The type of the guider unit is
AdapterUnit.GUIDERTYPE. |
protected double |
getExposureSN()
If we have a guider mode established, return the mode's exposure signal
instead of the default one.
|
protected long |
getExposureTime()
Returns the guider exposure time, available after unit task.
|
Guiding.RawFrame |
getFrame()
If we can use the center, we return the nominal frame here, otherwise we
calculate the frame around the guiding star, which is also the focus
star.
|
protected GuiderMode |
getMode()
Returns the currently active guider mode.
|
void |
init()
Initializes the guiding unit.
|
boolean |
isMovingFrame()
We have a moving frame, if we cannot use the central object for guiding.
|
private boolean |
isViable(double left)
Checks, if sending an error to request new guiding mode or to reposition
the telescope is feasible.
|
private Vector2D |
measureInitialOffset(Star gs)
This is similar to the coarse acquire, we try to find the guide star on
the CCD and record the az-alt offset.
|
void |
postProcess(List<Guiding.RawStar> found)
The method does the actual guiding.
|
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 |
setAllowSwitch(boolean modechange)
Sets the state of the allow switch.
|
protected void |
setExposure(Value timeleft,
Value fractional)
Sets the values related to exposure time.
|
protected void |
setGuidingLost(Value losses)
Sets the value counting the spurious guiding losses.
|
protected void |
setIncrease(double afteracquire)
Sets the increase value.
|
protected void |
setOffsetStream(DataOutputStream open)
Sets a stream that should be used to serialize the offset data into.
|
protected void |
setPIDStream(DataOutputStream open)
Sets a stream that should be used to serialize the pids data into.
|
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.
|
private void |
writeRecord(DataOutputStream record,
double az,
double alt)
If the record file is non null, write the two doubles as floats into it.
|
applyOffsetMeasure, canUseCentral, getCaptureSignal, getCaptureTime, getFocusPoint, getGuideStar, getMinimumCaptureTime, getOffsetMeasure, isGuideCenter, isUseCentral, setGuideStar, setGuideStar, setOffsetMeasuregetBiasFrame, getBiasTime, getBinning, getDarkFrame, getDarkTime, getGuider, getMaster, getReadoutFrame, getTelescope, isManual, isValid, setGuider, setManual, setMaster, 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 MODE_AUTO
public static final String MODE_NORMAL
public static final String MODE_SEEING
public static final String MODE_WIND
public static final String MODE_TRACKING
public static final String KEY_MODEPROPERTIES
public static final String KEY_ENLARGEGUIDE
public static final String KEY_WAITONGUIDE
public static final String KEY_APERTURE
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_MODESWITCHLEFT
public static final String KEY_FRACTION
public static final String KEY_SIGNIFICANCE
private static final Dimension DEFENLARGEGUIDE
private static final boolean DEFWAITONGUIDE
private static final boolean DEFKEEPFITS
private static final int DEFKEEPWHAT
public static final int DEFGUIDERTILE
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 DEFMODESWITCHLEFT
private static final double DEFFRACTION
private static final double DEFSIGNIFICANCE
private static final String CONTINUOUSSEEING
private GuiderMode mode
private Value spuriouscount
private Value lostcount
private Value highwind
private ShelfStatistic contseeing
private Value targetseeing
private Value pinholemiss
private Value exposuretimeleft
private Value fractionalexpose
private double increase
private Star guidestar
private long guideraw
private long expt
private long start
private boolean running
private int currentguider
private long lastsent
private boolean onstar
private int guidinglost
private int starlost
private int targetlost
private boolean allowswitch
private int modeswitch
private EncoderOffsetTelescope offsetcommand
private List<Vector2D> losts
private DataOutputStream offrecord
private DataOutputStream pidrecord
public AuxiliaryGuidingUnit(Map<String,String> prop)
public void init()
throws InitException
init in interface Initializableinit in class AuxiliaryCaptureUnitInitExceptionprotected void setAllowSwitch(boolean modechange)
protected long getExposureTime()
protected void setIncrease(double afteracquire)
protected void setGuidingLost(Value losses)
protected void setTargetLost(Value losses)
protected void setWindPeak(Value windmax)
protected void setSeeing(Value seeing)
protected void setPinholeMiss(Value miss)
protected void setOffsetStream(DataOutputStream open)
protected void setPIDStream(DataOutputStream open)
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 getAuxiliaryType()
AdapterUnit.GUIDERTYPE.getAuxiliaryType in class AuxiliaryUnitprotected GuiderMode getMode()
protected ErrorEvent doAuxiliaryTask(String guidingmode)
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.doAuxiliaryTask in class AuxiliaryUnitguidingmode - An integer specifying the action to be taken.protected void resetUnit()
protected double getExposureSN()
private 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.public boolean isMovingFrame()
isMovingFrame in interface FrameShiftingpublic Guiding.RawFrame getFrame()
getFrame in interface FrameShiftingpublic void postProcess(List<Guiding.RawStar> found)
Guiding#RawStar
objects.postProcess in interface PostReducingfound - A list of Guiding#RawStars.private void cancel()
private final boolean check(Value v, double above)
private Vector2D averageAzAltShift(List<Vector2D> shifts)
KEY_SIGNIFICANCE times the standard deviation, it is set to
zero.private void writeRecord(DataOutputStream record, double az, double alt)