CircularTrackingActuator

class lsst.ts.simactuators.CircularTrackingActuator(max_velocity: float, max_acceleration: float, dtmax_track: float, nsettle: int = 2, tai: Optional[float] = None, start_position: Optional[float] = None)

Bases: TrackingActuator

A version of a TrackingActuator that moves in a circle with no limits.

Parameters
max_velocityfloat

Maximum allowed velocity (degree/second)

max_accelerationfloat

Maximum allowed acceleration (degree/second^2)

dtmax_trackfloat

Maximum allowed time interval (tai - time of last segment) for set_target to compute a tracking path (sec); if this limit is not met then set_target computes a slewing path. This should be larger than the maximum expected time between calls to set_target, but not much more than that.

nsettleint, optional

Number of calls to set_target after a slew finishes (meaning self.path.kind is tracking) before self.kind(tai) reports tracking instead of slewing.

taifloat, optional

TAI time for self.target and self.path (unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. This is primarily for unit tests; None is usually what you want.

start_positionfloat or None, optional

Initial position. If None use 0.

Raises
ValueError

If max_velocity <= 0 or max_acceleration <= 0.

Notes

Attributes:

  • target: target set by set_target (a path.PathSegment).

  • path: actual actuator path (a path.Path).

set_target wraps target.position into the range [0, 360). That is the only guarantee about the wrap of of angles in target and path. Thus the positions in path can easily be out of that range, as can the computed path positions at later times.

Attributes Summary

path

Get or set the actuator path, a path.Path.

Methods Summary

abort([tai, position])

Stop motion immediately, with infinite acceleration.

kind([tai])

Kind of path at the specified time.

set_target(tai, position, velocity[, direction])

Set the target position, velocity and time.

stop([tai])

Stop the axis using maximum acceleration.

Attributes Documentation

path

Get or set the actuator path, a path.Path.

Methods Documentation

abort(tai: Optional[float] = None, position: Optional[float] = None) None

Stop motion immediately, with infinite acceleration.

Do not change the commanded position.

Parameters
taifloat, optional

TAI time for self.target and self.path (unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. This is primarily for unit tests; None is usually what you want.

positionfloat, optional

Position at which to stop (deg); if None then stop at position at time tai.

kind(tai: Optional[float] = None) Kind

Kind of path at the specified time.

Parameters
taifloat, optional

TAI time at which to evaluate the kind of path (TAI unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. Ignored unless stopping.

The result will always match ``self.path.kind`` except as follows:
- After a slew we report ``path.kind.Slewing`` until ``nsettle``

consecutive calls to set_target result in a path that is tracking.

- If self.path.kind is stopping and tai > start time of the

last segment, then the kind is reported as stopped.

set_target(tai: float, position: float, velocity: float, direction: Direction = Direction.NEAREST) None

Set the target position, velocity and time.

The actuator will track, if possible, else slew to match the specified path.

target.position is wrapped into the range [0, 360).

Parameters
taifloat

TAI time (unix seconds, e.g. from lsst.ts.utils.current_tai()).

positionfloat

Position (deg)

velocityfloat

Velocity (deg/sec)

directionDirection

Desired direction for acquiring the target (which way to slew). Direction.NEAREST picks the slew with shortest duration.

Raises
ValueError

If tai <= self.target.tai, where self.target.tai is the time of the previous call to set_target.

Notes

The actuator will track if the following is true:

  • tai - self.target.tai < self.dtmax_track where self.target.tai is the time of the previous call to set_target.

  • The tracking segment path obeys the velocity and acceleration limits.

stop(tai: Optional[float] = None) None

Stop the axis using maximum acceleration.

Update the commanded position to match the end point of the stop.

Parameters
taifloat, optional

TAI time for self.target and self.path (unix seconds, e.g. from lsst.ts.utils.current_tai()). If None then use current TAI. This is primarily for unit tests; None is usually what you want.