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.4.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

rainbow_api-1.0.4-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file rainbow-api-1.0.4.tar.gz.

File metadata

  • Download URL: rainbow-api-1.0.4.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for rainbow-api-1.0.4.tar.gz
Algorithm Hash digest
SHA256 497989dd0150b4090c43a6fdfdd229b3366f2d96363640979b7352a50b3cef21
MD5 193fcac9202572b8024267d5355612df
BLAKE2b-256 917b03cf8a47945bed972e2e56be0f3977d8d37b998dc414588910c3c5ede35d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rainbow_api-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for rainbow_api-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0d32b215e56d9c45616ef199f406e61e744579b79cefaf2616865ed0a5528bea
MD5 d235f12bcf8fcd5d4796ef771d1e88af
BLAKE2b-256 b88d8aa072111d2f7bb7ca8ec7923e3bce7913ae3b77f3b562927a661559f214

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page