Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dd00b3d
inital tauHK code
merny93 Nov 21, 2025
86971d6
handling multiple data rates
merny93 Dec 10, 2025
c9a07fb
Commented out the commanding as that is being reworked but added subp…
merny93 Dec 11, 2025
026a61f
added commanding logic and advertising. Added load from config
merny93 Dec 12, 2025
d671dc3
made field definitions work with ocs-web components
merny93 Dec 15, 2025
e1663a2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 15, 2025
1646402
working on amun
merny93 Jan 12, 2026
1976725
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 12, 2026
31f1caf
added a downsampled feed for influx as full data rate was too much
merny93 Jan 26, 2026
13bf0a6
merge conflict resolution. not sure with what but oh well
merny93 Jan 26, 2026
55fa972
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 26, 2026
c5c5093
Merge branch 'main' into tauhk
merny93 Feb 18, 2026
1288ae0
Fix loading/running files from relative paths
BrianJKoopman Feb 19, 2026
4bfd4db
Fix pb2 import
BrianJKoopman Feb 19, 2026
66efc19
Remove tauhk_logs feed and relog to stdout
BrianJKoopman Feb 19, 2026
4c218cb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2026
491228e
Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
BrianJKoopman Feb 19, 2026
5f76691
Revert "Remove tauhk_logs feed and relog to stdout"
BrianJKoopman Feb 19, 2026
d9cad29
Remove tauhk_logs feed and relog to stdout
BrianJKoopman Feb 19, 2026
c866f49
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2026
32a420f
Capitalize agent-class
BrianJKoopman Feb 19, 2026
32a31d2
Working on rst docs
merny93 Feb 23, 2026
4eb66b9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 23, 2026
4a82629
Start processes and load excitations on startup
BrianJKoopman Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions docs/agents/tauhk.rst

@BrianJKoopman BrianJKoopman Jan 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is largely incomplete. There's a complete example in the ocs docs. You can also see any other agent's reference page for an example. Important things missing:

  • The argparse block, which automatically displays arguments for the agent
  • A description of dependencies for running this agent (I know we've discussed this offline, but just for the record here). This should describe, or otherwise link to, instructions for installing the required dependencies.
  • Configuration file examples
  • "Agent API" section

Could you also add it to the index (in alphabetical order)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first link may be incorrect. Was it supposed to point to: https://flake8.pycqa.org/en/latest/user/violations.html#in-line-ignoring-errors

Can you provide the link you had in mind please!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry about that, updated in the original post. It's here: https://ocs.readthedocs.io/en/main/developer/agent_references/documentation.html

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.. highlight:: rst

.. _tauhk:

===========
tauHK Agent
===========

The tauHK system is an all in one cryogenic temperature control system.
More information can be found in the accompanying `paper <https://pubs.aip.org/aip/rsi/article/96/9/094902/3363308/HK-A-modular-housekeeping-system-for-cryostats-and>`_.

.. argparse::
:filename: ../socs/agents/tauhk/agent.py
:func: make_parser
:prog: python3 agent.py

Dependencies
------------

The tauHK hardware comumunicates over ethernet with a static IP setup.
The hardware for the LAT has been configured to a static IP ``10.1.0.74`` and expects the control computer to be found at ``10.1.0.77``.

``amun`` has been outfitted with a usb to ethernet device, this device can be configured with::

$ sudo ip addr add 10.1.0.77/24 dev enx14ebb6850591 # set the IP
$ sudo ip link set enx14ebb6850591 up #bring up the dev if it is down (does not show up in ifconfig without -a flag)

The direct interaction with the hardware is handled by a percompiled binnary, please contact a member of the taurus cmb collaboration to obtain a copy.
This binary must be named ``tauhk-agent`` and placed in the same directoy as the ``agent.py``.

Finally, channel mappings must be provided in the form of a `protobuf <https://protobuf.dev/>`_ file descriptor.
This file descriptor is generated from a experiment configuration yaml with the following syntax::

- rtd: # RTD card type
position: 2 # Physical card position in the crate (zero indexed)
channels:
- name: rtd_0 # Channel name mapping
channel: 0 # Card channel number (zero indexed)
lut: luts/table.lut # path to look up table for converting from native units to temperature
- name: rtd_1 # Name is mandatory
channel: 1 # Channel number is mandatory
# lut is optional
- diode: # Diode card type
position: 4
channels:
- name: diode_0
channel: 0
lut: /abs_path/table.lut

The config file is then turned into a ``.proto`` file with ``python3 generate_proto`` which is turned into a file descriptor with::

$ protoc --file-descriptor-out=descriptor.bin --include-imports system.proto

The tauHK binary expects this file descriptor to be named ``descriptor.bin`` in the same directoy as ``agent.py``.

For tauHK to output data in temperature units, lookup tables must be provided.
These lookup tables need to formated as follows::

# Comments must have a leading pound sign
# Data must be in sorted increasing order
# Map from native units (ohms for RTD and volts for Diode) to temperature
0.234515 300
0.245463 275
# and so on...

Configuration File Examples
---------------------------

Todo. if this is dockerized this will look different I suspect

Example Clients
---------------

Device Configuration
````````````````````

The tauHK agent will not stream data (or really do anything) on it's own.
First, the binary must be launched with the ``start_crate`` process, the logs from the binary are re-logged into the agent logs for introspection.
To begin logging data the ``recieve_data`` process must be run, this starts the data stream to influx and to ``.g3`` files.

Commands can be sent via the ``generic_send`` task, allowing users to command individual channels or with ``load_excitation`` for multiple channels at the same time.

Agent API
---------

.. autoclass:: socs.agents.tauhk.agent.TauHKAgent
:members:
Empty file added socs/agents/tauhk/__init__.py
Empty file.
Loading
Loading