Skip to main content

High-performance driver for XIA microDXP hardware.

Project description

pymicrodxp

pymicrodxp is a Python-based RS-232 hardware driver and interactive command-line utility for the XIA microDXP Rev H and J hardware. It provides both a robust API for developers and a fully-featured interactive shell for hardware testing, diagnostics, and trace visualization.

Features

  • Interactive Hardware Shell: A stateful command-line interface for rapid hardware debugging.
  • Diagnostic Trace Capture: Easily capture, log, and visualize 8,000-point diagnostic traces (ADC, Filters, Baselines).
  • Built-in Visualization: Interactive matplotlib plotting for hardware traces.
  • Session Logging: All shell inputs and hardware outputs are automatically piped to an ISO 8601-timestamped log file with automatic log rotation.
  • Cross-Platform: Works on Windows, macOS, and Linux. Includes a tkinter-based file picker for seamless data loading.

Prerequisites

  • Python: 3.9 or newer.
  • OS-Specific Hardware Permissions (Linux Only): By default, Linux distributions restrict access to serial ports. To allow your user to communicate with the microDXP (e.g., via /dev/ttyUSB0), you must add your user account to the dialout group. Refer to your distribution's documentation on using usermod to add a user to the dialout group. Note: You must log out and log back in (or restart your computer) for this permission change to take effect.

Installation

If you are using pymicrodxp to interface with the hardware and capture data, set up your environment as follows:

# Install core driver
pip install pymicrodxp

# Install with interactive shell and plotting
pip install pymicrodxp[shell]

This will install the library and automatically register the microdxp terminal command on your system.

Interactive Shell

The easiest way to interact with the board is using the built-in shell. The shell keeps the serial port open between commands for extremely fast readouts.

Launch the shell and automatically connect:

microdxp -u serial://COM3          (Windows Serial)
microdxp -u serial:///dev/ttyUSB0  (Linux Serial)

Linux Users: If you receive a "Permission Denied" error when connecting to hardware:

  1. Add your user to the dialout group: sudo usermod -a -G dialout $USER
  2. Log out and log back in for changes to take effect.

Shell commands

Once inside the (microdxp) shell, you can type help to see a full list of commands, or use <command> -h for specific details. The commands are broken down into the following categories:

  • Session & Connections: connect <uri>, disconnect, view [filename], exit
  • Status: temp, serial, status, info, par_names, reset_dsp, reset_fpga
  • Diagnostics: test [--plot], trace [--plot], histogram [--plot], echo, transceive
  • Run Control: start, stop, mca [--plot], stats, preset, snapshot
  • Spectrometer Control: tau, threshold, mca_width, mca_bins, polarity, parset, genset, filter_param, dac, base_gain, swgain, gain_trim, blfilter_avg_length
  • Peripherals: i2c <read|write> <address> <command_bytes> [-d DATA] [-r READ_LEN]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymicrodxp-1.1.0.tar.gz (56.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymicrodxp-1.1.0-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

Details for the file pymicrodxp-1.1.0.tar.gz.

File metadata

  • Download URL: pymicrodxp-1.1.0.tar.gz
  • Upload date:
  • Size: 56.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for pymicrodxp-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fb6286ab21f6a0edf1ae12401cf38151216fcc9f11d6c6b60de56bc771cc8a0e
MD5 3644b01154dcfa9e26ea9a13d62f53f0
BLAKE2b-256 67dd7b5404b8f85ba34143b9e6747cc17da18e392cdf6fc87457a904f27635ee

See more details on using hashes here.

File details

Details for the file pymicrodxp-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymicrodxp-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 54.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for pymicrodxp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed2c20654b5babd3e4e39b2ee12ec383c70f2a7ce929a9ff9278334238258d7c
MD5 1869f99ab126683d43e0d8bf70a52d02
BLAKE2b-256 e37f785597c785e8473a850a29803c8f4d4ca70aa0a95e90ca23a572f258e465

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page