Skip to content

Commit

Permalink
ESS's M1M3 Thermocouple telemetry and events.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubanek committed Nov 7, 2024
1 parent 89b875e commit 1d146d6
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 1 deletion.
49 changes: 48 additions & 1 deletion python/lsst/ts/xml/data/sal_interfaces/ESS/ESS_Events.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://lsst-sal.tuc.noao.edu/schema/SALEventSet.xsl"?>
<SALEventSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://lsst-sal.tuc.noao.edu/schema/SALEventSet.xsd">
<SALEvent>
<SALEvent>
<Subsystem>ESS</Subsystem>
<EFDB_Topic>ESS_logevent_lightningStrike</EFDB_Topic>
<Description>Lightning strike, if detected. If all values are zero then this indicates that no strike was detected for a configurable amount of time since the last strike.</Description>
Expand Down Expand Up @@ -114,4 +114,51 @@
<Count>1</Count>
</item>
</SALEvent>
<Enumeration>
HONEYCOMB_TOP=1,
HONEYCOMB_MIDDLE=2,
HONEYCOMB_BOTTOM=3,
PLENUM=4,
CELL_TOP=5,
CELL_BOTTOM=6
</Enumeration>
<SALEvent>
<Subsystem>ESS</Subsystem>
<EFDB_Topic>ESS_logevent_thermocouples</EFDB_Topic>
<Description>Details about M1M3 thermocouples. Thermal scanner is provided in topic's index, and port number is the item's index.</Description>
<item>
<EFDB_Name>name</EFDB_Name>
<Description>Comma separated lists of thermocouple name/ID.</Description>
<IDL_Type>str</IDL_Type>
<Units>unitless</Units>
</item>
<item>
<EFDB_Name>location</EFDB_Name>
<Description>Thermocouple location. One of the HONEYCOMB_XXX,PLENUM or CELL_XXX enumerations.</Description>
<IDL_Type>int</IDL_Type>
<Units>unitless</Units>
<Count>94</Count>
</item>
<item>
<EFDB_Name>xPosition</EFDB_Name>
<Description>Thermocouple X position in meters.</Description>
<IDL_Type>float</IDL_Type>
<Units>m</Units>
<Count>94</Count>
</item>
<item>
<EFDB_Name>yPosition</EFDB_Name>
<Description>Thermocouple Y position in meters.</Description>
<IDL_Type>float</IDL_Type>
<Units>m</Units>
<Count>94</Count>
</item>
<item>
<EFDB_Name>zPosition</EFDB_Name>
<Description>Thermocouple Z position in meters.</Description>
<IDL_Type>float</IDL_Type>
<Units>m</Units>
<Count>94</Count>
</item>
</SALEvent>
</SALEventSet>
12 changes: 12 additions & 0 deletions python/lsst/ts/xml/data/sal_interfaces/ESS/ESS_Telemetry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1677,4 +1677,16 @@
<Count>1</Count>
</item>
</SALTelemetry>
<SALTelemetry>
<Subsystem>MTM1M3ThermalScanner</Subsystem>
<EFDB_Topic>MTM1M3ThermalScanner_thermocouplesTemperatures</EFDB_Topic>
<Description>Temperatures measured by thermocouples. Details of the thermocouple's locations are in lsst.ts.xml.tables.m1m3</Description>
<item>
<EFDB_Name>temperatures</EFDB_Name>
<Description>Measured thermocouple temperatures. Index is thermal scanner port number (0-based). As CSC is indexed, the index gives thermal scanner.</Description>
<IDL_Type>float</IDL_Type>
<Units>deg_C</Units>
<Count>94</Count>
</item>
</SALTelemetry>
</SALTelemetrySet>
22 changes: 22 additions & 0 deletions python/lsst/ts/xml/enums/ESS.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,25 @@ class OnOff(enum.IntEnum):

ON = 1
OFF = 2


class M1M3Thermocouple(enum.IntEnum):
"""M1M3 Thermocouple location.
Values:
* HONEYCOMB_TOP: Top of the mirror's honeycomb.
* HONEYCOMB_MIDDLE: Middle in the mirror's honeycomb.
* HONEYCOMB_BOTTOM: Bottom of the mirror's honeycomb.
* PLENUM: Air plenum (area between the glass mirror and top of the mirror
cell, where conditioned air enters).
* CELL_TOP: Top of the mirror cell.
* CELL_BOTTOMz: Bottom of the mirror cell.
"""

HONEYCOMB_TOP = 1
HONEYCOMB_MIDDLE = 2
HONEYCOMB_BOTTOM = 3
PLENUM = 4
CELL_TOP = 5
CELL_BOTTOM = 6
1 change: 1 addition & 0 deletions python/lsst/ts/xml/tables/m1m3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
force_actuator_from_id,
)
from .fcu_table import FCUData, FCUTable, fcu_from_address
from .thermocouple_table import ThermocoupleData, ThermocoupleTable
104 changes: 104 additions & 0 deletions python/lsst/ts/xml/tables/m1m3/thermocouple_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# This file is part of ts_xml.
#
# Developed for Vera Rubin Observatory.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation either version 3 of the License or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import enum
from dataclasses import dataclass

__all__ = [
"ThermalScanner",
"ThermocoupleLocation",
"ThermocoupleData",
"ThermocoupleTable",
]

"""This module provides location and names for M1M3 thermocouples. Thermocouple
measurements are read by the M1M3 Thermal Scanner CSC.
Attributes
----------
ThermocoupleTable : `[ThermocoupleData]`
"""


class ThermalScanner(enum.IntEnum):
"""Thermal scanner measurement box location."""

Y_PLUS = 1
X_PLUS = 2
Y_MINUS = 3
X_MINUS = 4


class ThermocoupleLocation(enum.IntEnum):
"""Location of the mirror thermocouple. HC is for the mirror HoneyComb -
the sensor is located in the glass mirror."""

HC_BOTTOM = 1
HC_MIDDLE = 2
HC_TOP = 3


@dataclass
class ThermocoupleData:
"""Represent thermocouple index, name and location inside the mirror cell.
Attributes
----------
name : `str`
Thermocouple name - e.g. MTC017B1.
location : `ThermocoupleLocation`
Location type
scanner : `ThermalScanner`
Scanner to which is the thermocouple connected.
port : `int`
Thermocouple 1-based port. Gives port where the termocouple is
connected. Shall be integer in range 1-96.
x_position : `float`
X position in mirror cell.
y_position : `float`
Y position in mirror cell.
z_position : `float`
Z position in mirror cell.
"""

name: str
location: ThermocoupleLocation
scanner: ThermalScanner
port: int
x_position: float
y_position: float
z_position: float


ThermocoupleTable = [
ThermocoupleData(
"MTC038B1",
ThermocoupleLocation.HC_BOTTOM,
ThermalScanner.Y_PLUS,
1,
0.1,
0.1,
-0.1,
),
ThermocoupleData(
"MTC038F", ThermocoupleLocation.HC_TOP, ThermalScanner.Y_PLUS, 2, 0.1, 0.1, 0.1
),
]

0 comments on commit 1d146d6

Please sign in to comment.