Skip to main content

Python package implemented in Rust to decode MOSS readout data

Project description

MOSS Decoder

CI PyPI - Downloads GitHub commit activity (branch)

Python module implemented in Rust for decoding raw data from the MOSS chip (Stitched Monolithic Pixel Sensor prototype).

Installation

$ pip install moss-decoder

Import in python and use for decoding raw data.

import moss_decoder
moss_packets = moss_decoder.decode_event(bytes)

Motivation & Purpose

Decoding in native Python is slow and the MOSS verification team at CERN got to a point where we needed more performance.

Earliest version of a Rust package gave massive improvements as shown in the benchmark below.

Decoding the 10 MB MOSS readout data. Performed on CentOS Stream 9 with Python 3.11

Command Mean [s] Min [s] Max [s] Relative
python moss_test/util/decoder_native_python.py 36.319 ± 0.175 36.057 36.568 228.19 ± 2.70
python moss_test/util/decoder_rust_package.py 0.159 ± 0.002 0.157 0.165 1.00

@CERN Gitlab installation for CentOS and similar distributions from local build

If you update the package source code and want to build and install without publishing and fetching from PyPI, you can follow these steps.

The .CERN-gitlab-ci.yml file contains a build-centos manual job which will build the MOSS decoder package from source and saves the package as an artifact.

  1. Start the job, download the artifacts.
  2. Unzip the artifacts and you will find a wheels package in /target/wheels/ with the .whl extension
  3. Run python -m pip install <wheels package>.whl
  4. Confirm the installation with python -m pip freeze | grep moss, it should display something containing moss_decoder @ file:<your-path-to-wheels-package>

Troubleshooting

if you get ERROR: Could not find a version that satisfies the requirement ... make sure to add .whl when performing step 3 above.

if you don't see the expected message at step 4, try running the installation command in step 3 with any or all of these options --upgrade --no-cache-dir --force-reinstall.

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

moss_decoder-0.3.0.tar.gz (2.4 MB view hashes)

Uploaded Source

Built Distributions

moss_decoder-0.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.2 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (593.7 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (579.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl (599.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.2 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (593.7 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (579.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl (599.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.2 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (594.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (578.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl (599.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (589.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-pp37-pypy37_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (704.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-pp37-pypy37_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (592.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-pp37-pypy37_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (596.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (581.2 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl (601.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.0 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.5 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.4 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (593.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (578.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl (599.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-cp311-none-win_amd64.whl (120.2 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

moss_decoder-0.3.0-cp311-none-win32.whl (113.8 kB view hashes)

Uploaded CPython 3.11 Windows x86

moss_decoder-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (586.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.4 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (593.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (578.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (599.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (222.2 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

moss_decoder-0.3.0-cp311-cp311-macosx_10_7_x86_64.whl (232.1 kB view hashes)

Uploaded CPython 3.11 macOS 10.7+ x86-64

moss_decoder-0.3.0-cp310-none-win_amd64.whl (120.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

moss_decoder-0.3.0-cp310-none-win32.whl (113.7 kB view hashes)

Uploaded CPython 3.10 Windows x86

moss_decoder-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (586.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (593.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (578.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (599.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (222.2 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

moss_decoder-0.3.0-cp310-cp310-macosx_10_7_x86_64.whl (232.1 kB view hashes)

Uploaded CPython 3.10 macOS 10.7+ x86-64

moss_decoder-0.3.0-cp39-none-win_amd64.whl (120.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

moss_decoder-0.3.0-cp39-none-win32.whl (113.9 kB view hashes)

Uploaded CPython 3.9 Windows x86

moss_decoder-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (700.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (594.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (579.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (599.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-cp38-none-win_amd64.whl (120.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

moss_decoder-0.3.0-cp38-none-win32.whl (114.1 kB view hashes)

Uploaded CPython 3.8 Windows x86

moss_decoder-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl (701.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (594.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (579.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (599.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

moss_decoder-0.3.0-cp37-none-win_amd64.whl (120.4 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

moss_decoder-0.3.0-cp37-none-win32.whl (114.1 kB view hashes)

Uploaded CPython 3.7 Windows x86

moss_decoder-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (587.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

moss_decoder-0.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl (701.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ s390x

moss_decoder-0.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (590.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ppc64le

moss_decoder-0.3.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (594.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARMv7l

moss_decoder-0.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (579.2 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

moss_decoder-0.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (599.7 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page