|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiListener
stella.rmi.AbstractRmiCasterAndListener
stella.rmi.ReceiverTorso
stella.rmi.GenericMaster
stella.adapter.AdapterMaster
public class AdapterMaster
This class handles the adapter communication to the SCS. It extends the
CalibrationMaster and additionally understands the
following commands:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class stella.rmi.GenericMaster |
|---|
GenericMaster.Standalone |
| Nested classes/interfaces inherited from class stella.rmi.ReceiverTorso |
|---|
ReceiverTorso.CommandHandler |
| Nested classes/interfaces inherited from class util.PropertyContainer |
|---|
PropertyContainer.URLResource |
| Field Summary | |
|---|---|
private boolean |
abate
True, if we wait for the transient oscillations to abate. |
private AcquiringUnit |
acquiretask
The acquire unit doing the acquire task. |
private TimerTask |
active
The guider task. |
private OffsetCaster |
comoff
The adapter-to-telescope communication. |
private int |
currentdither
A counter for dithering offsets. |
private static long |
DEFACQUIRETIME
The default acquire time. |
static String |
DEFALTITUDE
The default name of the altitude parameter. |
private static Rectangle |
DEFCLEARFRAME
The frame that should be cleared on a reset. |
private static long |
DEFCLEARTIME
The time required for a reset. |
private static String |
DEFCOMMUNICATOR
The default properties file for the stella guider. |
static String |
DEFDECTARGET
The default name of the target declination parameter. |
static String |
DEFDEROTATOROFF
The default name of the telescope derotator parameter. |
private static int |
DEFDITHERING
The number of dithering points around the pinhole. |
private static double |
DEFDITHERRADIUS
The radius of dithering points around the pinhole. |
static String |
DEFDITHERTARGET
The default name of the target should-be-dithered parameter. |
private static long |
DEFFAINTFOCUSTIME
The default focus time. |
private static long |
DEFFINDTIME
The default recognize-find time. |
private static long |
DEFFIXEDROTATORTIME
The default time to change the filter. |
private static long |
DEFFOCUSTIME
The default focus time. |
private static String |
DEFFOCUSVALUE
Default focus temperature parameter name. |
private static String |
DEFGUIDERCCD
The name of the CCD driver class used for guiding. |
private static long |
DEFGUIDERDELAY
The default guider delay prior to first guiding step. |
static String |
DEFIMAGEROTATION
The default name of the plain image rotation. |
private static boolean |
DEFKEEPOFFSETS
If true, all guiding offsets are kept. |
private static boolean |
DEFKEEPPIDS
If true, all guiding pids are kept. |
private static long |
DEFLOOPFACTOR
If true, no telescope move is done during manual acquire. |
static String |
DEFMAGTARGET
The default name of the target magnitude parameter. |
private static long |
DEFOFFSETDELAY
The default delay on stop guiding if offset are active. |
private static int |
DEFOFFSETWAIT
The default delay on stop guiding if offset are active. |
static String |
DEFRATARGET
The default name of the target right ascension parameter. |
private static long |
DEFREDUCETIME
The default reduce time during a guider period. |
private static long |
DEFSTARTGUIDINGTIME
The default time till guiding starts. |
private static String |
DEFSTELLAGUIDER
The default properties file for the stella guider. |
private static long |
DEFSTOPGUIDINGTIME
The default time till guiding stops. |
private static boolean |
DEFSUPPRESSCENTER
If true, no telescope move is done during manual acquire. |
static String |
DEFTARGETNAME
The default name of the target name parameter. |
private Point2D |
dithershift
The dither shift, or null if no dither required. |
private int |
expid
The internal counter for the command id. |
private FocussingUnit |
faintfocustask
The focus unit doing the focus on faint stars, if any. |
private FocussingUnit |
focustask
The focus unit doing the focus. |
private AbstractStarGuider |
guider
The encapsulating class for the STELLA guider methods. |
private GuidingUnit |
guidingtask
The guider unit doing the guiding task plus the loop. |
static String |
KEY_ACQUIRETIME
Time for the acquire command. |
static String |
KEY_ACQUIREUNIT
The properties of the AcquiringUnit. |
static String |
KEY_ALTITUDE
The height of the target for calculating CCD rotation. |
static String |
KEY_CLEARFRAME
The entire size of the CCD. |
static String |
KEY_CLEARTIME
The clearing exposure time. |
static String |
KEY_DECTARGET
The internal declination of the target set on acquire, |
static String |
KEY_DEROTATOROFF
The name of the Value holding the derotator offset. |
static String |
KEY_DITHERING
The number of dithering offsets. |
static String |
KEY_DITHERRADIUS
The radius in pixel of the diterhing mechanism. |
static String |
KEY_DITHERTARGET
The internal magnitude of the target set on acquire, |
static String |
KEY_EXPOSUREFRAME
The window on the guider ccd used on exposures, unbinned. |
static String |
KEY_FAINTFOCUSTIME
Time for the auto faint focus command. |
static String |
KEY_FAINTFOCUSUNIT
The properties of the FocussingUnit for faint stars. |
static String |
KEY_FINDTIME
Time for the find command. |
static String |
KEY_FOCUSTIME
Time for the auto focus command. |
static String |
KEY_FOCUSUNIT
The properties of the FocussingUnit. |
static String |
KEY_FOCUSVALUE
The name of the parameter that holds the focus. |
static String |
KEY_GUIDERCCD
The name of the CCD driver class used for guiding. |
static String |
KEY_GUIDERDELAY
For transient response of guiding loop. |
static String |
KEY_GUIDINGUNIT
The properties of the GuidingUnit. |
static String |
KEY_IMAGEROTATION
The name of the Value holding the plain image rotation. |
static String |
KEY_KEEPOFFSETS
If true, we record the az/alt offset in a data output stream. |
static String |
KEY_KEEPPIDS
If true, we record the pid offset in a data output stream. |
static String |
KEY_LOOPFACTOR
If the adapter exposure time is not ms, this is the division to ms. |
static String |
KEY_MAGTARGET
The internal magnitude of the target set on acquire, |
static String |
KEY_OFFSETDELAY
Delay on guiding stop, if offsets are active. |
static String |
KEY_OFFSETWAIT
Maximum offset delays waited on stop guiding. |
static String |
KEY_RATARGET
The internal right ascension of the target set on acquire, |
static String |
KEY_REDUCETIME
Reduction time of a single guider loop execution. |
static String |
KEY_STARTGUIDINGTIME
Time for starting the guiding. |
static String |
KEY_STELLAGUIDER
The properties of the Guiding class. |
static String |
KEY_STOPGUIDINGTIME
Time for stopping the guiding. |
static String |
KEY_SUPPRESSCENTER
If the adapter has a small FOV, the telescope is not moved in manual. |
static String |
KEY_TARGETNAME
The rmi-target name for errors on acquire, |
private String |
lastunique
The last unique format. |
private DataOutputStream |
offrecord
An object output stream were we serialize our alt/az offs in. |
private static String |
OFFSETEXTENSION
The extension for the recorded offsets. |
private DataOutputStream |
pidrecord
An object output stream were we serialize our pids offs in. |
private static String |
PIDSEXTENSION
The extension for the recorded pids. |
private Point2D |
pinhole
If dither, we have to query the guider once for its primary pinhole. |
private static Timer |
timer
The timer to scheduler the guider task. |
private int |
virgin
An int that get zero on finds, tracks guider mode changes. |
| Fields inherited from class stella.rmi.GenericMaster |
|---|
DEFUNIQUE, KEY_ABORTTIME, KEY_AUTOMATIC, KEY_COMMTIME, KEY_COMMUNICATOR, KEY_DRIVERS, KEY_HISTORYDB, KEY_INITTIME, KEY_OBSERVEDB, KEY_OVERRULEAUTO, KEY_PARKTIME, KEY_PERMISSIONDB, KEY_PROPOSALDB, KEY_QUITTIME, KEY_REAUTO, KEY_RESETTIME, KEY_SET, KEY_SHUTDOWNDELAY, KEY_STATUSTIME, KEY_TARGETDB, KEY_TASKDB, KEY_UNIQUE, KEY_USERDB, lastabort, lastinit, lastpark, lastreset, telescope |
| Fields inherited from class stella.rmi.ReceiverTorso |
|---|
KEY_BIND, KEY_BINDNAME, KEY_COMMANDCASTER, KEY_ERRORCOOL |
| Fields inherited from class util.rmi.AbstractRmiListener |
|---|
KEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES |
| Fields inherited from interface stella.rmi.RmiAcknowledgeCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface stella.rmi.RmiDoneCaster |
|---|
NAMING_EXTENSION |
| Fields inherited from interface util.StepInitializable |
|---|
KEY_INITDEPTH |
| Fields inherited from interface util.PropertyBearing |
|---|
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Constructor Summary | |
|---|---|
AdapterMaster(Map prop)
Constructs a new adapter master. |
|
| Method Summary | |
|---|---|
protected boolean |
abortMaster()
Method called to abort the device. |
boolean |
accepts(CommandEvent ce)
Checks if the command received is accepted by the adapter master. |
protected boolean |
acquireAdapter(CommandEvent cmd)
Brings the acquire star at the cross-hair of the guider. |
boolean |
autoFocus()
We do a focus on the star by simply passing to doFocus(). |
boolean |
automatic()
Enables automatic operation. |
boolean |
center(double[] ra,
double[] de,
float[] m,
float[] bv)
We center at a star by finding and acquiring it. |
private AdapterUnit |
createAdapterUnit(String unit)
Sets all required knowledge available to an adapter unit. |
private ErrorEvent |
doAcquire(String mode)
Acquires a star. |
private ErrorEvent |
doFaintFocus()
Does a focusing on a faint star. |
private ErrorEvent |
doFocus()
Does a telescope focus using the focus pyramid. |
protected boolean |
doSetFocus(double mm)
Directly moves the focus. |
protected boolean |
doSetFocusOffset(double mm)
Directly offsets the focus. |
private ErrorEvent |
doStartGuiding(String mode)
Starts guiding. |
private boolean |
doStopGuiding()
Stops the guiding. |
protected boolean |
faintFocusAdapter()
Focuses a lately acquired star. |
protected boolean |
findAdapter(CommandEvent com)
Registers a list of stars that are expected in the following acquire field. |
boolean |
focus(double pos)
Does a direct set on the focus, which either moves the telescope focus or some other unit visiblie for the adapter. |
protected boolean |
focusAdapter()
Focuses a lately acquired star. |
boolean |
focusOffset(double pos)
Does a direct set on the focus, which either moves the telescope focus or some other unit visiblie for the adapter. |
protected int |
getAcknowledgeNumber(CommandEvent cmd)
Returns the number of acknowledge events produced for each command. |
protected long |
getCompletionTime(CommandEvent cmd,
int acknr)
Returns the individual completion times. |
protected int |
getNextExp()
Returns the next available exposure id. |
private static List |
getStarDescriptions(double[] ra,
double[] de,
float[] mag,
float[] bv)
Converts an array of ra, dec, Vmag, and B-V into a list of star descriptions. |
private void |
init2()
Additionally initializes the adapter-to-telescope communication and defaults values for fixed rotator, guiding and acquisition time. |
boolean |
initGuider()
init guier |
protected boolean |
initializeMaster()
Initializes the adapter. |
void |
initStep(int curstep)
Additionally initializes the filter-to-position lookup tables. |
protected boolean |
isAbate()
Returns the status of the abate flag which is set during an initial phase if transient oscilations of the guider might hamper the results. |
static void |
main(String[] arg)
Constructs a new adapter master. |
boolean |
manual()
Disables automatic operation. |
private boolean |
moveTelescope(double ra,
double de)
For manual access we also allow moving the telescope. |
boolean |
offsetAzAlt(double daz,
double dalt)
Offsets the telescope for a given amount in azimuth and altitude, degrees. |
private boolean |
offsetTelescope(double daz,
double dalt)
For manual access to telescope offsets. |
boolean |
offsetXY(int dx,
int dy)
Offsets the telescope for a given pixel distance on the guider ccd. |
protected boolean |
parkMaster()
Parks the adapter. |
protected boolean |
processCommand(CommandEvent cmd,
int acknr)
Process the command. |
void |
quit()
Gracefully quite the adapter master. |
protected void |
quitMaster()
Quits the adapter. |
double |
reload()
On reload, we have to reload the individual units as well. |
double |
rescanned(String key,
String old,
String newval)
On rescan, we have to assign various variables to underlying instances. |
protected void |
resetExp()
Resets the exposure id manually. |
protected boolean |
resetMaster()
Resets the adapter. |
boolean |
singleShot(double t)
If in manual mode, we take a single guider camera shot. |
boolean |
startGuiding()
Guides on a previously acquired star. |
protected boolean |
startGuiding(CommandEvent com)
Starts the guiding in the required mode. |
protected Object |
statusMaster()
Returns a status message. |
boolean |
stopGuiding()
Stops guiding if active. |
private boolean |
takeExposure(double tsec)
Take an exposure with the guiding camera. |
| Methods inherited from class stella.rmi.AbstractRmiCasterAndListener |
|---|
bindToRegistry, getBindName, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus, unbindFromRegistry |
| Methods inherited from class util.rmi.AbstractRmiListener |
|---|
allBound, blockBinding, blockBinding, disconnect, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, startBinding, startBinding |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.rmi.ListenerControlling |
|---|
external, getStatus, initialize, park, reset, setPassive |
| Methods inherited from interface util.rmi.RmiCaster |
|---|
bindToRegistry, isValid, unbindFromRegistry |
| Methods inherited from interface stella.ErrorCaster |
|---|
removeErrorListener |
| Methods inherited from interface util.rmi.RmiEventListener |
|---|
getListenerName |
| Methods inherited from interface util.rmi.RmiListener |
|---|
disconnect, isConnected |
| Field Detail |
|---|
private static final String OFFSETEXTENSION
private static final String PIDSEXTENSION
public static final String KEY_GUIDERCCD
public static final String KEY_CLEARFRAME
public static final String KEY_CLEARTIME
public static final String KEY_STELLAGUIDER
Guiding class.
public static final String KEY_FOCUSUNIT
FocussingUnit.
public static final String KEY_FAINTFOCUSUNIT
FocussingUnit for faint stars.
public static final String KEY_ACQUIREUNIT
AcquiringUnit.
public static final String KEY_GUIDINGUNIT
GuidingUnit.
public static final String KEY_TARGETNAME
public static final String KEY_RATARGET
public static final String KEY_DECTARGET
public static final String KEY_MAGTARGET
public static final String KEY_DITHERTARGET
public static final String KEY_DEROTATOROFF
Value holding the derotator offset.
public static final String KEY_IMAGEROTATION
Value holding the plain image rotation.
public static final String KEY_FOCUSVALUE
public static final String KEY_ALTITUDE
public static final String KEY_FINDTIME
public static final String KEY_ACQUIRETIME
public static final String KEY_FOCUSTIME
public static final String KEY_FAINTFOCUSTIME
public static final String KEY_STARTGUIDINGTIME
public static final String KEY_STOPGUIDINGTIME
public static final String KEY_GUIDERDELAY
public static final String KEY_OFFSETDELAY
public static final String KEY_OFFSETWAIT
public static final String KEY_REDUCETIME
public static final String KEY_DITHERING
public static final String KEY_DITHERRADIUS
public static final String KEY_KEEPOFFSETS
public static final String KEY_KEEPPIDS
public static final String KEY_EXPOSUREFRAME
public static final String KEY_SUPPRESSCENTER
public static final String KEY_LOOPFACTOR
private static final String DEFGUIDERCCD
private static final Rectangle DEFCLEARFRAME
private static final long DEFCLEARTIME
private static final String DEFSTELLAGUIDER
private static final String DEFCOMMUNICATOR
public static final String DEFTARGETNAME
public static final String DEFRATARGET
public static final String DEFDECTARGET
public static final String DEFMAGTARGET
public static final String DEFDITHERTARGET
public static final String DEFDEROTATOROFF
public static final String DEFIMAGEROTATION
public static final String DEFALTITUDE
private static final String DEFFOCUSVALUE
private static final long DEFFINDTIME
private static final long DEFACQUIRETIME
private static final long DEFFOCUSTIME
private static final long DEFFAINTFOCUSTIME
private static final long DEFSTARTGUIDINGTIME
private static final long DEFSTOPGUIDINGTIME
private static final long DEFFIXEDROTATORTIME
private static final long DEFGUIDERDELAY
private static final long DEFOFFSETDELAY
private static final int DEFOFFSETWAIT
private static final long DEFREDUCETIME
private static final int DEFDITHERING
private static final double DEFDITHERRADIUS
private static final boolean DEFKEEPOFFSETS
private static final boolean DEFKEEPPIDS
private static final boolean DEFSUPPRESSCENTER
private static final long DEFLOOPFACTOR
private FocussingUnit focustask
private FocussingUnit faintfocustask
private AcquiringUnit acquiretask
private GuidingUnit guidingtask
private OffsetCaster comoff
private AbstractStarGuider guider
private int virgin
private TimerTask active
#doGuide call.
private static Timer timer
private int currentdither
private Point2D dithershift
private Point2D pinhole
private DataOutputStream offrecord
private DataOutputStream pidrecord
private int expid
private String lastunique
private boolean abate
| Constructor Detail |
|---|
public AdapterMaster(Map prop)
throws RemoteException
PropertyContainer.init() section of the parent class.
RemoteException| Method Detail |
|---|
public void initStep(int curstep)
initStep in interface StepInitializableinitStep in class GenericMastercurstep - The current initialization depth.private void init2()
private AdapterUnit createAdapterUnit(String unit)
public double reload()
reload in interface Reloadablereload in class GenericMaster
public double rescanned(String key,
String old,
String newval)
rescanned in interface Reloadablerescanned in class GenericMaster
public boolean automatic()
throws RemoteException
automatic in interface ListenerControllingautomatic in class GenericMasterRemoteException
public boolean manual()
throws RemoteException
doStopGuiding() method to kill any ongoing guiding.
manual in interface ListenerControllingmanual in class GenericMasterRemoteException
public boolean center(double[] ra,
double[] de,
float[] m,
float[] bv)
throws RemoteException
center in interface GuiderControllingRemoteException
public boolean offsetAzAlt(double daz,
double dalt)
throws RemoteException
offsetAzAlt in interface GuiderControllingRemoteException
public boolean offsetXY(int dx,
int dy)
throws RemoteException
offsetXY in interface GuiderControllingdx - Difference in pixeldy - Difference in pixel
RemoteException
public boolean autoFocus()
throws RemoteException
doFocus(). The
star must be manually acquired before.
autoFocus in interface AdapterControllingRemoteException
public boolean singleShot(double t)
throws RemoteException
singleShot in interface GuiderControllingRemoteException
public boolean focus(double pos)
throws RemoteException
focus in interface FocusControllingRemoteException
public boolean focusOffset(double pos)
throws RemoteException
focusOffset in interface FocusControllingRemoteException
public boolean initGuider()
throws RemoteException
initGuider in interface GuiderControllingRemoteException
public boolean startGuiding()
throws RemoteException
startGuiding in interface GuiderControllingRemoteException
public boolean stopGuiding()
throws RemoteException
stopGuiding in interface GuiderControllingRemoteException
public void quit()
throws RemoteException
quit in interface ListenerControllingquit in class GenericMasterRemoteException
public boolean accepts(CommandEvent ce)
throws RemoteException
AdapterCommands.
accepts in interface RmiCommandListenerRemoteExceptionprotected boolean isAbate()
protected int getAcknowledgeNumber(CommandEvent cmd)
getAcknowledgeNumber in class GenericMaster
protected long getCompletionTime(CommandEvent cmd,
int acknr)
getCompletionTime in class GenericMastercmd - The command to process.acknr - The number of the acknowledge that will be sent back.
protected boolean processCommand(CommandEvent cmd,
int acknr)
processCommand in class GenericMasterprotected boolean initializeMaster()
resetMaster().
initializeMaster in class GenericMasterprotected Object statusMaster()
statusMaster in class GenericMasterErrorEvent.protected boolean abortMaster()
abortMaster in class GenericMasterprotected boolean resetMaster()
resetMaster in class GenericMasterprotected boolean parkMaster()
parkMaster in class GenericMasterprotected void quitMaster()
parkMaster(), but also deregisters
from the telescope and the registry.
quitMaster in class GenericMaster
private boolean moveTelescope(double ra,
double de)
private boolean offsetTelescope(double daz,
double dalt)
protected boolean findAdapter(CommandEvent com)
Guiding.RawStar
objects that can be passed into the Guiding.match(java.util.List extends stella.adapter.Guiding.RawStar>, java.util.List extends stella.adapter.Guiding.RawStar>, double, double) method.
We proceed as follows:
KEY_IMAGEROTATION to the current target height.#KEY_EXPOSEACQUIRE and the second in
#KEY_EXPOSEGUIDE.
#KEY_GUIDERSCALE and their ra/dec.
protected boolean startGuiding(CommandEvent com)
protected boolean acquireAdapter(CommandEvent cmd)
protected boolean focusAdapter()
protected boolean faintFocusAdapter()
protected boolean doSetFocus(double mm)
protected boolean doSetFocusOffset(double mm)
private ErrorEvent doFocus()
#KEY_PYRAMIDTIME.#KEY_PYRAMIDFRAME window and the
#KEY_PYRAMIDBINNING binning factors.#KEY_DATAMINPYRAMID and
#KEY_SEARCHPYRAMID.#getPyramid. The radius of the pyramid is
#LEY_PYRAMIDRADIUS and the sharpness limit
#KEY_PYRAMIDSHARP.#insertPyramidCenterAndRadius. If the error on the
diagonal is less than #KEY_PYRAMIDERROR, the measure is
accepted.#KEY_PYRAMIDDESIRED, the distance difference is converted into
a focus motor movement using #KEY_PYRAMIDDISTFOCUS.#KEY_PYRAMIDMINFOCUS.
private ErrorEvent doFaintFocus()
private ErrorEvent doAcquire(String mode)
private ErrorEvent doStartGuiding(String mode)
stopGuiding() is called.
private boolean doStopGuiding()
private boolean takeExposure(double tsec)
protected int getNextExp()
protected void resetExp()
private static List getStarDescriptions(double[] ra,
double[] de,
float[] mag,
float[] bv)
public static void main(String[] arg)
throws RemoteException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||