Closed avedillopy closed 11 months ago
Hello @avedillopy
Thank you for opening the issue and sharing your code! This is beautifully executed and can be added to python-seabreeze as is.
Would you want me to walk you through on how to prepare a PR, or would you prefer I add this myself?
Thanks again for your contribution, Andreas 😃
There should be a new release out soon with your code added to support SR2 spectrometers!
Thanks again! Andreas 😃
spectrometer and system information
current problem
Hi! I have opened this issue as I am unfamiliar with creating a pull request and wish to share the modifications I made to pyseabreeze for basic support of the SR2 spectrometer. To achieve this, I adapted the SR4 classes due to their similarity with the spectrometer.
From the file /seabreze/pyseabreeze/devices.py I added the next piece of code:
From the file /seabreze/pyseabreeze/features/spectrometer.py I added the next piece of code:
And to the 10-oceanoptics.rule I added:
ATTR{idVendor}=="0999", ATTR{idProduct}=="1001", SYMLINK+="sr2-%n", MODE:="0666"
To verify the proper functioning of both spectrometers, I compare the data acquired with the seabreeze library on a Raspberry Pi and the data acquired with OceanView on a Windows 11 PC.
The following comparison is conducted with the Electric Dark option activated in OceanView.
The following image is achieved by subtracting the mean of the first 24 pixels for the SR2 spectra and the first 17 pixels for the SR4 spectra manually, simulating the Electric Dark option.
As far as I have been able to test, the data obtained with the SR2 and SR4 spectrometers are practically the same as those obtained with OceanView.