wavefrontshaping / slmPy

A simple Python module based on wxPython to interact with spatial light modulators handled as secondary monitors.
Other
63 stars 26 forks source link

SLM with monitor ID = 0 possible? #5

Closed qiuemily closed 3 years ago

qiuemily commented 3 years ago

I'm wondering whether it's possible to use slmPy with monitor ID = 0 for the SLM. The slmpy.SLMdisplay(monitor = 0) and updateArray() commands run without errors, but the SLM/SLM controller does not seem to respond.

I've been experiencing some problems with assigning the monitor ID to the SLM, since it seems to be 0 by default. In parallel, I've been in contact with Hamamatsu support as well as Nvidia (for our graphics card), to see if the monitor ID can be set manually. Even though our display monitor has ID = 1 and it is set as the "primary monitor", our SLM does not seem to respond to commands with monitor ID = 0. Is there something fundamental that prevents us from uploading phase patterns when the SLM has monitor ID = 0? Thanks!

wavefrontshaping commented 3 years ago

Hi,

I've been experiencing some problems with assigning the monitor ID to the SLM

The id is the one assigned by the operating system, regardless of which display is set as primary.

commands run without errors, but the SLM/SLM controller does not seem to respond.

What controller? This module is designed to use an SLM that is controlled like a normal monitor, using VGA/HDMI/DVI. If you have a dedicated controller (either a card or a USB module), that is not the way to go.

I've been experiencing some problems with assigning the monitor ID to the SLM, since it seems to be 0 by default. In parallel, I've been in contact with Hamamatsu support as well as Nvidia (for our graphics card), to see if the monitor ID can be set manually.

I do not see the point, once you identify which id is your SLM, stick with it.

our SLM does not seem to respond to commands with monitor ID = 0. Is there something fundamental that prevents us from uploading phase patterns when the SLM has monitor ID = 0?

I do not understand what you mean by "respond" or "upload". slmPy does not upload anything. Since typical liquid crystal SLMs are controlled exactly as a secondary display, slmPy just opens a full-screen window on the monitor that corresponds to the SLM and then displays an array with updateArray(). In a way, it is just a graphic interface that happens to display images on the part of the screen that corresponds to your SLM. It does not upload anything nor does it communicate in any other way with the SLM.