BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
microscope.controllers.coolled.CoolLED Class Reference
Inheritance diagram for microscope.controllers.coolled.CoolLED:
microscope.abc.Controller microscope.abc.Device

Public Member Functions

None __init__ (self, str port, **kwargs)
 
typing.Dict[str, microscope.abc.Devicedevices (self)
 
typing.Mapping[str, Devicedevices (self)
 
- Public Member Functions inherited from microscope.abc.Device
None __init__ (self)
 
None __del__ (self)
 
bool get_is_enabled (self)
 
None disable (self)
 
None enable (self)
 
None initialize (self)
 
None shutdown (self)
 
None add_setting (self, name, dtype, get_func, set_func, values, typing.Optional[typing.Callable[[], bool]] readonly=None)
 
def get_setting (self, str name)
 
def get_all_settings (self)
 
None set_setting (self, str name, value)
 
def describe_setting (self, str name)
 
def describe_settings (self)
 
def update_settings (self, incoming, bool init=False)
 

Additional Inherited Members

- Public Attributes inherited from microscope.abc.Device
 enabled
 

Detailed Description

CoolLED controller for the individual light devices.

Args:
    port: port name (Windows) or path to port (everything else) to
        connect to.  For example, `/dev/ttyACM0`, `COM1`, or
        `/dev/cuad1`.

The individual channels are named A to H and depend on the actual
device.  The pE-300 have three channels named A, B, and C by
increasing order of wavelength of their spectral region.  The
pE-4000 have four selectable channels named A, B, C, and D with
channels E-H for peripheral devices via a pE expansion box.

.. code-block:: python

   # Connect to a pE-300 ultra and get the individual lights.
   controller = CoolLED('/dev/ttyACM0')
   violet = controller.devices['A']
   blue = controller.devices['B']
   red = controller.devices['C']

   # Turn on the violet channel.
   violet.enable()

CoolLED controllers are often used with a control pod which can
select/unselect and turn on/off individual channels.  The meaning
of these two states are:

* "selected" and "on": channel is always emitting light.  This is
  equivalent to being enabled with `SOFTWARE` trigger type.

* "selected" and "off": channel will emit light in receipt of a
  TTL signal.  This is equivalent to being enabled with `HIGH`
  trigger type.

* "unselected" and "off": channel nevers emit light.  This is
  equivalent to being disabled.

* "unselected" and "on": this is not possible.  If an "unselected"
  channel is turned "on" it reverts back to "off".

.. note::

   If a channel is set with `TriggerType.SOFTWARE` ("on") it will
   start emitting light once enabled ("selected").  Once enabled,
   even though trigger type is set to software and not hardware,
   if the channel receives a TTL signal it will switch to
   `TriggerType.HIGH` and continue to report being set to
   software.  This seems to be an issue with the CoolLED
   https://github.com/python-microscope/vendor-issues/issues/9

This was developed with a CoolLED pE-300 ultra but should work
with the whole pE-300 series.  It should also work with the
pE-4000 and the pE expansion box with the exception of loading
different sources.

Definition at line 234 of file coolled.py.

Constructor & Destructor Documentation

◆ __init__()

None microscope.controllers.coolled.CoolLED.__init__ (   self,
str  port,
**  kwargs 
)

Reimplemented from microscope.abc.Device.

Definition at line 293 of file coolled.py.

293 def __init__(self, port: str, **kwargs) -> None:
294 super().__init__(**kwargs)
295 self._channels: typing.Dict[str, microscope.abc.LightSource] = {}
296
297 # CoolLED manual only has the baudrate, we guessed the rest.
298 serial_conn = serial.Serial(
299 port=port,
300 baudrate=57600,
301 timeout=1,
302 bytesize=serial.EIGHTBITS,
303 stopbits=serial.STOPBITS_ONE,
304 parity=serial.PARITY_NONE,
305 xonxoff=False,
306 rtscts=False,
307 dsrdtr=False,
308 )
309 shared_serial = microscope._utils.SharedSerial(serial_conn)
310 connection = _CoolLEDConnection(shared_serial)
311 for name in connection.get_channels():
312 self._channels[name] = _CoolLEDChannel(connection, name)
313

Member Function Documentation

◆ devices()

typing.Dict[str, microscope.abc.Device] microscope.controllers.coolled.CoolLED.devices (   self)
Map of names to the controlled devices.

Reimplemented from microscope.abc.Controller.

Definition at line 315 of file coolled.py.

315 def devices(self) -> typing.Dict[str, microscope.abc.Device]:
316 return self._channels

Referenced by microscope.abc.Controller.devices().


The documentation for this class was generated from the following file: