UtilityMonitor¶
- class lsst.ts.m2gui.UtilityMonitor¶
Bases:
objectUtility monitor to monitor the utility status.
Attributes¶
- signal_utility
SignalUtility Signal to report the utility status.
- signal_detailed_force
SignalDetailedForce Signal to report the detailed force.
- signal_position
SignalPosition Signal to report the rigid body position.
- signal_net_force_moment
SignalNetForceMoment Signal to send the net force, moment, and force balance status.
- power_motor_calibrated
dict Calibrated motor power. The unit of voltage is volt and the unit of current is ampere.
- power_communication_calibrated
dict Calibrated communication power. The unit of voltage is volt and the unit of current is ampere.
- power_motor_raw
dict Raw motor power. The unit of voltage is volt and the unit of current is ampere.
- power_communication_raw
dict Raw communication power. The unit of voltage is volt and the unit of current is ampere.
- inclinometer_angle
float Inclinometer angle in degree.
- inclinometer_angle_tma
float Inclinometer angle of telescope mount assembly (TMA) in degree.
- breakers
dict Breakers. The key is the breaker name. If the breaker is triggered, the value is True. Otherwise, False.
- temperatures
dict Tempertures. The key is the temperature sensor name. The value is the related temperature in degree C.
- displacements
dict Displacement sensors. The key is the displacement sensor name. The value is the reading in the unit of mm.
- digital_status_input
int Digital input status as a 32 bits value. Each bit means different status. 1 means OK (or triggered). Otherwise 0.
- digital_status_output
int Digital output status as a 8 bits value. Each bit means different status. 1 means OK (or triggered). Otherwise 0.
- hard_points
dict Hard points of the axial and tangential actuators.
- forces_axial
ActuatorForceAxial Detailed axial actuator forces.
- forces_tangent
ActuatorForceTangent Detailed tangent actuator forces.
- force_error_tangent
ForceErrorTangent Tangential force error to monitor the supporting force of mirror.
- position
list Rigid body position: [x, y, z, rx, ry, rz] based on the hardpoint displacement. The unit of x, y, and z is um. The unit of rx, ry, and ry is arcsec.
- position_ims
list Rigid body position: [x, y, z, rx, ry, rz] based on the independent measurement system (IMS). The unit of x, y, and z is um. The unit of rx, ry, and ry is arcsec.
- net_force_total
list Total actuator net force in Newton: [fx, fy, fz].
- net_moment_total
list Total actuator net moment in Newton * meter: [mx, my, mz].
- force_balance
list Force balance status: [fx, fy, fz, mx, my, mz]. The units of force and moment are Newton and Newton * meter.
Attributes Summary
Methods Summary
get_breakers(power_type)Get the breakers of the specific power type.
get_displacement_sensors(direction)Get the displacement sensors in a specific direction.
Get the axial forces.
Get the tangent forces.
get_temperature_sensors(temperature_group)Get the temperature sensors in a specific group.
Report the utility status.
reset_breakers(power_type)Reset the breakers.
update_breaker(name, new_status)Update the breaker status.
update_digital_status_input(new_status)Update the digital input status (32 bits).
update_digital_status_output(new_status)Update the digital output status (8 bits).
update_displacements(direction, ...)Update the displacement sensor data.
update_force_balance(value_new)Update the force balance status.
update_force_error_tangent(force_error_tangent)Update the tangential force error that monitors the supporting force of mirror.
update_forces_axial(actuator_force)Update the axial actuator forces.
update_forces_tangent(actuator_force)Update the tangent actuator forces.
update_hard_points(axial, tangent)Update the hard points.
update_inclinometer_angle(new_angle[, ...])Update the angle of inclinometer.
update_net_force_moment_total(value_new[, ...])Update the total net force or moment.
update_position(x, y, z, rx, ry, rz[, is_ims])Update the position of rigid body.
update_power_calibrated(power_type, ...)Update the calibrated power data.
update_power_raw(power_type, new_voltage, ...)Update the raw power data.
update_temperature(temperature_group, ...)Update the temperature data.
Attributes Documentation
- NUM_DIGIT_AFTER_DECIMAL = 1¶
- NUM_DIGIT_AFTER_DECIMAL_DISPLACEMENT = 3¶
Methods Documentation
- get_breakers(power_type: PowerType) list[str]¶
Get the breakers of the specific power type.
Parameters¶
- power_typeenum
MTM2.PowerType Power type.
Returns¶
list[str]List of the breakers.
- power_typeenum
- get_displacement_sensors(direction: DisplacementSensorDirection) list[str]¶
Get the displacement sensors in a specific direction.
Parameters¶
- directionenum
DisplacementSensorDirection Direction of the displacement sensors.
Returns¶
list[str]List of the sensors.
- directionenum
- get_forces_axial() ActuatorForceAxial¶
Get the axial forces.
Returns¶
ActuatorForceAxialDetailed axial actuator forces as a new copy of internal data.
- get_forces_tangent() ActuatorForceTangent¶
Get the tangent forces.
Returns¶
ActuatorForceTangentDetailed tangent actuator forces as a new copy of internal data.
- get_temperature_sensors(temperature_group: TemperatureGroup) list[str]¶
Get the temperature sensors in a specific group.
Parameters¶
- temperature_groupenum
TemperatureGroup Temperature group.
Returns¶
list[str]List of the sensors.
- temperature_groupenum
- report_utility_status() None¶
Report the utility status.
- reset_breakers(power_type: PowerType) None¶
Reset the breakers.
Parameters¶
- power_typeenum
MTM2.PowerType Power type.
- power_typeenum
- update_breaker(name: str, new_status: bool) None¶
Update the breaker status.
Parameters¶
- name
str Breaker name, which is in the keys of self.breakers.
- new_status
bool New status of breaker. If the breake is triggered, put True, otherwise, False.
- name
- update_digital_status_input(new_status: int) None¶
Update the digital input status (32 bits).
Parameters¶
- new_status
int New status.
- new_status
- update_digital_status_output(new_status: int) None¶
Update the digital output status (8 bits).
Parameters¶
- new_status
int New status.
- new_status
- update_displacements(direction: DisplacementSensorDirection, new_displacements: list[float]) None¶
Update the displacement sensor data.
This function assumes the mirror’s movement is usually in a specific direction.
Parameters¶
- directionenum
DisplacementSensorDirection Direction of the displacement sensors.
- new_displacements
list[float] New displacements in millimeter. The order should begin from sensor 1 to sensor n defined in the specific direction.
- directionenum
- update_force_balance(value_new: list[float]) None¶
Update the force balance status.
Parameters¶
- value_new
list New (fx, fy, fz, mx, my, mz) component values. Unit is Newton or Newton * meter that depends on the component is force or moment.
- value_new
- update_force_error_tangent(force_error_tangent: ForceErrorTangent) None¶
Update the tangential force error that monitors the supporting force of mirror.
Parameters¶
- force_error_tangent
ForceErrorTangent Tangential force error.
- force_error_tangent
- update_forces_axial(actuator_force: ActuatorForceAxial) None¶
Update the axial actuator forces.
Parameters¶
- actuator_force
ActuatorForceAxial Axial actuator force.
Raises¶
ValueErrorWhen the input is the same object of self.forces_axial.
- actuator_force
- update_forces_tangent(actuator_force: ActuatorForceTangent) None¶
Update the tangent actuator forces.
Parameters¶
- actuator_force
ActuatorForceTangent Tangent actuator force.
Raises¶
ValueErrorWhen the input is the same object of self.forces_tangent.
- actuator_force
- update_hard_points(axial: list[int], tangent: list[int]) None¶
Update the hard points.
Parameters¶
- axial
list List of the hard points in axial direction.
- tangent
list List of the hard points in tangent direction.
Raises¶
ValueErrorLengths of the inputs are not right.
- axial
- update_inclinometer_angle(new_angle: float, new_angle_processed: float | None = None, is_internal: bool = True) None¶
Update the angle of inclinometer.
Parameters¶
- new_angle
float New angle value in degree.
- new_angle_processed
floator None, optional New processed angle value in degree.
- is_internal
bool Is the internal inclinometer or not. If False, the new_angle comes from the telescope mount assembly (TMA). (the default is True)
- new_angle
- update_net_force_moment_total(value_new: list[float], is_force: bool = True) None¶
Update the total net force or moment.
Parameters¶
- value_new
list New (x, y, z) component values. Unit is Newton or Newton * meter based on ‘is_force’.
- is_force
bool, optional Is the force data or not. If not, the moment data is applied. (the default is True)
- value_new
- update_position(x: float, y: float, z: float, rx: float, ry: float, rz: float, is_ims: bool = False) None¶
Update the position of rigid body.
Parameters¶
- x
float Position x in um.
- y
float Position y in um.
- z
float Position z in um.
- rx
float Rotation x in arcsec.
- ry
float Rotation y in arcsec.
- rz
float Rotation z in arcsec.
- is_ims
bool, optional Is based on the independent measurement system (IMS) or not. (the default is False)
- x
- update_power_calibrated(power_type: PowerType, new_voltage: float, new_current: float) None¶
Update the calibrated power data.
Parameters¶
- power_typeenum
MTM2.PowerType Power type.
- new_voltage
float New voltage value in volt.
- new_current
float New current value in ampere.
Raises¶
ValueErrorNot supported power type.
- power_typeenum
- update_power_raw(power_type: PowerType, new_voltage: float, new_current: float) None¶
Update the raw power data.
Parameters¶
- power_typeenum
MTM2.PowerType Power type.
- new_voltage
float New voltage value in volt.
- new_current
float New current value in ampere.
Raises¶
ValueErrorNot supported power type.
- power_typeenum
- update_temperature(temperature_group: TemperatureGroup, new_temperatures: list[float]) None¶
Update the temperature data.
This function assumes the temperature’s fluctuation is usually restricted to a small region (group) in the most of time.
Parameters¶
- temperature_groupenum
TemperatureGroup Temperature group.
- new_temperatures
list[float] New temperatures in degree. The order should begin from sensor 1 to sensor n defined in the specific temperature group.
- temperature_groupenum
- signal_utility