Developer Guide#

The MTHexapod CSC is implemented using ts_salobj and ts_hexrotcom.

API#

The primary class is:

lsst.ts.mthexapod Package#

Functions#

check_negative_value(value, name, min_value)

Check that a numeric value is in range min_value <= value < 0.

check_new_position_limits(limits, max_limits)

Raise ExceptionClass if proposed new position limits are not with range of the maximum allowed position limits.

check_position(position, limits[, ...])

Raise ExceptionClass if a position is not within limits.

check_positive_value(value, name, max_value)

Check that a numeric value is in range 0 < value <= max_value.

check_range(value, name, min_value, max_value)

Check that a numeric value is range min_value <= value <= max_value.

check_symmetrical_range(value, name, max_value)

Check that a numeric value is in range -max_value <= value <= max_value.

command_hexapod()

Run the hexapod commander.

get_next_position(position_current, ...)

Get the next position.

rot2d(xypos, ang)

Rotate a 2-d position by the specified angle.

rot_about_x(xyzpos, ang)

Rotate a 3-d position about the x axis.

rot_about_y(xyzpos, ang)

Rotate a 3-d position about the y axis.

rot_about_z(xyzpos, ang)

Rotate a 3-d position about the z axis.

run_mthexapod()

Run the MTHexapod CSC.

Classes#

CommandCode(value[, names, module, ...])

Values for the Command.code field.

Compensation(*, elevation_rotation_coeffs, ...)

Compute hexapod compensation for elevation, azimuth, camera rotation, and temperature.

CompensationInputs(elevation, azimuth, ...)

Input values for the compensation model.

Config

MTHexapod configuration.

FourierSeries(coeffs)

A real-valued Fourier series.

HexapodCommander(index, enable)

Command the MTHexapod CSC from the command line.

HexapodCsc(index[, config_dir, ...])

MTHexapod CSC.

MockMTHexapodController(index, log[, port, ...])

Mock MTHexapod controller that talks over TCP/IP.

PosFiltVel

Handle annoying order of strut_measured_posfiltvel telemetry fields.

Position(x, y, z, u, v, w)

The position and orientation of the hexapod pivot point.

PositionLimits(maxXY, minZ, maxZ, maxUV, ...)

Position limits.

RangedPolynomial(coeffs, min_x, max_x)

A polynomial that is linear outside a specified range.

SalIndex(value[, names, module, qualname, ...])

SetEnabledSubstateParam(value[, names, ...])

Substates for the ENABLED state.

ShutterDetailedState(value[, names, module, ...])

Substates for the camer shutter.

SimpleHexapod(base_positions, ...)

Simple model of a hexapod: 6 linear actuators in an arbitrary arrangement.

Telemetry

MTHexapod telemetry.

Class Inheritance Diagram#

digraph inheritancec09476ffb0 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3.13/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "BaseClientOrServer" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Abstract base class for a TCP/IP client or server."]; "ABC" -> "BaseClientOrServer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseCsc" [URL="https://ts-hexrotcomm.lsst.io/api/lsst.ts.hexrotcomm.BaseCsc.html#lsst.ts.hexrotcomm.BaseCsc",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base CSC for talking to Moog hexpod or rotator controllers."]; "ConfigurableCsc" -> "BaseCsc" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseCsc" [URL="https://ts-salobj.lsst.io/api/lsst.ts.salobj.BaseCsc.html#lsst.ts.salobj.BaseCsc",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for a Commandable SAL Component (CSC)"]; "Controller" -> "BaseCsc" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseMockController" [URL="https://ts-hexrotcomm.lsst.io/api/lsst.ts.hexrotcomm.BaseMockController.html#lsst.ts.hexrotcomm.BaseMockController",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for a mock Moog TCP/IP controller with states."]; "OneClientReadLoopServer" -> "BaseMockController" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "BaseMockController" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CommandCode" [URL="api/lsst.ts.mthexapod.CommandCode.html#lsst.ts.mthexapod.CommandCode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Values for the ``Command.code`` field."]; "IntEnum" -> "CommandCode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Compensation" [URL="api/lsst.ts.mthexapod.Compensation.html#lsst.ts.mthexapod.Compensation",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Compute hexapod compensation for elevation, azimuth, camera rotation,"]; "CompensationInputs" [URL="api/lsst.ts.mthexapod.CompensationInputs.html#lsst.ts.mthexapod.CompensationInputs",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Input values for the compensation model."]; "Config" [URL="api/lsst.ts.mthexapod.Config.html#lsst.ts.mthexapod.Config",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="MTHexapod configuration."]; "Structure" -> "Config" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ConfigurableCsc" [URL="https://ts-salobj.lsst.io/api/lsst.ts.salobj.ConfigurableCsc.html#lsst.ts.salobj.ConfigurableCsc",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for a configurable Commandable SAL Component (CSC)"]; "BaseCsc" -> "ConfigurableCsc" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "ConfigurableCsc" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Controller" [URL="https://ts-salobj.lsst.io/api/lsst.ts.salobj.Controller.html#lsst.ts.salobj.Controller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class that receives commands for a SAL component"]; "CscCommander" [URL="https://ts-salobj.lsst.io/api/lsst.ts.salobj.CscCommander.html#lsst.ts.salobj.CscCommander",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Command a CSC from the command line."]; "Enum" [URL="https://docs.python.org/3.13/library/enum.html#enum.Enum",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Create a collection of name/value pairs."]; "FourierSeries" [URL="api/lsst.ts.mthexapod.FourierSeries.html#lsst.ts.mthexapod.FourierSeries",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A real-valued Fourier series."]; "HexapodCommander" [URL="api/lsst.ts.mthexapod.HexapodCommander.html#lsst.ts.mthexapod.HexapodCommander",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Command the MTHexapod CSC from the command line."]; "CscCommander" -> "HexapodCommander" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HexapodCsc" [URL="api/lsst.ts.mthexapod.HexapodCsc.html#lsst.ts.mthexapod.HexapodCsc",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="MTHexapod CSC."]; "BaseCsc" -> "HexapodCsc" [arrowsize=0.5,style="setlinewidth(0.5)"]; "IntEnum" [URL="https://docs.python.org/3.13/library/enum.html#enum.IntEnum",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Enum where members are also (and must be) ints"]; "ReprEnum" -> "IntEnum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MockMTHexapodController" [URL="api/lsst.ts.mthexapod.MockMTHexapodController.html#lsst.ts.mthexapod.MockMTHexapodController",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mock MTHexapod controller that talks over TCP/IP."]; "BaseMockController" -> "MockMTHexapodController" [arrowsize=0.5,style="setlinewidth(0.5)"]; "OneClientReadLoopServer" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A OneClientServer that reads and processes data in a loop."]; "OneClientServer" -> "OneClientReadLoopServer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "OneClientServer" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A TCP/IP socket server that serves a single client."]; "BaseClientOrServer" -> "OneClientServer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PosFiltVel" [URL="api/lsst.ts.mthexapod.PosFiltVel.html#lsst.ts.mthexapod.PosFiltVel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Handle annoying order of strut_measured_posfiltvel telemetry fields."]; "Structure" -> "PosFiltVel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Position" [URL="api/lsst.ts.mthexapod.Position.html#lsst.ts.mthexapod.Position",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The position and orientation of the hexapod pivot point."]; "PositionLimits" [URL="api/lsst.ts.mthexapod.PositionLimits.html#lsst.ts.mthexapod.PositionLimits",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Position limits."]; "RangedPolynomial" [URL="api/lsst.ts.mthexapod.RangedPolynomial.html#lsst.ts.mthexapod.RangedPolynomial",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A polynomial that is linear outside a specified range."]; "ReprEnum" [URL="https://docs.python.org/3.13/library/enum.html#enum.ReprEnum",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Only changes the repr(), leaving str() and format() to the mixed-in type."]; "Enum" -> "ReprEnum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SalIndex" [URL="api/lsst.ts.mthexapod.SalIndex.html#lsst.ts.mthexapod.SalIndex",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "IntEnum" -> "SalIndex" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SetEnabledSubstateParam" [URL="api/lsst.ts.mthexapod.SetEnabledSubstateParam.html#lsst.ts.mthexapod.SetEnabledSubstateParam",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Substates for the ENABLED state."]; "IntEnum" -> "SetEnabledSubstateParam" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ShutterDetailedState" [URL="api/lsst.ts.mthexapod.ShutterDetailedState.html#lsst.ts.mthexapod.ShutterDetailedState",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Substates for the camer shutter."]; "IntEnum" -> "ShutterDetailedState" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SimpleHexapod" [URL="api/lsst.ts.mthexapod.SimpleHexapod.html#lsst.ts.mthexapod.SimpleHexapod",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Simple model of a hexapod: 6 linear actuators in an arbitrary"]; "Structure" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Structure base class"]; "_CData" -> "Structure" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Telemetry" [URL="api/lsst.ts.mthexapod.Telemetry.html#lsst.ts.mthexapod.Telemetry",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="MTHexapod telemetry."]; "Structure" -> "Telemetry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_CData" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="XXX to be provided"]; }

Build and Test#

This is a pure python package. There is nothing to build except the documentation.

setup -r .
pytest -v  # to run tests
package-docs clean; package-docs build  # to build the documentation

Contributing#

ts_mthexapod is developed at lsst-ts/ts_mthexapod. You can find Jira issues for this package using labels=ts_mthexapod..

This page was last modified on .