Package dics :: Module rotator :: Class tracker
[hide private]
[frames] | no frames]

Class tracker
source code

        object --+        
                 |        
          _Verbose --+    
                     |    
      threading.Thread --+
                         |
                        tracker

Worker thread intended to be used by an instance of rotator.rotator in order to perform the operations required for rotator tracking in the background.

Instance Methods [hide private]
  __init__(self, tele, tgt, dt, low, high, port, stop, lockedOn, logger, logData=False)
Arguments: tele: A rotator.telescope object describing the observatory at which the instrument is situated.
  run(self)
Don't call this directly, use start().
  calcRotPos(self, utc)
Based on the currently set target and telescope calculates the required rotator position for the UTC given as a datetime.datetime object.
  limit_time(self)
Calculates the time (UTC) at which the rotator will reach the limits of its range of movement for the set telescope and target.
  TargetPA(self)
Print the Target PA useage: dazle.rotator_1.TargetPA()

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, join, setDaemon, setName, start

Inherited from threading.Thread (private): _set_daemon

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__


Class Variables [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, tele, tgt, dt, low, high, port, stop, lockedOn, logger, logData=False)
(Constructor)

source code 

Arguments:

tele:      A rotator.telescope object describing the observatory at
           which the instrument is situated.
tgt:       A rotator.target object representing the target field
dt:        The interval at which tracking adjustments should be made,
           in seconds.
low:       The lower limit of allowed motion, a rotator.angle object.
high:      The upper limit of allowed motion, a rotator.angle object.
port:      A serial.Serial object for communication with the hardware.
stop:      A threading.Event object used to terminate the tracking
           loop.
lockedOn:  A threading.Event object used to indicate tracking within
           tolerances.
logger:    A logging.Logger instance used to output information.
logData:   Boolean to indicate whether tracking status information
           should be logged to the file 'dicstrack.log'. Default False.

Overrides: threading.Thread.__init__

run(self)

source code 
Don't call this directly, use start().
Overrides: threading.Thread.run

calcRotPos(self, utc)

source code 

Based on the currently set target and telescope calculates the
required rotator position for the UTC given as a datetime.datetime
object.

DAzLE will mount on VLT UT3 Nasmyth platform 'A', which is on the
LEFT hand side when looking in the direction in which the telescope
if pointing.  For the left hand Nasmyth platform the position angle
of the sky image on the detector with the rotator at zero degrees is
equal to parallactic angle + zenith distance + 180 degrees.  The
required rotator position is therefore requested PA - parallactic angle
- zenith distance - 180degrees, appropriately normalised into -180 to
+180.

limit_time(self)

source code 
Calculates the time (UTC) at which the rotator will reach the limits of its range of movement for the set telescope and target. Returns None if the the rotator position is currently outside the limits, otherwise a datetime.datetime object.

TargetPA(self)

source code 
Print the Target PA useage: dazle.rotator_1.TargetPA()