Skip to main content

Read chromatography and mass spectrometry binary files

Project description

rainbow

PyPI Documentation Status PyPI - Downloads

rainbow provides programmatic access to the raw data encoded in chromatography and mass spectrometry binary files. This library supports the following vendors and detectors:

Agilent .D

  • .uv - UV spectrum (supports incomplete files)
  • .ch - UV, FID, CAD, and ELSD channels
  • .ms - MS (supports incomplete files)
  • MSProfile.bin - HRMS

Waters .raw

  • CHRO - CAD and ELSD, as well as miscellaneous analog data
  • FUNC - UV and MS

There is documentation for rainbow that also details the structure of each binary file format.

Installation

pip install rainbow-api

Usage

The easiest way to get started is to give rainbow a directory path. Assume that we have a directory mydata.D that contains a binary file DAD1.uv with UV data.

import rainbow as rb
datadir = rb.read("mydata.D")
datafile = datadir.get_file("DAD1A.uv")

Here, the datadir DataDirectory object contains a DataFile object for DAD1A.uv. The raw UV data is contained in numpy arrays that are attributes of datafile. Users may find the following particularly useful:

  • datafile.xlabels - 1D numpy array with retention times
  • datafile.ylabels - 1D numpy array with wavelengths
  • datafile.data - 2D numpy array with absorbances

There is a tutorial available. There are also example snippets for basic tasks. Or just check out the full API.

Contents

  • rainbow/ contains the code of the Python library.
  • docs/ contains code for generating documentation. To build documentation locally, you will need to install the sphinx and sphinx-rtd-theme packages. Then, move to the docs/ directory and run make html. The docpages will be generated under docs/_build.
  • tests/ contains unit tests for the library. These can be run with python -m unittest.

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

rainbow_api-1.0.12.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

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

rainbow_api-1.0.12-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file rainbow_api-1.0.12.tar.gz.

File metadata

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

File hashes

Hashes for rainbow_api-1.0.12.tar.gz
Algorithm Hash digest
SHA256 9695e8c3397a917b36a00bb1f1501e4f3c9727c41ca9896b0c7d97aade7173d5
MD5 f801588ef83cf4ce74d64d405ac27fa0
BLAKE2b-256 533c78f23d650c575659565bd2e9213e8b4526f50fe22b61a34b3fe46eb55a29

See more details on using hashes here.

Provenance

The following attestation bundles were made for rainbow_api-1.0.12.tar.gz:

Publisher: publish.yml on evanyeyeye/rainbow

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

File details

Details for the file rainbow_api-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: rainbow_api-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rainbow_api-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3cd4d32ca841edc2a20e1f18d122f0f6627ad1400b0509587d8a4628cd14a2
MD5 2640af1a3c08e121c04f2286581eabd0
BLAKE2b-256 89bf8f9ec45be6801eb14db3cceffbb4ae0531c0264977013ae170b85d85d58a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rainbow_api-1.0.12-py3-none-any.whl:

Publisher: publish.yml on evanyeyeye/rainbow

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