Skip to main content

Tools for simplifying the handling of spectrums acquired using python-seabreeze

Project description

spectrabuster

Tools for simplifying the processing and storing of spectrums acquired using python-seabreeze. Basically consists of the Spectrum class, which provides an easy way to abtract away much of the overhead associated with dealing with large quantities of irradiance spectrums. It is meant primarily to be scalable and easy to use.

Installation

pip3 install spectrabuster

Usage

Examples

Acquiring a new spectrum with the first spectrometer found by python-seabreeze, with integration time of 10 ms and with wavelengths between 250.0 and 800.0 nm, plot it, then save it to a gnuplot-compatible file:

from spectrabuster import Spectrum
from matplotlib import pyplot as plt
intenS = Spectrum(int_time=10*1000, from_index=250.0, to_index=800.0)

# intenS.spectrum returns a tuple of the wavelengths and intensities
plt.plot(*intenS.spectrum)
plt.show()

intenS.write_to_file("intenS.dat")

Loading spectral irradiance calibration from file, acquiring regular and dark intensities, applying the calibration and checking a specific wavelength:

from spectrabuster import Spectrum
intenD = Spectrum() # measures the spectrum with previously defined integration time
intenS = Spectrum() - intenD

spectral_irrad = intenS.to_spectral_irrad(calibration_file = "R.dat")

print(spectral_irrad[535.0])

Documentation

Coming eventually. For the moment you can simply read the comment paragraphs explaining what each function does.

Acknowledgements

This project was created as part of an undergraduate research project funded by FAPESP (grant n. 2019/06376-9). I'd also like to thank Andreas Poehlmann for maintaining python-seabreeze and distributing it under a FLOSS license.

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

spectrabuster-0.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

spectrabuster-0.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file spectrabuster-0.2.tar.gz.

File metadata

  • Download URL: spectrabuster-0.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for spectrabuster-0.2.tar.gz
Algorithm Hash digest
SHA256 a426c042d11d6552f2da4285fe3f7f4df32f6603854f02dd54672c68d25faa98
MD5 b23588460e3e700dd4baf52137fde3e5
BLAKE2b-256 723667347e53a267c683ea40e24a7a08675d75e2d5ea72efdad08fe9b55b6884

See more details on using hashes here.

File details

Details for the file spectrabuster-0.2-py3-none-any.whl.

File metadata

  • Download URL: spectrabuster-0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for spectrabuster-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b19ff124b9ff1512fe8b800a94c40fbbe95201cc2687956d5c20a54de7d3afa1
MD5 6b80fde8b7f1e4beaf6b85e138addfd6
BLAKE2b-256 fb70ff9b9906d1d638f17df13f31b820b7999b2db07dd7d5179333ccd2de504c

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