Skip to content
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

USB2000: spec.intensities causes infinite loop (due to old FW) #48

Open
aoabdelatif opened this issue Jun 6, 2017 · 9 comments
Open

Comments

@aoabdelatif
Copy link

Hey ap--

im new to python (experienced C and arduino user here).

anyways, im currently trying to get the intensity values from a USB2000 ocean optics device.

currently, it seems like everything is working. USB 2000 is detected, wavelengths seem correct and printed.

The problem is when i call spec.intensities, my command line goes into an infinite loop.

heres my code...

import seabreeze.spectrometers as sb
devices = sb.list_devices()
print(devices)
spec = sb.Spectrometer(devices[0])
spec.integration_time_micros(10000)
Wavelengths = spec.wavelengths()
print(Wavelengths)
value = spec.intensities()
print(value)

the command line just remains blank after it runs

im running Spyder from anaconda

image of command line

screen shot 2017-06-05 at 11 12 47 pm

@aoabdelatif
Copy link
Author

Update, after I left the program running for a long time, it finally gave me this error

screen shot 2017-06-06 at 10 55 02 am

@aoabdelatif
Copy link
Author

Mac OSX Sierra
Python 3
USB2000 Spectrometer
Spyder Anaconda

@ap--
Copy link
Owner

ap-- commented Jun 6, 2017

Hey aoabdelatif,

can you try the same outside of spyder in a python interpreter and report back?

All the best,
-Andreas

@aoabdelatif
Copy link
Author

Hey Andreas,

Thank you for the speedy response.

So would you recommend using IDLE?

OSX Sierra
Python 3

-Adam

@ap--
Copy link
Owner

ap-- commented Jun 6, 2017

Just open your anaconda python interpreter from the command line (Terminal).
(open your terminal app and type python. Note: it should say something like python 3.6.1 anaconda..., if not, you need to export your Anaconda path)

It's possible that spyder or idle do some extra things, that might interfere.
If the problem is still there in a plain python interpreter, we need to investigate further.

@aoabdelatif
Copy link
Author

Andreas,

Here is a screen shot of what my terminal looked like after i ran the same functions as i did in spyder.

Once used the spec.intensities() function, the same thing happened as before, the terminal line got hung up once again. (Ive been waiting for awhile and its still hung up)

screen shot 2017-06-06 at 11 16 53 pm

MacOSX Sierra 10.12.1
Python 3.6.1
Anaconda 4.4.0
USB2000

I really appreciate your help with all this,

-Adam

ps.
I hope this doesn't turn you off from helping me but i also downloaded the OceanView Free Trial and for some reason OceanView gets hung up when i try to connect to the USB2000, Ocean View does recognize the USB2000.

@ap--
Copy link
Owner

ap-- commented Jun 7, 2017

Hmm, this is very strange.
It should return immediately...

can you run this in your terminal:

pip install pyusb

then run python and run:

import seabreeze
seabreeze.use('pyseabreeze')
import seabreeze.spectrometers as sb
devices = sb.list_device()
spec = sb.Spectrometer(devices[0])
spec.intensities()

@aoabdelatif
Copy link
Author

Hello Andreas,

I think you can go ahead and close this issue.

With a lot of trouble shooting, blood, sweat, and tears, i finally found the fix!

It turns out, my USB2000 Ocean Optic Spectrometer never had the firmware updated.

The firmware is required in order to run it on Mac, Windows 8, and Windows 10.

The only way to get the firmware is to email Ocean Optics Technical Support and they will send you the update file with instructions on how to install the firmware on to your device.

I successfully installed the firmware and now my spectrometer runs perfect!

Thank you for all your help!

-Adam

@ap--
Copy link
Owner

ap-- commented Jun 11, 2017

HI Adam,
Thanks for the report. I'll leave the issue open, until I add this info to the README at some point.
Glad that it works now :)
-Andreas

@ap-- ap-- changed the title USB2000 stuck in infinite loop when asking for spec.intensities USB2000: spec.intensities causes infinite loop (due to old FW) Aug 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants