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

Thorlabs CCS Spectrometers (CCS200) not loadable #169

Open
conronc opened this issue Feb 5, 2024 · 1 comment
Open

Thorlabs CCS Spectrometers (CCS200) not loadable #169

conronc opened this issue Feb 5, 2024 · 1 comment

Comments

@conronc
Copy link

conronc commented Feb 5, 2024

I use a CCS200 spectrometer which I can verify is appropriately connected by using the pyvisa resource manager

import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources(query='?*'))

output:

('USB0::0x1313::0x8089::M00723454::RAW', 'ASRL1::INSTR', 'ASRL3::INSTR', 'ASRL4::INSTR')

(the query is required to force pyvisa to recognize USB devices, otherwise it will only recognize the three ASRL devices)

However I cannot get Instrumental-lib to recognize the CCS200 thorlabs device. this device used to work with Instrumental-lib, though I do not recall which version was used on the computer that used it, something about the more recent Instrumental-lib has broken this work.

In an attempt to diagnose this, I've included the following test code in the instrumental\drivers\spectrometers\thorlabs_ccs.py

def list_instruments():
    print('did we get here') #diagnostics - CAR
    [..remaining code..]

and then attempt to call list instruments in a spyder environment

from instrumental import instrument, list_instruments,
print(list_instruments())

however the test print is never triggered. I'm not sure why this is, but it seems like there's a completely broken attempt to call this module.

-CAR

@conronc
Copy link
Author

conronc commented Feb 5, 2024

I was able to bypass this issue by importing the list_instruments() function from thorlabs_ccs.py directly

from instrumental.drivers.spectrometers.thorlabs_ccs import list_instruments

I'm not sure what is preventing the intended function of lazy loading this function definition properly, but someone may want to look into duplicating this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant