{"id":24433086,"url":"https://github.com/ap--/python-seabreeze","last_synced_at":"2025-04-08T06:31:12.394Z","repository":{"id":22002147,"uuid":"25327268","full_name":"ap--/python-seabreeze","owner":"ap--","description":"Python module for OceanOptics spectrometers","archived":false,"fork":false,"pushed_at":"2024-10-29T12:16:31.000Z","size":9069,"stargazers_count":211,"open_issues_count":41,"forks_count":82,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-10-29T12:44:40.879Z","etag":null,"topics":["hacktoberfest","python-seabreeze","spectrometers","spectroscopy"],"latest_commit_sha":null,"homepage":"https://python-seabreeze.readthedocs.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ap--.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ap--","custom":["https://www.buymeacoffee.com/poehlmann"]}},"created_at":"2014-10-16T23:30:21.000Z","updated_at":"2024-10-29T12:16:00.000Z","dependencies_parsed_at":"2023-02-16T11:31:20.914Z","dependency_job_id":"2ccfdca0-3598-4646-a643-143547fcea2e","html_url":"https://github.com/ap--/python-seabreeze","commit_stats":{"total_commits":652,"total_committers":17,"mean_commits":38.35294117647059,"dds":"0.20092024539877296","last_synced_commit":"7931c8192d45985e9df962877eb8c62b1937a39c"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap--%2Fpython-seabreeze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap--%2Fpython-seabreeze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap--%2Fpython-seabreeze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap--%2Fpython-seabreeze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ap--","download_url":"https://codeload.github.com/ap--/python-seabreeze/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247791306,"owners_count":20996717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","python-seabreeze","spectrometers","spectroscopy"],"created_at":"2025-01-20T16:02:48.044Z","updated_at":"2025-04-08T06:31:12.365Z","avatar_url":"https://github.com/ap--.png","language":"C++","funding_links":["https://github.com/sponsors/ap--","https://www.buymeacoffee.com/poehlmann"],"categories":[],"sub_categories":[],"readme":"# Python module for [Ocean Optics](http://www.oceanoptics.com/) spectrometers\n\n[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/seabreeze?label=conda)](https://anaconda.org/conda-forge/seabreeze)\n[![PyPI](https://img.shields.io/pypi/v/seabreeze)](https://pypi.org/project/seabreeze/)\n[![test build deploy](https://github.com/ap--/python-seabreeze/actions/workflows/run_test_build_deploy.yaml/badge.svg)](https://github.com/ap--/python-seabreeze/actions/workflows/run_test_build_deploy.yaml)\n[![Github All Releases](https://img.shields.io/github/downloads/ap--/python-seabreeze/total.svg?label=github)](https://github.com/ap--/python-seabreeze/releases)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/seabreeze?label=pypi)](https://pypi.org/project/seabreeze/)\n[![MIT license](http://img.shields.io/badge/license-MIT-yellowgreen.svg)](http://opensource.org/licenses/MIT)\n[![GitHub issues](https://img.shields.io/github/issues/ap--/python-seabreeze.svg)](https://github.com/ap--/python-seabreeze/issues)\n[![DOI](https://zenodo.org/badge/25327268.svg)](https://zenodo.org/badge/latestdoi/25327268)\n[![Github Sponsors](https://img.shields.io/badge/github-sponsors-blue)](https://github.com/sponsors/ap--)\n\nPython-seabreeze is the easy way to access your Ocean Optics spectrometers from\npython. It wraps the [SeaBreeze](http://oceanoptics.com/product/seabreeze/)\nlibrary provided by Ocean Optics to communicate with the spectrometer. It also\nprovides a pyUSB based reimplementation of SeaBreeze for easy extension.\n**This software is not associated with Ocean Optics. Use it at your own risk.**\n\n## DOCUMENTATION ON RTD\n\nYou'll find the documentation and more detailed information here\n[https://python-seabreeze.readthedocs.io/en/latest/](https://python-seabreeze.readthedocs.io/en/latest/)\n\n## Changes\n\nThe changelog can be found here [CHANGELOG.md](https://github.com/ap--/python-seabreeze/blob/master/CHANGELOG.md)\n\n## Install\n\n```bash\n# via pypi\npip install seabreeze\nseabreeze_os_setup\n```\n\nor\n\n```bash\n# via conda\nconda install -c conda-forge seabreeze\nseabreeze_os_setup\n```\n\n### Using the backend pyseabreeze in Windows\n\nThe backend pyseabreeze requires the libraries pyusb and libusb\n```bash\n# via pypi\npip install seabreeze[pyseabreeze]  # this ensures installation of pyusb\n```\nAdditionally, you might need to manually install libusb1. Go here https://libusb.info/, Downloads -\u003e 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`.\n\n\n## Usage\n\nThe following example shows how simple it is to acquire a spectrum with\npython-seabreeze through the model independent _Spectrometer_ class. For a more\ndetailed description read the [documentation](https://python-seabreeze.readthedocs.io/en/latest/):\n\n```python\n\u003e\u003e\u003e from seabreeze.spectrometers import Spectrometer\n\u003e\u003e\u003e spec = Spectrometer.from_first_available()\n\u003e\u003e\u003e spec.integration_time_micros(20000)\n\u003e\u003e\u003e spec.wavelengths()\narray([  340.32581   ,   340.70321186,   341.08058305, ...,  1024.84940994,\n        1025.1300678 ,  1025.4106617 ])\n\u003e\u003e\u003e spec.intensities()\narray([  1.58187931e+01,   2.66704852e+04,   6.80208103e+02, ...,\n         6.53090172e+02,   6.35011552e+02,   6.71168793e+02])\n```\n\nTo use the pyseabreeze backend (requires `pyusb`) simply run this before importing `seabreeze.spectrometers`.\n\n```python\n\u003e\u003e\u003e import seabreeze\n\u003e\u003e\u003e seabreeze.use('pyseabreeze')\n\u003e\u003e\u003e import seabreeze.spectrometers as sb\n```\n\n## Supported Devices\n\n| Spectrometer | cseabreeze |   pyseabreeze (usb)    | pyseabreeze (ethernet) |\n|:-------------|:----------:|:----------------------:|:----------------------:|\n| HR2000       |     x      |             x          |                        |\n| HR2000PLUS   |     x      |             x          |                        |\n| HR4000       |     x      |             x          |                        |\n| JAZ          |     x      |             x          |                        |\n| MAYA2000     |     x      |             x          |                        |\n| MAYA2000PRO  |     x      |             x          |                        |\n| MAYALSL      |     x      |             x          |                        |\n| NIRQUEST256  |     x      |             x          |                        |\n| NIRQUEST512  |     x      |             x          |                        |\n| QE65000      |     x      |             x          |                        |\n| QE-PRO       |     x      |             x          |                        |\n| STS          |     x      |             x          |                        |\n| TORUS        |     x      |             x          |                        |\n| USB2000      |     x      |             x          |                        |\n| USB2000PLUS  |     x      |             x          |                        |\n| USB4000      |     x      |             x          |                        |\n| USB650       |            |  [Issue #47][issue47]  |                        |\n| SPARK        |     x      |             x          |                        |\n| ADC1000      |            |             x          |                        |\n| HDX          |            | [Issue #133][issue133] |           x            |\n| HR2          |            |             x          |                        |\n| HR4          |            |             x          |                        |\n| HR6          |            |             x          |                        |\n| SR2          |            |             x          |                        |\n| SR4          |            |             x          |                        |\n| SR6          |            |             x          |                        |\n| ST-VIS       |            |             x          |                        |\n\n[issue47]: https://github.com/ap--/python-seabreeze/issues/47\n[issue133]: https://github.com/ap--/python-seabreeze/issues/133\n\n## Reading spectra via ethernet\n\nThis functionality is currently implemented for the HDX with the pyseabreeze backend.\nThe following example shows how to read a spectrum via ethernet:\n\n```pycon\n\u003e\u003e\u003e import seabreeze\n... from seabreeze.spectrometers import Spectrometer\n...\n... seabreeze.use(\"pyseabreeze\", network_adapter=\"192.168.254.200\")\n\u003e\u003e\u003e\n\u003e\u003e\u003e spec = Spectrometer.from_serial_number(\"HDX12345\")\n\u003e\u003e\u003e spec.intensities()\narray([1967.07287765, 1325.69702018, 1418.40732539, ..., 1398.4680335 ,\n       1406.44364585, 1397.47109175])\n```\n\n## Known Issues\n\n- USB2000 spectrometers cause `Data transfer error` due to old firmware [Issue #48](https://github.com/ap--/python-seabreeze/issues/48)\n- USB650 not supported [Issue #47](https://github.com/ap--/python-seabreeze/issues/47)\n- No conda packages for armv6 (RPI version 1) [Issue #46](https://github.com/ap--/python-seabreeze/issues/46)\n\n## Contributing Guidelines\n\nIf you run into any problems, file an issue and be sure to include the\nfollowing in your report:\n\n- Operating system (Linux distribution, Windows version, OSX version) and\n  archictecture (32bit, 64bit, arm)\n- Python version and arch (i.e. Python 2.7.10 64bit)\n- python-seabreeze version\n\nIf you want a feature implemented, please file an issue, or create a pull\nrequest when you implement it yourself. And if you would like to support me via\npaypal, click on the paypal donate button on top of this README.\n\n\n## License\n\nFiles in this repository are released under the [MIT license](LICENSE.md).\n\n\n## Related Repositories\n\nIf you want me to add your project here, let me know. Happy to add it.\n\n- [python-seatease by @jonathanvanschenck](https://github.com/jonathanvanschenck/python-seatease) - a software emulator of python-seabreeze. Emulates seabreeze's behavior so for testing my code without access to a spectrometer.\n- [python-seabreeze-server by @jonathanvanschenck](https://github.com/jonathanvanschenck/python-seabreeze-server) - a TCP-based server to host the seabreeze.cseabreeze backend, allowing multiple clients (potentially offsite) to interact with a single spectrometer.\n- [SeaBreeze](https://sourceforge.net/projects/seabreeze/) - Ocean Optics' SeaBreeze C library.\n- [libseabreeze](https://github.com/ap--/libseabreeze) - github clone of the C library. _internal use only_ (has pre-built libraries if you know what you're doing)\n- [python-seabreeze-feedstock](https://github.com/ap--/python-seabreeze) - anaconda feedstock for automated package deployment. _internal use only_\n- [yaqd-seabreaeze](https://gitlab.com/yaq/yaqd-seabreeze) - A seabreeze interface for the [yaq instrument control framework](https://yaq.fyi)\n- [HTTP bindings](https://gitlab.com/hololinked-examples/oceanoptics-spectrometer) - customizable HTTP interface in python along with Web of Things compatibility and ZMQ transport. Based on [hololinked](https://github.com/VigneshVSV/hololinked)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fap--%2Fpython-seabreeze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fap--%2Fpython-seabreeze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fap--%2Fpython-seabreeze/lists"}