BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
microscope.lights.toptica.TopticaiBeam Class Reference
Inheritance diagram for microscope.lights.toptica.TopticaiBeam:
microscope._utils.OnlyTriggersBulbOnSoftwareMixin microscope.abc.LightSource microscope.abc.TriggerTargetMixin microscope.abc.TriggerTargetMixin microscope.abc.Device

Public Member Functions

None __init__ (self, str port, **kwargs)
 
typing.List[str] get_status (self)
 
None enable (self)
 
None disable (self)
 
bool 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
None trigger (self)
 
- Public Member Functions inherited from microscope.abc.LightSource
float power (self)
 
None power (self, float power)
 
float get_set_power (self)
 
- Public Member Functions inherited from microscope.abc.Device
None __del__ (self)
 
bool get_is_enabled (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)
 
 get_setting (self, str name)
 
 get_all_settings (self)
 
None set_setting (self, str name, value)
 
 describe_setting (self, str name)
 
 describe_settings (self)
 
 update_settings (self, incoming, bool init=False)
 

Protected Member Functions

None _do_shutdown (self)
 
float _get_max_power_mw (self)
 
float _get_power_mw (self)
 
None _set_power_mw (self, float mw)
 
None _do_set_power (self, float power)
 
float _do_get_power (self)
 
- Protected Member Functions inherited from microscope._utils.OnlyTriggersBulbOnSoftwareMixin
None _do_trigger (self)
 
- Protected Member Functions inherited from microscope.abc.TriggerTargetMixin
- Protected Member Functions inherited from microscope.abc.LightSource
- Protected Member Functions inherited from microscope.abc.Device
 _do_disable (self)
 
 _do_enable (self)
 

Protected Attributes

 _conn = _iBeamConnection(port)
 
 _max_power = self._conn.show_max_power()
 
- Protected Attributes inherited from microscope.abc.LightSource
float _set_point = 0.0
 
- Protected Attributes inherited from microscope.abc.Device
dict _settings = {}
 

Additional Inherited Members

- Public Attributes inherited from microscope.abc.Device
bool enabled = False
 

Detailed Description

Toptica iBeam smart laser.

Control of laser power is performed by setting the power level on
the normal channel (#2) only.  The bias channel (#1) is left
unmodified and so defines the lowest level power.

Definition at line 205 of file toptica.py.

Constructor & Destructor Documentation

◆ __init__()

None microscope.lights.toptica.TopticaiBeam.__init__ ( self,
str port,
** kwargs )

Reimplemented from microscope.abc.LightSource.

Definition at line 216 of file toptica.py.

216 def __init__(self, port: str, **kwargs) -> None:
217 super().__init__(**kwargs)
218 self._conn = _iBeamConnection(port)
219 # The Toptica iBeam has up to five operation modes, named
220 # "channels" on the documentation. Only the first three
221 # channels have any sort of documentation:
222 #
223 # Ch 1: bias level channel
224 # Ch 2: normal operating level channel
225 # Ch 3: only used at high-power models
226 #
227 # We haven't come across a laser with a channel 3 so we are
228 # ignoring it until then. So we just leave the bias channel
229 # (1) alone and control power via the normal channel (2).
230 self._max_power = self._conn.show_max_power()
231

Member Function Documentation

◆ _do_get_power()

float microscope.lights.toptica.TopticaiBeam._do_get_power ( self)
protected
Internal function that actually returns the light source power.

Reimplemented from microscope.abc.LightSource.

Definition at line 268 of file toptica.py.

268 def _do_get_power(self) -> float:
269 return self._get_power_mw() / self._get_max_power_mw()

◆ _do_set_power()

None microscope.lights.toptica.TopticaiBeam._do_set_power ( self,
float power )
protected
Internal function that actually sets the light source power.

This function will be called by the `power` attribute setter
after clipping the argument to the [0, 1] interval.

Reimplemented from microscope.abc.LightSource.

Definition at line 265 of file toptica.py.

265 def _do_set_power(self, power: float) -> None:
266 self._set_power_mw(power * self._get_max_power_mw())
267

◆ _do_shutdown()

None microscope.lights.toptica.TopticaiBeam._do_shutdown ( self)
protected
Private method - actual shutdown of the device.

Users should be calling :meth:`shutdown` and not this method.
Concrete implementations should implement this method instead
of `shutdown`.

Reimplemented from microscope.abc.Device.

Definition at line 232 of file toptica.py.

232 def _do_shutdown(self) -> None:
233 pass
234

◆ _get_max_power_mw()

float microscope.lights.toptica.TopticaiBeam._get_max_power_mw ( self)
protected

Definition at line 256 of file toptica.py.

256 def _get_max_power_mw(self) -> float:
257 return self._max_power
258

◆ _get_power_mw()

float microscope.lights.toptica.TopticaiBeam._get_power_mw ( self)
protected

Definition at line 259 of file toptica.py.

259 def _get_power_mw(self) -> float:
260 return self._conn.show_power_uW() * (10**-3)
261

◆ _set_power_mw()

None microscope.lights.toptica.TopticaiBeam._set_power_mw ( self,
float mw )
protected

Definition at line 262 of file toptica.py.

262 def _set_power_mw(self, mw: float) -> None:
263 self._conn.set_normal_channel_power(mw)
264

◆ disable()

None microscope.lights.toptica.TopticaiBeam.disable ( self)
Disable the device for a short period for inactivity.

Reimplemented from microscope.abc.Device.

Definition at line 242 of file toptica.py.

242 def disable(self) -> None:
243 self._conn.laser_off()
244

◆ enable()

None microscope.lights.toptica.TopticaiBeam.enable ( self)
Enable the device.

Reimplemented from microscope.abc.Device.

Definition at line 239 of file toptica.py.

239 def enable(self) -> None:
240 self._conn.laser_on()
241

◆ get_is_on()

bool microscope.lights.toptica.TopticaiBeam.get_is_on ( self)
Return True if the light source is currently able to produce light.

Reimplemented from microscope.abc.LightSource.

Definition at line 245 of file toptica.py.

245 def get_is_on(self) -> bool:
246 state = self._conn.status_laser()
247 if state == b"ON":
248 return True
249 elif state == b"OFF":
250 return False
251 else:
253 "Unexpected laser status: %s" % state.decode()
254 )
255

◆ get_status()

typing.List[str] microscope.lights.toptica.TopticaiBeam.get_status ( self)
Query and return the light source status.

Reimplemented from microscope.abc.LightSource.

Definition at line 235 of file toptica.py.

235 def get_status(self) -> typing.List[str]:
236 status: typing.List[str] = []
237 return status
238

Member Data Documentation

◆ _conn

microscope.lights.toptica.TopticaiBeam._conn = _iBeamConnection(port)
protected

Definition at line 218 of file toptica.py.

◆ _max_power

microscope.lights.toptica.TopticaiBeam._max_power = self._conn.show_max_power()
protected

Definition at line 230 of file toptica.py.


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