Developer Guide#
The MTHexapod CSC is implemented using ts_salobj and ts_hexrotcom.
API#
The primary class is:
HexapodCsc: the CSC.
lsst.ts.mthexapod Package#
Functions#
|
Check that a numeric value is in range min_value <= value < 0. |
|
Raise ExceptionClass if proposed new position limits are not with range of the maximum allowed position limits. |
|
Raise ExceptionClass if a position is not within limits. |
|
Check that a numeric value is in range 0 < value <= max_value. |
|
Check that a numeric value is range min_value <= value <= max_value. |
|
Check that a numeric value is in range -max_value <= value <= max_value. |
Run the hexapod commander. |
|
|
Get the next position. |
|
Rotate a 2-d position by the specified angle. |
|
Rotate a 3-d position about the x axis. |
|
Rotate a 3-d position about the y axis. |
|
Rotate a 3-d position about the z axis. |
Run the MTHexapod CSC. |
Classes#
|
Values for the |
|
Compute hexapod compensation for elevation, azimuth, camera rotation, and temperature. |
|
Input values for the compensation model. |
MTHexapod configuration. |
|
|
A real-valued Fourier series. |
|
Command the MTHexapod CSC from the command line. |
|
MTHexapod CSC. |
|
Mock MTHexapod controller that talks over TCP/IP. |
Handle annoying order of strut_measured_posfiltvel telemetry fields. |
|
|
The position and orientation of the hexapod pivot point. |
|
Position limits. |
|
A polynomial that is linear outside a specified range. |
|
|
|
Substates for the ENABLED state. |
|
Substates for the camer shutter. |
|
Simple model of a hexapod: 6 linear actuators in an arbitrary arrangement. |
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..