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.2.0.tar.gz (61.5 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.2.0-py3-none-any.whl (55.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymicrodxp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 da320d519291dbcce3c8bd402f42237b85b4094556cfd71101e49e43440e2c92
MD5 6ab264a343256730d80def0d83da3203
BLAKE2b-256 c9ca06b8710f2ce0588abb48bb3455f56c4a83e6ab2f6962d850824fd3354bcf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymicrodxp-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 55.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aab758a90901624ccc2347f0a6570d0f02c95e40f1621d41667c63ad3a4d6884
MD5 65137eb5051a53c189c5d63ec9328376
BLAKE2b-256 e2067fe2f1e9530fc44102a9c7094ed1e153e0e7fb3803afc0e86c8a7ac221aa

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