1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
|
%global _empty_manifest_terminate_build 0
Name: python-seabreeze
Version: 2.3.0
Release: 1
Summary: Python interface module for Ocean Optics spectrometers. This software is not associated with Ocean Optics. Use it at your own risk.
License: MIT
URL: https://github.com/ap--/python-seabreeze
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/63/d6/269cfca1c54663e8aa181331147c77fc3df5f8fbb26d1ae129b27d25fb25/seabreeze-2.3.0.tar.gz
Requires: python3-numpy
Requires: python3-typing-extensions
Requires: python3-pyusb
Requires: python3-pytest
Requires: python3-pytest
%description
# Python module for [Ocean Optics](http://www.oceanoptics.com/) spectrometers
[](https://anaconda.org/conda-forge/seabreeze)
[](https://pypi.org/project/seabreeze/)
[](https://github.com/ap--/python-seabreeze/actions/workflows/run_test_build_deploy.yaml)
[](https://github.com/ap--/python-seabreeze/releases)
[](https://pypi.org/project/seabreeze/)
[](http://opensource.org/licenses/MIT)
[](https://github.com/ap--/python-seabreeze/issues)
[](https://github.com/sponsors/ap--)
Python-seabreeze is the easy way to access your Ocean Optics spectrometers from
python. It wraps the [SeaBreeze](http://oceanoptics.com/product/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/](https://python-seabreeze.readthedocs.io/en/latest/)
## Changes
The changelog can be found here [CHANGELOG.md](https://github.com/ap--/python-seabreeze/blob/master/CHANGELOG.md)
## Install
```bash
# via pypi
pip install seabreeze
seabreeze_os_setup
```
or
```bash
# via conda
conda install -c conda-forge seabreeze
seabreeze_os_setup
```
## 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](https://python-seabreeze.readthedocs.io/en/latest/):
```python
>>> 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`.
```python
>>> import seabreeze
>>> seabreeze.use('pyseabreeze')
>>> import seabreeze.spectrometers as sb
```
## Supported Devices
| Spectrometer | cseabreeze | pyseabreeze |
|:-------------|:----------:|:------------------------:|
| 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 | | ap--/python-seabreeze#47 |
| SPARK | x | x |
| ADC1000 | | x |
| SR4 | | x |
| ST-VIS | | x |
## Known Issues
- USB2000 spectrometers cause `Data transfer error` due to old firmware [Issue #48](https://github.com/ap--/python-seabreeze/issues/48)
- USB650 not supported [Issue #47](https://github.com/ap--/python-seabreeze/issues/47)
- No conda packages for armv6 (RPI version 1) [Issue #46](https://github.com/ap--/python-seabreeze/issues/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](LICENSE.md).
## Related Repositories
If you want me to add your project here, let me know. Happy to add it.
- [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.
- [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.
- [SeaBreeze](https://sourceforge.net/projects/seabreeze/) - Ocean Optics' SeaBreeze C library.
- [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)
- [python-seabreeze-feedstock](https://github.com/ap--/python-seabreeze) - anaconda feedstock for automated package deployment. _internal use only_
- [yaqd-seabreaeze](https://gitlab.com/yaq/yaqd-seabreeze) - A seabreeze interface for the [yaq instrument control framework](https://yaq.fyi)
%package -n python3-seabreeze
Summary: Python interface module for Ocean Optics spectrometers. This software is not associated with Ocean Optics. Use it at your own risk.
Provides: python-seabreeze
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-cffi
BuildRequires: gcc
BuildRequires: gdb
%description -n python3-seabreeze
# Python module for [Ocean Optics](http://www.oceanoptics.com/) spectrometers
[](https://anaconda.org/conda-forge/seabreeze)
[](https://pypi.org/project/seabreeze/)
[](https://github.com/ap--/python-seabreeze/actions/workflows/run_test_build_deploy.yaml)
[](https://github.com/ap--/python-seabreeze/releases)
[](https://pypi.org/project/seabreeze/)
[](http://opensource.org/licenses/MIT)
[](https://github.com/ap--/python-seabreeze/issues)
[](https://github.com/sponsors/ap--)
Python-seabreeze is the easy way to access your Ocean Optics spectrometers from
python. It wraps the [SeaBreeze](http://oceanoptics.com/product/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/](https://python-seabreeze.readthedocs.io/en/latest/)
## Changes
The changelog can be found here [CHANGELOG.md](https://github.com/ap--/python-seabreeze/blob/master/CHANGELOG.md)
## Install
```bash
# via pypi
pip install seabreeze
seabreeze_os_setup
```
or
```bash
# via conda
conda install -c conda-forge seabreeze
seabreeze_os_setup
```
## 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](https://python-seabreeze.readthedocs.io/en/latest/):
```python
>>> 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`.
```python
>>> import seabreeze
>>> seabreeze.use('pyseabreeze')
>>> import seabreeze.spectrometers as sb
```
## Supported Devices
| Spectrometer | cseabreeze | pyseabreeze |
|:-------------|:----------:|:------------------------:|
| 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 | | ap--/python-seabreeze#47 |
| SPARK | x | x |
| ADC1000 | | x |
| SR4 | | x |
| ST-VIS | | x |
## Known Issues
- USB2000 spectrometers cause `Data transfer error` due to old firmware [Issue #48](https://github.com/ap--/python-seabreeze/issues/48)
- USB650 not supported [Issue #47](https://github.com/ap--/python-seabreeze/issues/47)
- No conda packages for armv6 (RPI version 1) [Issue #46](https://github.com/ap--/python-seabreeze/issues/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](LICENSE.md).
## Related Repositories
If you want me to add your project here, let me know. Happy to add it.
- [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.
- [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.
- [SeaBreeze](https://sourceforge.net/projects/seabreeze/) - Ocean Optics' SeaBreeze C library.
- [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)
- [python-seabreeze-feedstock](https://github.com/ap--/python-seabreeze) - anaconda feedstock for automated package deployment. _internal use only_
- [yaqd-seabreaeze](https://gitlab.com/yaq/yaqd-seabreeze) - A seabreeze interface for the [yaq instrument control framework](https://yaq.fyi)
%package help
Summary: Development documents and examples for seabreeze
Provides: python3-seabreeze-doc
%description help
# Python module for [Ocean Optics](http://www.oceanoptics.com/) spectrometers
[](https://anaconda.org/conda-forge/seabreeze)
[](https://pypi.org/project/seabreeze/)
[](https://github.com/ap--/python-seabreeze/actions/workflows/run_test_build_deploy.yaml)
[](https://github.com/ap--/python-seabreeze/releases)
[](https://pypi.org/project/seabreeze/)
[](http://opensource.org/licenses/MIT)
[](https://github.com/ap--/python-seabreeze/issues)
[](https://github.com/sponsors/ap--)
Python-seabreeze is the easy way to access your Ocean Optics spectrometers from
python. It wraps the [SeaBreeze](http://oceanoptics.com/product/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/](https://python-seabreeze.readthedocs.io/en/latest/)
## Changes
The changelog can be found here [CHANGELOG.md](https://github.com/ap--/python-seabreeze/blob/master/CHANGELOG.md)
## Install
```bash
# via pypi
pip install seabreeze
seabreeze_os_setup
```
or
```bash
# via conda
conda install -c conda-forge seabreeze
seabreeze_os_setup
```
## 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](https://python-seabreeze.readthedocs.io/en/latest/):
```python
>>> 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`.
```python
>>> import seabreeze
>>> seabreeze.use('pyseabreeze')
>>> import seabreeze.spectrometers as sb
```
## Supported Devices
| Spectrometer | cseabreeze | pyseabreeze |
|:-------------|:----------:|:------------------------:|
| 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 | | ap--/python-seabreeze#47 |
| SPARK | x | x |
| ADC1000 | | x |
| SR4 | | x |
| ST-VIS | | x |
## Known Issues
- USB2000 spectrometers cause `Data transfer error` due to old firmware [Issue #48](https://github.com/ap--/python-seabreeze/issues/48)
- USB650 not supported [Issue #47](https://github.com/ap--/python-seabreeze/issues/47)
- No conda packages for armv6 (RPI version 1) [Issue #46](https://github.com/ap--/python-seabreeze/issues/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](LICENSE.md).
## Related Repositories
If you want me to add your project here, let me know. Happy to add it.
- [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.
- [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.
- [SeaBreeze](https://sourceforge.net/projects/seabreeze/) - Ocean Optics' SeaBreeze C library.
- [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)
- [python-seabreeze-feedstock](https://github.com/ap--/python-seabreeze) - anaconda feedstock for automated package deployment. _internal use only_
- [yaqd-seabreaeze](https://gitlab.com/yaq/yaqd-seabreeze) - A seabreeze interface for the [yaq instrument control framework](https://yaq.fyi)
%prep
%autosetup -n seabreeze-2.3.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-seabreeze -f filelist.lst
%dir %{python3_sitearch}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 2.3.0-1
- Package Spec generated
|