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._CoolLEDChannel Class Reference
Inheritance diagram for microscope.controllers.coolled._CoolLEDChannel:
microscope.abc.LightSource microscope.abc.TriggerTargetMixin microscope.abc.Device

Public Member Functions

None __init__ (self, _CoolLEDConnection connection, str name, **kwargs)
 
typing.List[str] get_status (self)
 
None enable (self)
 
None disable (self)
 
bool get_is_on (self)
 
microscope.TriggerType trigger_type (self)
 
microscope.TriggerMode trigger_mode (self)
 
None set_trigger (self, microscope.TriggerType ttype, microscope.TriggerMode tmode)
 
- Public Member Functions inherited from microscope.abc.LightSource
def __init__ (self, **kwargs)
 
typing.List[str] get_status (self)
 
bool get_is_on (self)
 
float power (self)
 
None power (self, float power)
 
float get_set_power (self)
 
- Public Member Functions inherited from microscope.abc.TriggerTargetMixin
microscope.TriggerMode trigger_mode (self)
 
microscope.TriggerType trigger_type (self)
 
None set_trigger (self, microscope.TriggerType ttype, microscope.TriggerMode tmode)
 
None trigger (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

Individual light devices that compose a CoolLED controller.

Definition at line 133 of file coolled.py.

Constructor & Destructor Documentation

◆ __init__()

None microscope.controllers.coolled._CoolLEDChannel.__init__ (   self,
_CoolLEDConnection  connection,
str  name,
**  kwargs 
)

Reimplemented from microscope.abc.LightSource.

Definition at line 136 of file coolled.py.

138 ) -> None:
139 super().__init__(**kwargs)
140 self._conn = _CoolLEDChannelConnection(connection, name)
141 # If a channel is disabled ("unselected"), setting the trigger
142 # type to software ("on") is not recorded and reverts back to
143 # high ("off"). Because of this, we keep track of what
144 # trigger type we want, i.e., should be "on" or "off", and
145 # apply it when the channel is enabled.
146 self._should_be_on = False
147
148 # The channel may be "selected" (enabled) and "off" (trigger
149 # type HIGH). When we set the trigger type to software,
150 # that's the same as setting it "on" which will make the
151 # channel emit light. Constructing this channel should not
152 # accidentally mae it emit light so disable it firt.
153 self.disable()
154
155 # Default to software trigger type.
156 self.set_trigger(
157 microscope.TriggerType.SOFTWARE, microscope.TriggerMode.BULB
158 )
159

Member Function Documentation

◆ disable()

◆ enable()

◆ get_is_on()

bool microscope.controllers.coolled._CoolLEDChannel.get_is_on (   self)

◆ get_status()

typing.List[str] microscope.controllers.coolled._CoolLEDChannel.get_status (   self)

◆ set_trigger()

None microscope.controllers.coolled._CoolLEDChannel.set_trigger (   self,
microscope.TriggerType  ttype,
microscope.TriggerMode   tmode 
)
Set device for a specific trigger.

Reimplemented from microscope.abc.TriggerTargetMixin.

Definition at line 210 of file coolled.py.

212 ) -> None:
213 if tmode is not microscope.TriggerMode.BULB:
215 "the only trigger mode supported is 'bulb'"
216 )
217 if ttype is microscope.TriggerType.SOFTWARE:
218 self._conn.set_switch_state("N")
219 self._should_be_on = True
220 elif ttype is microscope.TriggerType.HIGH:
221 self._conn.set_switch_state("F")
222 self._should_be_on = False
223 else:
225 "trigger type supported must be 'SOFTWARE' or 'HIGH'"
226 )
227

References microscope.controllers.coolled._CoolLEDChannelConnection._conn, microscope.controllers.coolled._CoolLEDChannel._conn, microscope.controllers.lumencor._LightChannelConnection._conn, microscope.controllers.lumencor._SpectraIIILightChannel._conn, microscope.controllers.prior.ProScanIII._conn, microscope.controllers.prior._ProScanIIIFilterWheel._conn, microscope.controllers.toptica._iChromeLaserConnection._conn, microscope.controllers.toptica._iChromeLaser._conn, microscope.controllers.zaber._ZaberDeviceConnection._conn, microscope.controllers.zaber.ZaberDaisyChain._conn, microscope.lights.toptica.TopticaiBeam._conn, microscope.stages.ludl.ludlMC2000._conn, and microscope.controllers.coolled._CoolLEDChannel._should_be_on.

Referenced by microscope.cameras.picam.PiCamera.__init__(), microscope.cameras.ximea.XimeaCamera.__init__(), and microscope.cameras.ximea.XimeaCamera.initialize().

◆ trigger_mode()

microscope.TriggerMode microscope.controllers.coolled._CoolLEDChannel.trigger_mode (   self)

Reimplemented from microscope.abc.TriggerTargetMixin.

Definition at line 207 of file coolled.py.

207 def trigger_mode(self) -> microscope.TriggerMode:
208 return microscope.TriggerMode.BULB
209

Referenced by microscope.cameras.picam.PiCamera.__init__(), and microscope.cameras.ximea.XimeaCamera.__init__().

◆ trigger_type()

microscope.TriggerType microscope.controllers.coolled._CoolLEDChannel.trigger_type (   self)

Reimplemented from microscope.abc.TriggerTargetMixin.

Definition at line 190 of file coolled.py.

190 def trigger_type(self) -> microscope.TriggerType:
191 if self._conn.get_selected_state() == "S":
192 # Channel is "selected" (enabled): get the answer from
193 # switch state ("on" or "off").
194 if self._conn.get_switch_state() == "N":
195 return microscope.TriggerType.SOFTWARE
196 else:
197 return microscope.TriggerType.HIGH
198 else:
199 # Channel is "unselected" (disabled): trigger type will be
200 # whatever we set it to when we enable it.
201 if self._should_be_on:
202 return microscope.TriggerType.SOFTWARE
203 else:
204 return microscope.TriggerType.HIGH
205

Referenced by microscope.cameras.ximea.XimeaCamera.__init__(), microscope.abc.DeformableMirror.apply_pattern(), and microscope.abc.TriggerTargetMixin.trigger().


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