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

K10CR1 disconnect ? and conflict with Thorlabs spectrometer in discover_stage() #15

Open
LeoMonn opened this issue Nov 15, 2018 · 0 comments

Comments

@LeoMonn
Copy link

LeoMonn commented Nov 15, 2018

Hello,

Thank you for your code. I'm currently using it to make a UI.
It appears there is an when using discover_stages() if the stages have already been "discovered", preventing me to use them. Also, when I import and find another Thorlabs instrument such as a spectrometer, a conflict appears again preventing to discover the stages.
My fix for now was to write:

try: 
    from thorpy.comm.discovery import discover_stages
    try: #Checking if the 2 stages have already been discovered 
        if len(stages)==2:
            print(stages)
        else:
            raise("error stages")
    except:
        stages = list(discover_stages())
        print(stages)
except:
    print('failed to import thorpy.comm.discovery or load the stages')
    pass

basically the idea was just to go around both problems, allowing my code to not work sometimes and forcing me to kill the current kernel and start a new one (using spyder 3).
For my first problem, I fell like a fix could be to disconnect the stages. Is this possible ? Is there another fix that could do the job properly ?
For the second problem, it seems like I can fix this by forcing to load the stages before the thorlabs spectrometer, which in my case is not very convenient. Is this a known issue ?

Thank you
Best regards,

Léo

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