Skip to content
t0Public

About

python API to the CRS boards

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

rfmux

rfmux is the Python API for t0.technology's Control and Readout System (CRS), a hardware platform designed for operating large arrays of Kinetic Inductance Detectors (KIDs) used in radio astronomy and quantum sensing applications.

The CRS + MKIDs firmware is described in this conference proceedings.

Quick Start

Installation

We recommend using uv for installation:

# Install uv (if not already installed)
$ curl -LsSf https://astral.sh/uv/install.sh | sh  # Linux/macOS or WSL
# Or: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"  # Windows

# Create virtual environment 
uv venv ### or uv venv my-env-name
source .venv/bin/activate # On Windows: .venv/Scripts/activate
# or source my-env-name/bin/activate

rfmux is available on PyPI or from the git repo. For installing directly from PyPI:

# Install rfmux
$ uv pip install rfmux

Or to install directly from the cloned git repo:

# in the rfmux directory
$ uv pip install -e .

Note: rfmux now uses a C++ extension for packet processing. PyPI hosts pre-built binaries (wheels) for common platforms (Linux x86_64, macOS, Windows). If wheels aren't available for your platform, you'll need a C++ compiler. See Installation Guide for details.

Interactive GUI

To launch the Periscope GUI, run:

$ uv run periscope # or periscope

To open a pulse capture or time-ordered data file in review mode, offline:

$ periscope --review pulse_module2_171224.h5

To add Periscope to your application menu, with its icon, and to the right-click Open With menu of .h5 and .hdf5 files (Linux and Windows, for your user only, no administrator rights):

$ rfmux periscope --install-desktop

--default-for-hdf5 also makes double-clicking an HDF5 file open it in Periscope, and --desktop-icon puts a shortcut on the desktop. The entries start Periscope from the environment you ran this in, so run it again after moving to another one. rfmux periscope --uninstall-desktop removes them.

Periscope_movie.mp4

Scripting with Mock Mode

If you do not have a CRS board (or cryogenic detectors) handy, you can use "mock" mode for a software emulation:

# Emulate CRS hardware for offline development
s = rfmux.load_session("""
!HardwareMap
- !flavour "rfmux.mock"
- !CRS { serial: "MOCK0001" }
""")

Scripting with CRS Hardware

To control a single network-attached CRS from your PC's Python prompt, use:

import rfmux

# Connect to a CRS board
s = rfmux.load_session('!HardwareMap [ !CRS { serial: "0033" } ]')
crs = s.query(rfmux.CRS).one()
await crs.resolve()

# Acquire samples
samples = await crs.get_samples(1000, channel=1, module=1)

Documentation

  • Installation Guide - Detailed installation for all platforms, building from source
  • Getting Started - Usage patterns, hardware hierarchy, common operations
  • Networking Guide - UDP tuning, multicast configuration, troubleshooting
  • Firmware Guide - Fetching, managing, and flashing firmware
  • Pulse Capture Guide - Detecting and recording detector pulses, in Periscope and from a script
  • 100G Captures - Recording the channel stream, a pulse capture and a parser dirfile together with rfmux record, reviewing them in Periscope and drawing them over each other
  • Release Notes - What changed in each release

Executable Jupytex Notebooks

The last two are runnable notebooks that ship with the package. See reference-notebooks/README.md for how to open them.

Repository Structure

rfmux/
├── docs/                    # Documentation
├── firmware/                # Firmware binaries (Git LFS)
├── rfmux/                   # Main Python package
│   ├── algorithms/          # Network analysis, fitting, biasing
│   ├── core/                # Hardware schema, sessions, transfer functions
│   ├── mock/                # Physics-based CRS simulator
│   ├── pulse_capture/       # Pulse detection, HDF5 capture, histograms
│   ├── reference-notebooks/ # Runnable demos, shipped with the package
│   ├── streamer/            # C++ packet receiver library
│   └── tools/               # Periscope GUI, CLI, firmware, QC suite
└── test/                    # Test suite

RPC to the board is provided by the separate tuber package.

Contributing & Feedback

rfmux is permissively licensed; see LICENSE for details.

We actively encourage contributions and feedback. Understanding operator needs is how we determine what to add to rfmux.

  • Pull Requests: Your contributions are welcome
  • Issues: Please submit tickets for bugs or enhancement suggestions
  • Collaborator Slack: Join #crs-collaboration - email Joshua@t0.technology with your name, affiliation, and project

Citation

When citing rfmux or CRS, please reference:

CRS + MKIDs Conference Proceedings: https://arxiv.org/abs/2406.16266

About

python API to the CRS boards

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages