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.lights.cobolt.CoboltLaser Class Reference
Inheritance diagram for microscope.lights.cobolt.CoboltLaser:
microscope._utils.OnlyTriggersBulbOnSoftwareMixin microscope.abc.SerialDeviceMixin microscope.abc.LightSource microscope.abc.TriggerTargetMixin microscope.abc.TriggerTargetMixin microscope.abc.Device

Public Member Functions

def __init__ (self, com=None, baud=115200, timeout=0.1, **kwargs)
 
def send (self, command)
 
def clearFault (self)
 
def get_status (self)
 
def initialize (self)
 
def disable (self)
 
def get_is_on (self)
 
- Public Member Functions inherited from microscope._utils.OnlyTriggersBulbOnSoftwareMixin
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.TriggerTargetMixin
microscope.TriggerMode trigger_mode (self)
 
microscope.TriggerType trigger_type (self)
 
None set_trigger (self, microscope.TriggerType ttype, microscope.TriggerMode tmode)
 
None trigger (self)
 
def __init__ (self, **kwargs)
 
- 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.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)
 

Public Attributes

 connection
 
- Public Attributes inherited from microscope.abc.SerialDeviceMixin
 connection
 
- Public Attributes inherited from microscope.abc.Device
 enabled
 

Additional Inherited Members

- Static Public Member Functions inherited from microscope.abc.SerialDeviceMixin
def lock_comms (func)
 

Detailed Description

Cobolt lasers.

The cobolt lasers are diode pumped lasers and only supports
`TriggerMode.SOFTWARE` (this is probably not completely true, some
cobolt lasers are probably not diode pumped and those should be
able to support other trigger modes, but we only got access to the
04 series).

Definition at line 32 of file cobolt.py.

Constructor & Destructor Documentation

◆ __init__()

def microscope.lights.cobolt.CoboltLaser.__init__ (   self,
  com = None,
  baud = 115200,
  timeout = 0.1,
**  kwargs 
)

Reimplemented from microscope.abc.SerialDeviceMixin.

Definition at line 47 of file cobolt.py.

47 def __init__(self, com=None, baud=115200, timeout=0.1, **kwargs):
48 super().__init__(**kwargs)
49 self.connection = serial.Serial(
50 port=com,
51 baudrate=baud,
52 timeout=timeout,
53 stopbits=serial.STOPBITS_ONE,
54 bytesize=serial.EIGHTBITS,
55 parity=serial.PARITY_NONE,
56 )
57 # Start a logger.
58 response = self.send(b"sn?")
59 _logger.info("Cobolt laser serial number: [%s]", response.decode())
60 # We need to ensure that autostart is disabled so that we can switch emission
61 # on/off remotely.
62 response = self.send(b"@cobas 0")
63 _logger.info("Response to @cobas 0 [%s]", response.decode())
64
65 self._max_power_mw = float(self.send(b"gmlp?"))
66
67 self.initialize()
68

Member Function Documentation

◆ clearFault()

def microscope.lights.cobolt.CoboltLaser.clearFault (   self)

Definition at line 83 of file cobolt.py.

83 def clearFault(self):
84 self.send(b"cf")
85 return self.get_status()
86

◆ disable()

def microscope.lights.cobolt.CoboltLaser.disable (   self)
Disable the device for a short period for inactivity.

Reimplemented from microscope.abc.Device.

Definition at line 134 of file cobolt.py.

134 def disable(self):
135 _logger.info("Turning laser OFF.")
136 return self.send(b"l0").decode()
137

References microscope.lights.cobolt.CoboltLaser.send(), and microscope.lights.sapphire.SapphireLaser.send().

Referenced by microscope.abc.DataDevice.__init__(), microscope.lights.cobolt.CoboltLaser.get_status(), microscope.lights.deepstar.DeepstarLaser.get_status(), microscope.lights.obis.ObisLaser.get_status(), and microscope.abc.Device.shutdown().

◆ get_is_on()

def microscope.lights.cobolt.CoboltLaser.get_is_on (   self)
Return True if the light source is currently able to produce light.

Reimplemented from microscope.abc.LightSource.

Definition at line 140 of file cobolt.py.

140 def get_is_on(self):
141 response = self.send(b"l?")
142 return response == b"1"
143

References microscope.lights.cobolt.CoboltLaser._get_power_mw(), microscope.lights.obis.ObisLaser._get_power_mw(), microscope.lights.sapphire.SapphireLaser._get_power_mw(), microscope.lights.toptica.TopticaiBeam._get_power_mw(), microscope.lights.cobolt.CoboltLaser._max_power_mw, microscope.lights.obis.ObisLaser._max_power_mw, microscope.lights.sapphire.SapphireLaser._max_power_mw, microscope.lights.cobolt.CoboltLaser._set_power_mw(), microscope.lights.toptica.TopticaiBeam._set_power_mw(), microscope.lights.obis.ObisLaser._set_power_mw(), microscope.lights.sapphire.SapphireLaser._set_power_mw(), microscope.abc.LightSource.get_is_on(), microscope.controllers.coolled._CoolLEDChannel.get_is_on(), microscope.controllers.lumencor._SpectraIIILightChannel.get_is_on(), microscope.controllers.toptica._iChromeLaser.get_is_on(), microscope.controllers.zaber._ZaberLED.get_is_on(), microscope.lights.cobolt.CoboltLaser.get_is_on(), microscope.lights.deepstar.DeepstarLaser.get_is_on(), microscope.lights.obis.ObisLaser.get_is_on(), microscope.lights.sapphire.SapphireLaser.get_is_on(), microscope.lights.toptica.TopticaiBeam.get_is_on(), microscope.simulators.SimulatedLightSource.get_is_on(), microscope.lights.cobolt.CoboltLaser.send(), and microscope.lights.sapphire.SapphireLaser.send().

Referenced by microscope.lights.cobolt.CoboltLaser.get_is_on(), microscope.lights.deepstar.DeepstarLaser.get_is_on(), microscope.lights.obis.ObisLaser.get_is_on(), microscope.lights.deepstar.DeepstarLaser.get_status(), microscope.lights.obis.ObisLaser.get_status(), microscope.lights.cobolt.CoboltLaser.initialize(), microscope.lights.obis.ObisLaser.initialize(), and microscope.lights.sapphire.SapphireLaser.initialize().

◆ get_status()

def microscope.lights.cobolt.CoboltLaser.get_status (   self)
Query and return the light source status.

Reimplemented from microscope.abc.LightSource.

Definition at line 88 of file cobolt.py.

88 def get_status(self):
89 result = []
90 for cmd, stat in [
91 (b"l?", "Emission on?"),
92 (b"p?", "Target power:"),
93 (b"pa?", "Measured power:"),
94 (b"f?", "Fault?"),
95 (b"hrs?", "Head operating hours:"),
96 ]:
97 response = self.send(cmd)
98 result.append(stat + " " + response.decode())
99 return result
100

References microscope.abc.SerialDeviceMixin.connection, microscope.filterwheels.thorlabs.ThorlabsFilterWheel.connection, microscope.lights.cobolt.CoboltLaser.connection, microscope.lights.deepstar.DeepstarLaser.connection, microscope.lights.obis.ObisLaser.connection, microscope.lights.sapphire.SapphireLaser.connection, microscope.abc.Device.disable(), microscope.abc.DataDevice.disable(), microscope.controllers.coolled._CoolLEDChannel.disable(), microscope.controllers.lumencor._SpectraIIILightChannel.disable(), microscope.lights.cobolt.CoboltLaser.disable(), microscope.lights.sapphire.SapphireLaser.disable(), microscope.lights.toptica.TopticaiBeam.disable(), microscope.lights.cobolt.CoboltLaser.send(), and microscope.lights.sapphire.SapphireLaser.send().

Referenced by microscope.lights.obis.ObisLaser.get_status(), microscope.lights.cobolt.CoboltLaser.initialize(), microscope.lights.obis.ObisLaser.initialize(), microscope.lights.sapphire.SapphireLaser.initialize(), microscope.lights.cobolt.CoboltLaser.send(), and microscope.lights.sapphire.SapphireLaser.send().

◆ initialize()

def microscope.lights.cobolt.CoboltLaser.initialize (   self)
Initialize the device.

If devices have this method (not required, and many don't),
then they should call it as part of the initialisation, i.e.,
they should call it on their `__init__` method.

Reimplemented from microscope.abc.Device.

Definition at line 110 of file cobolt.py.

110 def initialize(self):
111 self.connection.flushInput()
112 # We don't want 'direct control' mode.
113 self.send(b"@cobasdr 0")
114 # Force laser into autostart mode.
115 self.send(b"@cob1")
116

References microscope.abc.SerialDeviceMixin.connection, microscope.filterwheels.thorlabs.ThorlabsFilterWheel.connection, microscope.lights.cobolt.CoboltLaser.connection, microscope.lights.deepstar.DeepstarLaser.connection, microscope.lights.obis.ObisLaser.connection, microscope.lights.sapphire.SapphireLaser.connection, microscope.abc.LightSource.get_is_on(), microscope.controllers.coolled._CoolLEDChannel.get_is_on(), microscope.controllers.lumencor._SpectraIIILightChannel.get_is_on(), microscope.controllers.toptica._iChromeLaser.get_is_on(), microscope.controllers.zaber._ZaberLED.get_is_on(), microscope.lights.cobolt.CoboltLaser.get_is_on(), microscope.lights.deepstar.DeepstarLaser.get_is_on(), microscope.lights.obis.ObisLaser.get_is_on(), microscope.lights.sapphire.SapphireLaser.get_is_on(), microscope.lights.toptica.TopticaiBeam.get_is_on(), microscope.simulators.SimulatedLightSource.get_is_on(), microscope.abc.LightSource.get_status(), microscope.controllers.coolled._CoolLEDChannel.get_status(), microscope.controllers.lumencor._SpectraIIILightChannel.get_status(), microscope.controllers.toptica._iChromeLaser.get_status(), microscope.controllers.zaber._ZaberLED.get_status(), microscope.filterwheels.aurox.Clarity.get_status(), microscope.lights.cobolt.CoboltLaser.get_status(), microscope.lights.deepstar.DeepstarLaser.get_status(), microscope.lights.obis.ObisLaser.get_status(), microscope.lights.sapphire.SapphireLaser.get_status(), microscope.lights.toptica.TopticaiBeam.get_status(), microscope.simulators.SimulatedLightSource.get_status(), microscope.stages.linkam._LinkamBase.get_status(), microscope.stages.linkam._LinkamMDSMixin.get_status(), microscope.stages.linkam.LinkamCMS.get_status(), microscope.lights.cobolt.CoboltLaser.send(), and microscope.lights.sapphire.SapphireLaser.send().

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

◆ send()

def microscope.lights.cobolt.CoboltLaser.send (   self,
  command 
)
Send command and retrieve response.

Definition at line 69 of file cobolt.py.

69 def send(self, command):
70 """Send command and retrieve response."""
71 success = False
72 while not success:
73 self._write(command)
74 response = self._readline()
75 # Catch zero-length responses to queries and retry.
76 if not command.endswith(b"?"):
77 success = True
78 elif len(response) > 0:
79 success = True
80 return response
81

References microscope.abc.SerialDeviceMixin._readline(), microscope.filterwheels.thorlabs.ThorlabsFilterWheel._readline(), microscope.lights.obis.ObisLaser._readline(), microscope.abc.SerialDeviceMixin._write(), microscope.lights.deepstar.DeepstarLaser._write(), microscope.lights.obis.ObisLaser._write(), microscope.lights.sapphire.SapphireLaser._write(), microscope.abc.LightSource.get_status(), microscope.controllers.coolled._CoolLEDChannel.get_status(), microscope.controllers.lumencor._SpectraIIILightChannel.get_status(), microscope.controllers.toptica._iChromeLaser.get_status(), microscope.controllers.zaber._ZaberLED.get_status(), microscope.filterwheels.aurox.Clarity.get_status(), microscope.lights.cobolt.CoboltLaser.get_status(), microscope.lights.deepstar.DeepstarLaser.get_status(), microscope.lights.obis.ObisLaser.get_status(), microscope.lights.sapphire.SapphireLaser.get_status(), microscope.lights.toptica.TopticaiBeam.get_status(), microscope.simulators.SimulatedLightSource.get_status(), microscope.stages.linkam._LinkamBase.get_status(), microscope.stages.linkam._LinkamMDSMixin.get_status(), microscope.stages.linkam.LinkamCMS.get_status(), microscope.lights.cobolt.CoboltLaser.send(), and microscope.lights.sapphire.SapphireLaser.send().

Referenced by microscope.lights.cobolt.CoboltLaser.disable(), microscope.lights.cobolt.CoboltLaser.get_is_on(), microscope.lights.sapphire.SapphireLaser.get_is_on(), microscope.lights.cobolt.CoboltLaser.get_status(), microscope.lights.sapphire.SapphireLaser.get_status(), microscope.lights.cobolt.CoboltLaser.initialize(), microscope.lights.sapphire.SapphireLaser.initialize(), and microscope.lights.cobolt.CoboltLaser.send().

Member Data Documentation

◆ connection


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