intensities value from USB4000
buihoangkhang opened this issue ยท 5 comments
spectrometer and system information
- model: USB4000
- operating system: Raspian GNU/Linux 9 (stretch)
Raspberry Pi 3B+ - python version: 3.6.1
- python-seabreeze version: 0.6.0
- installed-via: not sure, maybe pip
current problem
The intensity values did not respond to actual spectrum values as detected in Ocean View.
It just gives some values above 1000 like in your demo.
Link: https://python-seabreeze.readthedocs.io/en/latest/quickstart.html
Which is not correct (I think)
This should be
steps to reproduce
I also encountered this problem with other combination of Raspberry Pi models ( I have RPi 4) and Python version - numpy version.
I also tried on Windows computer - anaconda build.
Could you please recommend the best system you think for me? I cannot change my USB4000 but I can change RPi 3B+ or 4, or change to Windows.
This package means a lot to me, thank you so much.
minimal code example and error (very helpful if available)
import seabreeze
import seabreeze.spectrometers as sb
devices = sb.list_devices()
print(devices)
spec = sb.Spectrometer(devices[0])
spec.integration_time_micros(200)
x = spec.wavelengths()
y = spec.intensities()
print(y)
Hello @buihoangkhang,
I'm not yet sure if there is a problem.
Which seabreeze version are you running?
import seabreeze
print(seabreeze.__version__)
And please provide a plot of your measured spectrum ๐ Or the output of
import numpy as np
import seabreeze.spectrometers as sb
spec = sb.Spectrometer.from_first_available()
spec.integration_time_micros(100000)
y = spec.intensities()
print(np.min(y), np.max(y), np.mean(y))
Cheers,
Andreas
What kind of lightsource are you using with your spectrometer?
For testing, I would suggest running your code again, but this time use a larger integration_time:
spec.integration_time_micros(100000)
Note: the integration_time is in microseconds so, 100000 would still only be 0.1 seconds.
To me it looks as if everything is working and you are just using an intergration that is too small to show your signal.
Let me know how things go,
Cheers,
Andreas ๐
Hi,
it works!
Thank you so much, sorry for my neglectance.
I will further testing it.
Bui Hoang Khang
No worries ๐
I'm happy we could solve your problem together.
I'm closing the issue, let me know if you run into other issues!
Cheers,
Andreas ๐