Skip to main content

Tools for calculating pH and Alkalinity from spectrophotometric data.

Project description

DOI PyPI version

carbspec : pH and Alkalinity Determination by Spectral Fitting

Submitted Manuscript

High-Precision characterisation of indicator dyes by Spectral Fitting: Application to Swawater pH and Alkalinity measurements. Branson, O. & Ellwood, M. L&O Methods

Electronic supplements are available in the SI Folder.

Installation

pip install carbspec

Example Usage

from carbspec.io import load_spectrum  # for reading files
from carbspec import spectro  # for doing the work

spec = load_spectrum('./SI/data/pH/CRM1_DICKSON_D10_CRM_100211_03_12_2019.dat')  # this data file is in the 'SI' folder of the reposiitory.
# NB Yo don't have to use 'load_spectrum' - the following function just requires two arrays containing wavelength and absorption.

spectro.pH_from_spectrum(s['wavelength'], s['Abs'])

> 3.570124144350996+/-0.006193756635537494

Further examples of pH and TA calculation on batches of files may be found in the Figures Supplement to the manusript.

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

carbspec-0.0.3.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

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

carbspec-0.0.3-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

Details for the file carbspec-0.0.3.tar.gz.

File metadata

  • Download URL: carbspec-0.0.3.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for carbspec-0.0.3.tar.gz
Algorithm Hash digest
SHA256 599d9d2090d29db6f4955c0b2930340f25671a2a0e3a688dfc7c71418368330d
MD5 5abd6f55822873e4b8fcceec4b65486e
BLAKE2b-256 4cce181f78337fdf2020ecb7eba96adcd682b4df95d7784013cc348ca9fb087a

See more details on using hashes here.

File details

Details for the file carbspec-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: carbspec-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for carbspec-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48efd8b27c2d089fb66f13e4d707bc0cccab23fa64763d7f4c5127f9722c8511
MD5 ef83a8d20003c112b084b08bb6187496
BLAKE2b-256 bf5d88d1dba7ac6436d3c2b5f63394c4e9bfbb5fe7b017737634ff896e4ebd3c

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