-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting temperature of FLAMES Spectrometer #119
Comments
Hi @joellama TEC stands for "thermo electric cooler" and the Flame-S doesn't support that feature. As you already noticed, the code for reading temperatures on a USB2000Plus / Flame-S from #64 requires pyusb. Are you sure you have pyusb installed? What happens if you run the following in your python interpreter: import usb.core
usb.core.find() Cheers, |
Hi @ap-- , Thanks so much for writing back. After a bit of experimenting, I managed to get around the pyusb error by installing seabreeze with conda and not pip. I think my issue now is how to get the temperature using the Any help would again be very much appreciated! |
Hi Andreas, Thanks for writing back and apologies for my slow delay. I tried running the code in #64; however there I cannot get past The result of Any thoughts? |
Hi @joellama I had a look, and you're right, it seems that code won't work anymore. import seabreeze
seabreeze.use('pyseabreeze')
import seabreeze.spectrometers as sb
import struct
# open first spectrometer
spec = sb.Spectrometer.from_serial_number()
# query PCB temperature
# https://oceanoptics.com/wp-content/uploads/FlameIO.pdf, page 79f
spec.f.raw_usb_bus_access.raw_usb_write(struct.pack('<B', 0x6C), endpoint='primary_out')
raw_bytes_response = spec.f.raw_usb_bus_access.raw_usb_read(endpoint='primary_in')
temp = 0.003906 * struct.unpack("<h", raw_bytes_response[1:3])[0] # should be 0x08 LSB MSB
print("PCB temperature", temp) Let me know how things go 😃 Cheers, |
Thank you so much @ap-- , that worked a treat! Thank you for your hard work on this project, it will be very useful for me! |
Hello @ap-- ! I'm using FLAME-NIR Spectrometer. Thanks. |
Hello @VladislavSu, |
spectrometer and system information
current problem
I'm trying to get the temperature of my spectrograph. When I try
from seabreeze.spectrometers import Spectrometer
spec = Spectrometer.from_serial_number()
spec.features
Temperature is listed as []. Running
spec.tec_get_temperature_C()
fails with a NoneType error (as expected).I tried to follow Issue 64 that talks about pyseabreeze; however, I cannot get that to work at all because I just get a no pyusb backend error. I should add that I have installed libusb-1.0.0 and pyUSB.
So I'm at a bit of a loss, any help would be very much appreciated!
The text was updated successfully, but these errors were encountered: