Control Becker & Hickl SPC modules from Python
Project description
pybhspc: Control Becker & Hickl SPC modules from Python
pip install pybhspc
import bh_spc
from bh_spc import spcm
Overview
The pybhspc package provides Python bindings to the Becker & Hickl SPCM DLL, which is the control and acquisition interface for SPC modules. (SPC moduels are PCI/PCIe boards that perform TCSPC (time-correlated single photon counting) or time-tagging.)
Note: The author of this package is not affiliated with Becker & Hickl GmbH.
The main package bh_spc
provides a few utility functions. The module
bh_spc.spcm
provides Python bindings to the SPCM functions and data types.
To use the relatively direct bindings in bh_spc.spcm
, you will need to
understand the underlying SPCM DLL interface, provided and documented by BH.
(I plan to add a higher-level interface that simplifies device enumeration and
FIFO acquisition, but this is not yet available.)
Access to all of the functions that are required for FIFO (time tag stream)
mode acquisition on SPC boards (including with multiple boards) is provided by
the bh_spc.spcm
module. Not supported are functions that are specific to
conventional (non-FIFO mode) acquisition, the DPC-230, and stream buffering
(data buffering can readily be done using other Python facilities).
Note that interpreting the time tag stream data (a seqeunce of binary records) is outside the scope of this library. It's always good to keep data acquisition and data processing/analysis code separate (even if they run concurrently in a particular application).
Status and Versioning
This package should be considered experimental, even though the spcm
module
is reasonably complete for FIFO mode acquisition. Until version 1.0.0 is
released, all APIs are subject to backward-incompatible changes. However,
backward-incompatible changes will be documented following the first release
(version 0.1.0).
Hardware Requirements
An effort has been made to avoid making unnecessary assumptions about the SPC module type (i.e., device model). pybhspc also allows testing with the SPCM DLL set to simulation modes.
It should be possible to operate most of the SPC boards supported by the SPCM DLL: SPC-600, 630, 130, 830, 140, 930, 150, 130EM, 150N (NX, NXX), 130EMN, 160 (X, PCIE), 180N (NX, NXX), and 130IN (INX, INXX). Recent versions of SPCM do not support some of the older models except in simulation; check the BH documentation.
Caveat: Most of these have not been tested, especially with hardware.
SPC-700 and 730 are not listed here because they do not have a FIFO mode.
DPC-230 is not currently supported by pybhspc (it requires some extra functions and data types).
SPC-QC-104 and 004 may work (no attempt has been made to test these yet, even in simulation).
SPC-QC-008 uses a completely different programming interface and is out of scope for the pybhspc package (but BH offers a Python interface called bhpy for SPC-QC-104/004/008).
Software Requirements
Windows (64-bit Intel) only.
Python 3.10+ (64-bit).
The Becker & Hickl SPCM DLL (part of their TCSPC Package installer) must be installed on the system. The most recent version is usually recommended; absolute minimum is version 4.0 (Apr 2014; but versions below 5.2 have not been tested). Note that these are version numbers of the SPCM DLL, not of the TCSPC Package or the SPCM application.
The SPCM DLL is usually found in its installed location; there is no need to copy it or set any environment variables.
License
The pybhspc package is distributed under the MIT license.
Getting Started
Check out the example in the documentation.
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 Distributions
File details
Details for the file pybhspc-0.1.0.tar.gz
.
File metadata
- Download URL: pybhspc-0.1.0.tar.gz
- Upload date:
- Size: 394.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3791f75050694552c6d5b57c69d43c53fe61340b0092723d0babf0308dd06572 |
|
MD5 | 7b1c145b0717842f4d40e16f18bf69cf |
|
BLAKE2b-256 | c5b904038002135bc460abffd75370992d298c6333327bc04b4b60c1b1cd0151 |
File details
Details for the file pybhspc-0.1.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pybhspc-0.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 593.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62787f4d0e83706c8036ad73d4a22348c1b03e64406ea3b023e11c16744e1cbb |
|
MD5 | 3b5f9ee6381e72febb7511d0e4371bad |
|
BLAKE2b-256 | 63f3644db98d978956849631f09d1c846ed927ae924bb584fa3a9c1898a896b6 |
File details
Details for the file pybhspc-0.1.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pybhspc-0.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 594.9 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75b62bc77d3a20e8674cc0eaff9ef48953288c0fe3e6d32a9cfebfc8a6b366b7 |
|
MD5 | 836b8f0d5e490c6e2325f4da94f93396 |
|
BLAKE2b-256 | 1b989244fef13486642df78ad426d8b0ca07b025b6c3c6f6646627861cb6e7fb |
File details
Details for the file pybhspc-0.1.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pybhspc-0.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 594.5 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a8b6c8f4b68d7cde0791abd8103c2d96ba694f68d5328a46c5698a475e4a942 |
|
MD5 | ba9a1ee5a925d08d4f4590927c8d1729 |
|
BLAKE2b-256 | e105ba41e7216bb06a46a241b1daf02e45d286fe7580943eaf206884a26ae6cd |