Skip to main content

Python bindings for quadrupole mass filter voltage calculations

Project description

qmfcalc

Quadrupole mass filter calculation utilities.

Python

The Python package builds a native extension with pybind11:

python -m pip install .

Python 3.12 and 3.13 are supported targets.

or directly from a Git checkout:

python -m pip install git+https://github.com/<owner>/<repo>.git

Use it from Python:

import qmfcalc

result = qmfcalc.calculate_voltages(
    r0_mm=15.0,
    target_m_over_q_amu_per_z=250.0,
    resolution=250.0,
    rf_frequency_mhz=1.0,
)

print(result["rf_voltage_v"], result["dc_voltage_v"])

inverse = qmfcalc.calculate_mass_resolution(
    r0_mm=15.0,
    rf_voltage_v=result["rf_voltage_v"],
    dc_voltage_v=result["dc_voltage_v"],
    rf_frequency_mhz=1.0,
)

print(inverse["m_over_q_amu_per_z"], inverse["resolution"])

rf_voltage_v is the per-rod peak-to-peak RF voltage. dc_voltage_v is the pole-to-pole DC voltage. calculate_mass_resolution uses the same voltage conventions and returns the transmitted mass-to-charge value in amu/Z plus the resolving power.

The GitHub Actions workflow in .github/workflows/python-package.yml builds and tests Python 3.12 and 3.13 Linux and Windows wheels on pushes and pull requests.

PyPI release

Configure a PyPI pending trusted publisher with:

  • PyPI project name: qmfcalc
  • Owner: kenji0923
  • Repository: qmfcalc
  • Workflow name: publish-pypi.yml
  • Environment name: pypi

Then publish a GitHub Release from a version tag, for example:

git tag v0.1.2
git push origin v0.1.2

The .github/workflows/publish-pypi.yml workflow builds the Python 3.12 and 3.13 Linux and Windows wheels, builds the source distribution, and publishes them to PyPI.

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

qmfcalc-0.1.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qmfcalc-0.1.2-cp313-cp313-win_amd64.whl (264.6 kB view details)

Uploaded CPython 3.13Windows x86-64

qmfcalc-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (76.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

qmfcalc-0.1.2-cp312-cp312-win_amd64.whl (264.5 kB view details)

Uploaded CPython 3.12Windows x86-64

qmfcalc-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (76.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file qmfcalc-0.1.2.tar.gz.

File metadata

  • Download URL: qmfcalc-0.1.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qmfcalc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8ed30c50909af67306b4dba3e7b1977fcf7cecbe28b824c229f9eec79a12ae99
MD5 6070d4da241776ff8614e5d389803624
BLAKE2b-256 b55b4144a230dc060218617c469fa22782c5f9ae5a9ccdca26ce71fefe42ea48

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmfcalc-0.1.2.tar.gz:

Publisher: publish-pypi.yml on kenji0923/qmfcalc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qmfcalc-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: qmfcalc-0.1.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 264.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qmfcalc-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a3ac85ff9370998277928374d5abdbbccd7beea23df420f05831da074fc991c6
MD5 3349168033dd117002f9aa6d54f967bf
BLAKE2b-256 e1dd1e51f89873ee1d0bc6ac1fdfc21b79248540d3bbb14b3c18aafec75601f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmfcalc-0.1.2-cp313-cp313-win_amd64.whl:

Publisher: publish-pypi.yml on kenji0923/qmfcalc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qmfcalc-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qmfcalc-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0c82bbcd1fd474fac0670163607853a7cc7a15c3b12de948ce1714ff3e118dc5
MD5 d596dda1988d32b340298e391e6aac07
BLAKE2b-256 1eec4a1c5becd4251e78d79a7893f1d643558ceb7e1c6b000367e94d3c7fa8dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmfcalc-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-pypi.yml on kenji0923/qmfcalc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qmfcalc-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: qmfcalc-0.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 264.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qmfcalc-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 477ffb3c5a75e23c8845daa5be2297003655d8005d1254d4715c923d931fd27f
MD5 da21e9ae583d6dd50758e669595ce889
BLAKE2b-256 965906ffd8624b210333bf1c075ee93cb83396e8bf945280a3772a605e37be2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmfcalc-0.1.2-cp312-cp312-win_amd64.whl:

Publisher: publish-pypi.yml on kenji0923/qmfcalc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qmfcalc-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qmfcalc-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a8392ba1222ef6b0db951f71c1f34496253ff05a6217618278b7a003f1faf62c
MD5 79751dfc50d3e282fd0caa3a7f2b6917
BLAKE2b-256 bffeadc547d225077a23a463e16a6b99c8bb1d7776c497b7df3e948cd29ee6c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmfcalc-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-pypi.yml on kenji0923/qmfcalc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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