Skip to main content

This package contains the reference value calculator for spirometry.

Project description

Spiref: Spirometry Reference Value Calculator

This package contains the reference value calculator for spirometry. Can be installed immediately using pip:

pip install spiref

Currently supported:

Parameters:

  • sex: either 'male' or 'female'.
  • height: the height of the person in centimeter.
  • age: the age in years.
  • race: different options for NHANES III and GLI-2012 (see below).

NHANES III

Race options for NHANES III: 'Cau', 'AfrAm', 'MexAm' (Causasian, African-American or Mexican-American).

GLI-2012

Either the general calculation function (calc_lung_param) or the specific calculation functions (analogue to the NHANES calculator) can be used. Use the function calc_lln_lung_param with the same parameters as calc_lung_param to compute the lower limit of normal (LNN or 5th percentile).

Possible lung parameters are: 'FEV1', 'FVC', 'FEV1FVC', 'FEF2575', 'FEF75'.

Race options for GLI-2012: 'Cau', 'AfrAm', 'NEAsia', 'SEAsia', 'other' (Caucasian, African-American, North-East Asia, South-East Asia, other).

Usage

For NHANES III:

from spiref import nhanes3

# Load the calculator
rvc = nhanes3.NHANESReferenceValueCalculator()

# Use the calculator to compute FEV1 for a male of height 174cm, age 28 of the African-American race.
fev1 = rvc.calculate_fev1('male', 174, 28, race='AfrAm')

For GLI12:

from spiref import gli12

# Load the calculator
rvc = gli12.GLIReferenceValueCalculator()

# The general calculator function:
fev1 = rvc.cal_lung_param('FEV1', 'male', 174, 28, 'AfrAm')  # African-American male, height 174 cm, age 28
# Same can be achieved with the specific FEV1 function:
fev1 = rvc.calculate_fev1('male', 174, 28, race='AfrAm')

# Computing the lower limit of normal (5th percentile)
fev1_lln = rvc.calc_lln_lung_param('FEV1', 'male', 174, 28, 'AfrAm')

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

spiref-1.0.4.tar.gz (183.0 kB view details)

Uploaded Source

Built Distribution

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

spiref-1.0.4-py3-none-any.whl (182.1 kB view details)

Uploaded Python 3

File details

Details for the file spiref-1.0.4.tar.gz.

File metadata

  • Download URL: spiref-1.0.4.tar.gz
  • Upload date:
  • Size: 183.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for spiref-1.0.4.tar.gz
Algorithm Hash digest
SHA256 bbab5ded8600ff812da986e2afceb516af754f6eaa1b975665516b7c04e07ee5
MD5 a8244d59ae26f4390128901571986dea
BLAKE2b-256 a79ea8ccdbf533ba2c20f3230901ce570e7eb63f4e1821166d82302a28d8cc7e

See more details on using hashes here.

File details

Details for the file spiref-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: spiref-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 182.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for spiref-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4fffc85524ad04bbb94cf8541e6ea562a41f979baf8f641c0c8e6a5d369b6b
MD5 4487a7623a8330c7d311cbceb17f5cde
BLAKE2b-256 043dc28c82ca30a2f1cb54c757daa131fc213560568a57f4e944c0b8e82319b4

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