Python package for Geiger–Müller Counter (GMC)
Project description
PyGMC
PyGMC is a Python API for Geiger–Müller Counters (GMCs) / Geiger Counters. It has just one dependency (pyserial) and works on multiple operating systems: Windows, OSX, Linux. PyGMC aims to be a minimalistic interface - lowering the installation requirements and allowing the user to build their own tools on top of a stable package.
Installation
pip install pygmc
conda install conda-forge::pygmc
Conda PyGMC version may lag latest PyPI version.
Example Usage
Jupyter Notebook
Auto discover connected GMC, auto identify baudrate, and auto select correct device.
import pygmc
gc = pygmc.connect()
ver = gc.get_version()
print(ver)
cpm = gc.get_cpm()
print(cpm)
Connect to specified GMC device with exact USB port/device/com.
import pygmc
gc = pygmc.GMC320('/dev/ttyUSB0')
cpm = gc.get_cpm()
print(cpm)
Read device history into DataFrame
import pandas as pd
import pygmc
gc = pygmc.GMC320('/dev/ttyUSB0')
history = gc.get_history_data()
df = pd.DataFrame(history[1:], columns=history[0])
datetime | count | unit | mode | reference_datetime | notes |
---|---|---|---|---|---|
2023-04-19 20:37:18 | 11 | CPM | every minute | 2023-04-19 20:36:18 | |
2023-04-19 20:38:18 | 20 | CPM | every minute | 2023-04-19 20:36:18 | |
2023-04-19 20:39:18 | 19 | CPM | every minute | 2023-04-19 20:36:18 | |
2023-04-19 20:40:18 | 23 | CPM | every minute | 2023-04-19 20:36:18 | |
2023-04-19 20:41:18 | 20 | CPM | every minute | 2023-04-19 20:36:18 |
Devices
Device | Brand | Notes |
---|---|---|
GMC-300S ✔️✔️ | GQ Electronics | A little picky |
GMC-300E+ / GMC-300E Plus | GQ Electronics | |
GMC-320+ / GMC-320 Plus ✔️✔️ | GQ Electronics | Works smoothly |
GMC-320S | GQ Electronics | |
GMC-500 | GQ Electronics | |
GMC-500+ / GMC-500 Plus ✔️✔️ | GQ Electronics | Works smoothly |
GMC-600 | GQ Electronics | |
GMC-600+ / GMC-600 Plus ✔️✔️ | GQ Electronics | |
GMC-800 ✔️✔️ | GQ Electronics | *Finally Working |
GMC-SE ✔️ | GQ Electronics | RFC1201 |
✔️✔️=physically confirmed works
✔️=user confirmed works
*Incorrect documentation caused incorrect implementation with pygmc<=0.10.0
Contributors
Notes
- Alternative Python projects for GQ GMC:
- GeigerLog
- gq-gmc-control
- gmc
- Device website GQ Electronics Seattle, WA
- Not affiliated in any way.
Known Issues
- Ubuntu Issue
- Ubuntu requires fixing a bug to be able to connect to any GQ GMC device.
USB devices use VID (vendor ID) and PID (Divice ID)... It is common for unrelated devices to use a common manufacture for their USB interface. The issue with Ubuntu is that it assumes1A86:7523
is a "Braille" device (for the blind) and, ironically, blindly treats it as such. - This causes the GQ GMC device to not connect.
- Ubuntu requires fixing a bug to be able to connect to any GQ GMC device.
- Ubuntu fix
- The fix is to comment out the
udev
rule that does this. The text file may be in two places./usr/lib/udev/85-brltty.rules
/usr/lib/udev/rules.d/85-brltty.rules
- Find the line below and comment it out.
ENV{PRODUCT}=="1a86/7523/*", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"
- We see Ubuntu assumes
1A86:7523
is aBaum [NLS eReader Zoomax (20 cells)]
device.
- The fix is to comment out the
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pygmc-0.14.1.tar.gz
.
File metadata
- Download URL: pygmc-0.14.1.tar.gz
- Upload date:
- Size: 40.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b78cd1f23e9475874e6f5096910437e38ed50894e164e2ef3d529eba6b4a05 |
|
MD5 | 39c431fb30e80fedf4d45c14e8423718 |
|
BLAKE2b-256 | 83ca1f72750aaaa96f9c36917b4ddd8a5279b55b88ddf29e61be5c11d0258eb9 |
File details
Details for the file pygmc-0.14.1-py3-none-any.whl
.
File metadata
- Download URL: pygmc-0.14.1-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 641e6f005a61ea507ba49a95c5f9498d11f590ea278d0cb7666a4bc71348e1e9 |
|
MD5 | 3e796546090f1facb79d32e0eb43e626 |
|
BLAKE2b-256 | 6da1c3383dc2e061621b7a2e717e69455ce18ebed9c148b837a8a438a962e9e2 |