LiberTEM-dectris-rs
This is a Python package for efficiently receiving data from DECTRIS detectors with the zeromq interface. The low-level, high-frequency operations are performed in a background thread implemented in rust, and multiple frames are batched together for further processing in Python.
Decoding of compressed frames is not (yet) handled in this package, but may be added later.
Usage
import libertem_dectris
from libertem_live.detectors.dectris.DEigerClient import DEigerClient
# trigger acquisition via the REST API, needs `libertem-live`
nimages = 512 * 512
ec = DEigerClient('localhost', 8910) # hostname and port of the DCU REST API
ec.setDetectorConfig('ntrigger', 1)
ec.setDetectorConfig('nimages', 1)
ec.setDetectorConfig('trigger_mode', 'exte')
ec.setDetectorConfig('ntrigger', nimages)
result = ec.sendDetectorCommand('arm')
sequence_id = result['sequence id']
frames = libertem_dectris.FrameChunkedIterator()
# start to receive data for the given series
# (can be called multiple times on the same `FrameChunkedIterator` instance)
frames.start(series=sequence_id)
try:
while True:
# get at most `max_size` frames as a stack
# (might get less at the end of the acquisition)
stack = frames.get_next_stack(max_size=32)
for i in range(len(stack)):
frame = stack[i]
# do something with the frame; compression
# is not handled in this module (yet)
image_data_bytes = frame.get_image_data()
shape = frame.get_shape()
encoding = frame.get_encoding()
frame_id = frame.get_frame_id()
if len(stack) == 0:
break
finally:
frames.close() # clean up background thread etc.
Metadata
Release files for libertem-dectris 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| libertem_dectris-0.1.0.tar.gz | 19.5 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libertem_dectris-0.1.0-cp37-abi3-win_amd64.whl | CPython 3.7 | abi3 | Windows x86-64 | Details |
| libertem_dectris-0.1.0-cp37-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.12+ x86-64 | Details |
| libertem_dectris-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl | CPython 3.7 | abi3 | macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) | Details |
Total release size: 5.5 MB
Release files / libertem_dectris-0.1.0.tar.gz
| Download URL | libertem_dectris-0.1.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4214a8d1ed5b5fdeab638eb92cc528ca97969fd751fec21a40ae21cef7419f9
|
|
BLAKE2b-256 checksum How to use checksums |
fc1b3ff635725f319b9136b41704b7d4ab29e9a902b00301b06cc7eb4304395c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.2
|
Release files / libertem_dectris-0.1.0-cp37-abi3-win_amd64.whl
| Download URL | libertem_dectris-0.1.0-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 458.0 kB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c8877f7eb0aa73194d936519d87986d577c211f65242c3dfd83b0aaa3c89fa60
|
|
BLAKE2b-256 checksum How to use checksums |
7c8ae748ab7e10ca3a8e867d92b5fd1fe3ba4255008dd97cb7edb4278cb07774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.2
|
Release files / libertem_dectris-0.1.0-cp37-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
| Download URL | libertem_dectris-0.1.0-cp37-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.7 Linux glibc 2.12+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fe7134c6d3701eafb2be52a0eba039dd2cf852a360743cdce18f54548e46d22c
|
|
BLAKE2b-256 checksum How to use checksums |
24df70cfed8b8cce29bfba18d4c768a43a23001ce925a36746019a8b6424d4a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.2
|
Release files / libertem_dectris-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | libertem_dectris-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.7 abi3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
289e2591975bf07f876635ecc7fe78f4bf3f19aaeafe0d9b27c11cbd7bb160b1
|
|
BLAKE2b-256 checksum How to use checksums |
e1d54f76f38cdba34709447e33bd3c2404c1c49b7574917021639101e41a1177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.2
|
Security for libertem-dectris 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.