Skip to main content

pyspiro

Project description

pyspiro

logo

The Package pyspiro implements multiple spirometric, bodyplethysmographic and oscillometric lung function reference equations.

Currently Available Models/Equations

  • Standard and race-neutral Spirometry reference equations (GLI, LuftiBus): (Quanjer 2012, PMID: 22743675; Kuster 2008, PMID: 18057057, Bowerman 2023, PMID: 36383197)
  • Lung Diffusion reference equations (GLI): (Stanojevic 2017, PMID: 28893868)
  • Lung Diffusion reference equations (SCAPIS): (Malinovschi 2023, PMID: 37339507)
  • Static lung volumes reference equations (GLI): (Hall 2021, PMID: 33707167)
  • Oscillometric reference equations (KORA): (Schulz 2013, PMID: 23691036)

Planned future implementations

  • ECCS-1993 reference values (Laszlo 1993) (Version 1)
  • Breath-washout reference values (version 2).

Brief application example (2012 GLI reference equations)

import pandas as pd
from pyspiro import GLI_2012

gli = GLI_2012()

# Suppose df is a pandas DataFrame object.
# sex_binary: 0 = female, 1 = male
# fev1 in liters, age in years, height in cm.
# Suppose patient ethinicity = Caucasian for all patients in dataset (here: "1")

df[['fev1_p', 'fev1_z', 'fev1_lln']] = df.apply(
    lambda x: pd.Series(
        gli.all(
            x.sex_binary,
            x.age,
            x.height,
            1, # Ethnicity
            gli.Parameters["FEV1"],
            x.fev1
        )
    ),
    axis=1
)

If using, please cite as:

Hendrik Pott, Roman Martin. pySpiro: v.0.3.3. Published online Jun 10, 2025. doi:10.5281/zenodo.15519193

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

pyspiro-0.3.7.tar.gz (330.1 kB view details)

Uploaded Source

Built Distribution

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

pyspiro-0.3.7-py3-none-any.whl (334.6 kB view details)

Uploaded Python 3

File details

Details for the file pyspiro-0.3.7.tar.gz.

File metadata

  • Download URL: pyspiro-0.3.7.tar.gz
  • Upload date:
  • Size: 330.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyspiro-0.3.7.tar.gz
Algorithm Hash digest
SHA256 24adcd113be39c8865ec689c3400ffff45536b71c501bacd7aafea25f35dc508
MD5 1f74e94dd80cf9d93d08bcfd6a6f5696
BLAKE2b-256 32b66e4a85b1f401ba68345272b1001cbf15b79dea4394f90c472ada8803aa09

See more details on using hashes here.

File details

Details for the file pyspiro-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: pyspiro-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 334.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyspiro-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cff92255a028923db8df10132f98681907aa02afa05c17a6e78325e5f75759b2
MD5 564333a00b06e9002e443b97b97a47c7
BLAKE2b-256 e08d2408afb8091437797527667ec9cee9eafe48a61ae6d588524e011abb4a37

See more details on using hashes here.

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