Python interface module for Ocean Optics spectrometers. This software is not associated with Ocean Optics. Use it at your own risk.
Project description
Python module for Ocean Optics spectrometers
Python-seabreeze is the easy way to access your Ocean Optics spectrometers from python. It wraps the SeaBreeze library provided by Ocean Optics to communicate with the spectrometer. It also provides a pyUSB based reimplementation of SeaBreeze for easy extension. This software is not associated with Ocean Optics. Use it at your own risk.
DOCUMENTATION ON RTD
You'll find the documentation and more detailed information here https://python-seabreeze.readthedocs.io/en/latest/
Changes
The changelog can be found here CHANGELOG.md
Install
# via pypi
pip install seabreeze
seabreeze_os_setup
or
# via conda
conda install -c conda-forge seabreeze
seabreeze_os_setup
Using the backend pyseabreeze in Windows
The backend pyseabreeze requires the libraries pyusb and libusb
# via pypi
pip install seabreeze[pyseabreeze] # this ensures installation of pyusb
Additionally, you might need to manually install libusb1. Go here https://libusb.info/, Downloads -> Latest Windows Binaries. In the zip file, enter either the folder MinGW64/dll or MinGW32/dll (depending on your OS). Copy the file libusb-1.0.dll
into C:\Windows\System32
.
Usage
The following example shows how simple it is to acquire a spectrum with python-seabreeze through the model independent Spectrometer class. For a more detailed description read the documentation:
>>> from seabreeze.spectrometers import Spectrometer
>>> spec = Spectrometer.from_first_available()
>>> spec.integration_time_micros(20000)
>>> spec.wavelengths()
array([ 340.32581 , 340.70321186, 341.08058305, ..., 1024.84940994,
1025.1300678 , 1025.4106617 ])
>>> spec.intensities()
array([ 1.58187931e+01, 2.66704852e+04, 6.80208103e+02, ...,
6.53090172e+02, 6.35011552e+02, 6.71168793e+02])
To use the pyseabreeze backend (requires pyusb
) simply run this before importing seabreeze.spectrometers
.
>>> import seabreeze
>>> seabreeze.use('pyseabreeze')
>>> import seabreeze.spectrometers as sb
Supported Devices
Spectrometer | cseabreeze | pyseabreeze (usb) | pyseabreeze (ethernet) |
---|---|---|---|
HR2000 | x | x | |
HR2000PLUS | x | x | |
HR4000 | x | x | |
JAZ | x | x | |
MAYA2000 | x | x | |
MAYA2000PRO | x | x | |
MAYALSL | x | x | |
NIRQUEST256 | x | x | |
NIRQUEST512 | x | x | |
QE65000 | x | x | |
QE-PRO | x | x | |
STS | x | x | |
TORUS | x | x | |
USB2000 | x | x | |
USB2000PLUS | x | x | |
USB4000 | x | x | |
USB650 | Issue #47 | ||
SPARK | x | x | |
ADC1000 | x | ||
HDX | Issue #133 | x | |
HR2 | x | ||
HR4 | x | ||
HR6 | x | ||
SR2 | x | ||
SR4 | x | ||
SR6 | x | ||
ST-VIS | x |
Reading spectra via ethernet
This functionality is currently implemented for the HDX with the pyseabreeze backend. The following example shows how to read a spectrum via ethernet:
>>> import seabreeze
... from seabreeze.spectrometers import Spectrometer
...
... seabreeze.use("pyseabreeze", network_adapter="192.168.254.200")
>>>
>>> spec = Spectrometer.from_serial_number("HDX12345")
>>> spec.intensities()
array([1967.07287765, 1325.69702018, 1418.40732539, ..., 1398.4680335 ,
1406.44364585, 1397.47109175])
Known Issues
- USB2000 spectrometers cause
Data transfer error
due to old firmware Issue #48 - USB650 not supported Issue #47
- No conda packages for armv6 (RPI version 1) Issue #46
Contributing Guidelines
If you run into any problems, file an issue and be sure to include the following in your report:
- Operating system (Linux distribution, Windows version, OSX version) and archictecture (32bit, 64bit, arm)
- Python version and arch (i.e. Python 2.7.10 64bit)
- python-seabreeze version
If you want a feature implemented, please file an issue, or create a pull request when you implement it yourself. And if you would like to support me via paypal, click on the paypal donate button on top of this README.
License
Files in this repository are released under the MIT license.
Related Repositories
If you want me to add your project here, let me know. Happy to add it.
- python-seatease by @jonathanvanschenck - a software emulator of python-seabreeze. Emulates seabreeze's behavior so for testing my code without access to a spectrometer.
- python-seabreeze-server by @jonathanvanschenck - a TCP-based server to host the seabreeze.cseabreeze backend, allowing multiple clients (potentially offsite) to interact with a single spectrometer.
- SeaBreeze - Ocean Optics' SeaBreeze C library.
- libseabreeze - github clone of the C library. internal use only (has pre-built libraries if you know what you're doing)
- python-seabreeze-feedstock - anaconda feedstock for automated package deployment. internal use only
- yaqd-seabreaeze - A seabreeze interface for the yaq instrument control framework
- HTTP bindings - customizable HTTP interface in python along with Web of Things compatibility and ZMQ transport. Based on hololinked
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for seabreeze-2.10.0-cp313-cp313-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f4c43dd8f0399260a8aa1a38cf649f822a9e9f9fe2bc94801e2acc91347fe98 |
|
MD5 | f5b51293db4cd788472f0e38da97672d |
|
BLAKE2b-256 | 132925f04bcd91a652e7e69f5731d8bf395f7f58f12323e4cdd86d501f5ff956 |
Hashes for seabreeze-2.10.0-cp313-cp313-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4dd02c4fe46f8b43e23bf67fd1e18a913994addbc8ab931ef7a259c7ef0a035 |
|
MD5 | bfcf3b48de9608566cac7c93bd87d0a7 |
|
BLAKE2b-256 | 839c7b68e2d34d190e6cf5c86000e2894eca9dcc391c431c96ff9c75b4833136 |
Hashes for seabreeze-2.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bbee8b930fcb8b4ce64114e62d544cc76e06772fdfb1fb4fecf6b082a720e14 |
|
MD5 | 0b488608499155b8aea6a09494a206d6 |
|
BLAKE2b-256 | 59fd2ea582677fc8ed79cff39f4934173be194d69d1b7cb955d439a53f788afc |
Hashes for seabreeze-2.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aba09f7187d0677a6a592f160868cb696b06438ef3885b67dbc255fff791a315 |
|
MD5 | 12fd046e4d93c61ccd6bf9aa4afd056a |
|
BLAKE2b-256 | a94044ec07ae8a7406a69446b05ddc30517b8e8c479f42a059cc9a58ea8ed29c |
Hashes for seabreeze-2.10.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1455b3d1e6b4b263e232c7bef464873585fcb3674eecf4d532e67be38d2edf54 |
|
MD5 | 9bd52642456c18817353e76bf32067f0 |
|
BLAKE2b-256 | 680d457f2562b44c5e647f0703dd05853f420fa3efcdd1ebbc53901e00b7ecf1 |
Hashes for seabreeze-2.10.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b9af474e3fc2f29788d31524a5586b39242f91fdeedd0b76d5bf7c9f1cc11b |
|
MD5 | 9d61c925909fddd8b87e5fe82c5523ac |
|
BLAKE2b-256 | 0eb7c96c4d2ebf3d362709f9ad952212b88ac07333df0125eb74f266f60b3296 |
Hashes for seabreeze-2.10.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16b6ac8d68a8c17998bb07b6462a9b85c3733020e568cc9da57a9e5c11ae9337 |
|
MD5 | e4472a2fb00ddf0d09609854ecc1d072 |
|
BLAKE2b-256 | 6b9343022bae884fe2b8c5deda88e76b2d730fa20b57bd19c3d78396a9adaf7e |
Hashes for seabreeze-2.10.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c39f658d663cfdd544c04555e31237879658fd7d49f312aa23f50c54195eba3c |
|
MD5 | ff1f27296553dd6e9ee57f6efe88b717 |
|
BLAKE2b-256 | 6cf3717974602e671f0b94bba11bedc91422748d295c2273899ae153abb2a552 |
Hashes for seabreeze-2.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b95eccd08753af2fc0fe8c883fbbedc40faf2e6cc55d3604dfda5578506e5c0b |
|
MD5 | a027f5050268db146b23161875d068ec |
|
BLAKE2b-256 | 0a7dfa88d0ebbcfb412211a2aa81f2166ddf4e37386f5da71dc8addc0a11106c |
Hashes for seabreeze-2.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bed3e3c162fcf5a26ea26b3e296e2e35044f58dc734bc45111143438232edad7 |
|
MD5 | 1aca59291b2e39a1db60022b6325161b |
|
BLAKE2b-256 | 7e823d0f872cb572e9fe13e588312e23dde7f30b3e3b0aa068023a18b72617d2 |
Hashes for seabreeze-2.10.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f54a7dd321261bb6b091e28fc1a9ceb312c4fe59cd5d2b95e4f93a21951cfa |
|
MD5 | a28fee9758850fbc9fa2b261b6334ce8 |
|
BLAKE2b-256 | 65eb23bd37250501acc5664066910e7c85b86ec9a8f2ce3fdfa60ccc6b65e01f |
Hashes for seabreeze-2.10.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31038d9a6269094c2b2f1e932c7c443e017370373f0afab60c23358490fb0026 |
|
MD5 | 5631e9e9853dc0096111311e9b9bc180 |
|
BLAKE2b-256 | 1c4af6d1a077c448a1f7f81f5124fbce052b2b79c9336c7f35f82187b80e233b |
Hashes for seabreeze-2.10.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a77941e951d3f8440b9a81de2c0dbdcd376bcd5d775d827bd8e173a30586fdda |
|
MD5 | c153bb8563aef7be5bdf77e754c53207 |
|
BLAKE2b-256 | d8b2645987bf415eba454e5c68079f36ddfed840b93f3b172f682819634f2046 |
Hashes for seabreeze-2.10.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1452c136ad0cb743939cb9e13cde665b9bfe381c30d9959b6d50e23fd5dcb86 |
|
MD5 | b118acc3468f8f1cdf6ef5a364fa6688 |
|
BLAKE2b-256 | e2227eaf691349233f67b635f592fafdc7f45a3b87323974f6c83c6dee06f077 |
Hashes for seabreeze-2.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8b5a0b27e883a48d1c0e7d96445950a4d4a59bb950a4b4027b572f03fa547e8 |
|
MD5 | b396cd9ce030aec2a5e07a596943438a |
|
BLAKE2b-256 | 9057c9e0998c5a5bb6c5ddce925c206868a4d0172b812c263db4e821d1e4dd66 |
Hashes for seabreeze-2.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 043ad215f6ef3c202d75995b607b06a43585d663c43af4ccf238a56a29148c27 |
|
MD5 | 51dee4da05297eb78b5ea264cde81164 |
|
BLAKE2b-256 | 38f575ea696643cc589fe05afab038d0963335b1f5ec53f24e71dd2f9032db55 |
Hashes for seabreeze-2.10.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b1ba395595e391bf6af33669fe348a8253c0daefbe86186415db575a9e862ae |
|
MD5 | d1ccda3cb239ff28e27cbed9b3d42bed |
|
BLAKE2b-256 | 7e82cc1ed54062576465a260aed54c838f38860658b807dc99ae01c04df4e536 |
Hashes for seabreeze-2.10.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77b4aabe1f6c0304e29dc1c58aa4aabccfa2321d6405d46d7bd401ea4a5afd1e |
|
MD5 | 530829d42d015b3152eae4046573c3f1 |
|
BLAKE2b-256 | e7601391e627533c7d260d3c20fa9ff491894956c7bb838e667b6b5a892036d2 |
Hashes for seabreeze-2.10.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 781dd1b2013587554cd20894a3ca3ce5678887d7d35796a1264b213d3022f847 |
|
MD5 | 5eb45624cc66f0063c9a808aaa1e7774 |
|
BLAKE2b-256 | 9d5a826eb54c41c4099d619a55a4c90de3ed1347ce9ae21646c1d447b69782db |
Hashes for seabreeze-2.10.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dbdfe7a136b94812ef2023a521b75cba058da92a0e64e85912760beb69c3d83 |
|
MD5 | f02e4cdb6a6f2d4a25e231fb364b8a1d |
|
BLAKE2b-256 | 79cd29946648308afcb2fb52812c7df8f713c4ece3461c1d035457976f19f4e4 |
Hashes for seabreeze-2.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6838a5047097cf615113bfba37070a0b12d96be9532445f5a52957288c9d519 |
|
MD5 | bc5816653e07808aae32fcd1db2f004c |
|
BLAKE2b-256 | 82d9fca91dc3176251d2a071f40b44dfc4f3369ce31fffdca51b92fae845746d |
Hashes for seabreeze-2.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebdc4e24bce2676e4de5c4fa8a86d05dd170d37d28f9aee3513dc1c0edc161a3 |
|
MD5 | e440acac604643e89ed45dc01b287c2e |
|
BLAKE2b-256 | 475c186d025e31a1a2c9464519726d25c08fb7c7cd1e31e1fdea384d2093105e |
Hashes for seabreeze-2.10.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1da3d30b0da441443aeb62df6cadec66e557aff88f3ebde7a10bf99a5b13c0ce |
|
MD5 | 7b5751b210c2b8e630d9fbd667215f91 |
|
BLAKE2b-256 | 8bf8f01ea422000ce53b5f298c2cfcb608013b8d615f432fe5b7fd652c3e647e |
Hashes for seabreeze-2.10.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1fa47b576c61b73db7aa5d9f63a32d02d64d9a4419189790c5278dd1819b1e |
|
MD5 | 36432856b153ccfcd6d4d3e570455615 |
|
BLAKE2b-256 | eb7f69a1575226f2da608cc97e3a074db14ea65c9754938643439cd098345179 |
Hashes for seabreeze-2.10.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8217383893767bc5bf0aa966982ce94696e4c0129bfcc19e987d56d692ebe9b2 |
|
MD5 | d5ea186b77ce5d13962394bbae2b5bf5 |
|
BLAKE2b-256 | e1e634702e9944805c7c5efeea82947067b6f7dcd737a2ac3fb9c17d326be152 |
Hashes for seabreeze-2.10.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba6c3f12f02f117ab41c083b0b71fed79125150eadbcf0e6e4309b7a99d1dfa6 |
|
MD5 | 389e5ed7b32cef5093a38bc8129d37d4 |
|
BLAKE2b-256 | 1479b9a1c5dc49c04d84d4758cbca4e1ad6b860cf293866423144b68bd875dce |
Hashes for seabreeze-2.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d5653819fce097af04441040d7b30c15dc147232a45ad82aab15e66b6511e29 |
|
MD5 | 03405ca96c3e7a0ab5392f806fd708a6 |
|
BLAKE2b-256 | f49333e15757305d92e4dcdc3a3d45e3a65f26f713ce989718d3fd2507aa27da |
Hashes for seabreeze-2.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c5203a004c1c3e45b19b10a926090c7ad1d26876e781222402713f84cdcedf |
|
MD5 | 29516427e2dd5e9beb00b4abe5bbed84 |
|
BLAKE2b-256 | cd57dc2f46f45b20c388d4fd5508541d80e0304e4a432f92ecb9385fa06d172b |
Hashes for seabreeze-2.10.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d3ae447def35d211f19c7a59d22ff272420015bb74f3c4b24b27bc2dfe6f336 |
|
MD5 | ca9d56569ff2e628794cd87a78dea1cb |
|
BLAKE2b-256 | 9cb69e2fa6efc9b2784e8ad67c68943cd780cf51d8bfbd01ad7a2d7e1c7943e3 |
Hashes for seabreeze-2.10.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dea1e903d57f97d0459058e2f0a26ecf14e8085c04b1e3cde598c337f2e3f3b |
|
MD5 | 5553953efc08081a6a4b824768873a42 |
|
BLAKE2b-256 | ede40c376f0d71cfbb583bfad9deb91bef56750586d6c060e5d53ce7dfdfafab |