User Guide

This guide covers important concepts and best practices for using the ChimeraTK DeviceAccess Python bindings.

Understanding Accessors

Accessors are the primary interface for reading and writing device registers. They encapsulate:

  • A reference to a specific register

  • A local buffer holding the current value

  • Type information and conversion logic

  • Synchronization with hardware

Accessor Lifecycle

  1. Obtain: Get an accessor from a device for a specific register

  2. Transfer: Use read() to get data from hardware or write() to send data

  3. Access: Read/write the local buffer without hardware communication

  4. Repeat: Transfer more data as needed

# TODO

Accessor Types

ScalarRegisterAccessor: Single values

# TODO

ArrayRegisterAccessor: List of values

# TODO

TwoDRegisterAccessor: Two-dimensional arrays

# TODO

Type Conversion

Automatic Type Conversion

The bindings automatically convert between hardware and Python types as set on accessor creation:

# TODO

Transfer Groups

Transfer groups enable atomic operations on multiple registers:

Motivation

Without transfer groups, reading multiple registers could result in inconsistent data if a register changes between reads.

# TODO Example of changes between reads

Solution: Transfer Groups

# TODO

Data Consistency Groups

For advanced scenarios with multiple samples or high-frequency updates:

# TODO

Device Maps

Device maps define your hardware configuration.

Basic Syntax

# Device map format
# LABEL              BACKEND_SPECIFICATION

# TODO: Give examples

Best Practices

  • Use meaningful device labels

  • Organize by system or subsystem

  • Version control your device maps

See Also