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

Class target
source code

Class representing a target field. Stores the position of the field in mean place FK5 J2000 coordinates, and calculates the geocentric apparent coordinates when given the epoch. Also have a number of methods for setting and retrieving coordinates.

Instance Methods [hide private]
  __init__(self, ra, dec, pa, name)
Initialises the target object.
  updateConfig(self, config)
Should be called by the parent instrument object's destructor to enable status information to be saved to file on exit.
  getApparentPlace(self)
If apparent place RA and Dec have been calculated (with updateApparentPlace()) then returns them, else returns None.
  getCoords(self)
Returns the mean place FK5 J2000 RA and Dec, and the position angle for the target, as rotator.angle objects.
  getRA(self)
Returns the mean place FK5 J2000 RA and Dec, and the position angle for the target, as rotator.angle objects.
  getDec(self)
Returns the mean place FK5 J2000 RA and Dec, and the position angle for the target, as rotator.angle objects.
  getPA(self)
Returns the position angle for the target as a rotator.angle object
  setPA(self, pa)
Sets the requested position angle.
  setCoords(RA, Dec, PA)
Sets the mean place FK5 J2000 RA and Dec, and the requested position angle for the target.
  updateApparentPlace(self, tdb)
Performs the precession-nutation, light deflection and annual aberration calculations required to obtain the apparent place RA and dec of the target, and both returns and stores the result.
  unwind(self, shiftnumber)
Changes the position angle by the argument, shiftnumber, times 90 degrees.

Method Details [hide private]

__init__(self, ra, dec, pa, name)
(Constructor)

source code 
Initialises the target object. Takes four arguments, the target's RA, Dec, desired position angle, and name (an identification string primarily for logging purposes. RA and Dec should be mean place FK5 J2000 coordinates. Position angle is here defined as the angle Northpole-field centre-'up', where 'up' is the upwards direction on the detector. Each of the arguments should be either a single value acceptable to the rotator.angle constructor (e.g. a rotator.angle object, a numeric type representing an angle, or a string containing a sexagesimal/decimal representation of the angle) or a sequence object containing an argument list for the constructor. If a single value is given for RA it is assumed to be in units of hours, whereas Dec and PA are assumed to be in degrees.

updateConfig(self, config)

source code 

Should be called by the parent instrument object's destructor to enable status information to be saved to file on exit.

Takes a ConfigParserRT.SafeConfigParser object as argument.

getApparentPlace(self)

source code 
If apparent place RA and Dec have been calculated (with updateApparentPlace()) then returns them, else returns None.

getCoords(self)

source code 
Returns the mean place FK5 J2000 RA and Dec, and the position angle for the target, as rotator.angle objects.

getRA(self)

source code 
Returns the mean place FK5 J2000 RA and Dec, and the position angle for the target, as rotator.angle objects.

getDec(self)

source code 
Returns the mean place FK5 J2000 RA and Dec, and the position angle for the target, as rotator.angle objects.

getPA(self)

source code 
Returns the position angle for the target as a rotator.angle object

setPA(self, pa)

source code 
Sets the requested position angle.

setCoords(RA, Dec, PA)

source code 
Sets the mean place FK5 J2000 RA and Dec, and the requested position angle for the target. Arguments are as for __init__().

updateApparentPlace(self, tdb)

source code 

Performs the precession-nutation, light deflection and annual aberration calculations required to obtain the apparent place RA and dec of the target, and both returns and stores the result.

A single argument is required, the Barycentric Dynamical Time of observation as a datetime.datetime object. According to the called slalib.slaMap routine's notes, 'The distinction between the required TDB and TT is always negligible. Moreover, for all but the most critical applications UTC is adequate'.

unwind(self, shiftnumber)

source code 
Changes the position angle by the argument, shiftnumber, times 90 degrees. This will be done by a rotator object in order to keep its required position within its range of motion. The argument must be a type acceptible to the builtin int() function.