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.0.0.tar.gz (51.4 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.0.0-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymicrodxp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c5e3c81d4a7be4cdb40c0b48bd5c5c4ccf3c57d33376e3b43e19028fcf95d61e
MD5 875103604a209b2e8fba49954f6dc3f8
BLAKE2b-256 4d74e27272e2c4e5f71209b144c65f1a5f51a9d150580e201e41c03bf33e1d74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymicrodxp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 54.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19474aa152f86ba812396cfdfdaa2a3ba5b4866a62ac5b187330d2df4b37a360
MD5 640740a4042f96306acac9e3b0c5c2fc
BLAKE2b-256 3461fbb7e04592e2812cc200ed675465a98f5e539e2a10a48372929648783a02

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