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.controllers.zaber._ZaberLED Class Reference
Inheritance diagram for microscope.controllers.zaber._ZaberLED:
microscope._utils.OnlyTriggersBulbOnSoftwareMixin microscope.abc.LightSource microscope.abc.TriggerTargetMixin microscope.abc.TriggerTargetMixin microscope.abc.Device

Public Member Functions

None __init__ (self, _ZaberDeviceConnection dev_conn, int channel)
 
typing.List[str] get_status (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 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)
 
 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)
 
bool _do_enable (self)
 
None _do_disable (self)
 
float _do_get_power (self)
 
None _do_set_power (self, float power)
 
- 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

Protected Attributes

 _dev_conn = dev_conn
 
 _channel = channel
 
 _max_flux = self._dev_conn.get_lamp_max_flux(self._channel)
 
- 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

A single LED from a LED controller.

Definition at line 421 of file zaber.py.

Constructor & Destructor Documentation

◆ __init__()

None microscope.controllers.zaber._ZaberLED.__init__ ( self,
_ZaberDeviceConnection dev_conn,
int channel )

Reimplemented from microscope.abc.LightSource.

Definition at line 427 of file zaber.py.

427 def __init__(self, dev_conn: _ZaberDeviceConnection, channel: int) -> None:
428 super().__init__()
429 self._dev_conn = dev_conn
430 self._channel = channel
431 self._max_flux = self._dev_conn.get_lamp_max_flux(self._channel)
432 self.add_setting(
433 "temperature",
434 "float",
435 lambda: self._dev_conn.get_lamp_temperature(self._channel),
436 None,
437 values=tuple(),
438 )
439
440 for our_name, their_name in [
441 ("wavelength peak", "lamp.wavelength.peak"),
442 ("wavelength fwhm", "lamp.wavelength.fwhm"),
443 ]:
444 reply = self._dev_conn.command(
445 b"get %s" % their_name.encode(), self._channel
446 )
447 value = float(reply.response)
448 self.add_setting(
449 our_name,
450 "float",
451 lambda x=value: x,
452 None,
453 values=tuple(),
454 )
455

Member Function Documentation

◆ _do_disable()

None microscope.controllers.zaber._ZaberLED._do_disable ( self)
protected
Do any device-specific work on disable.

Subclasses should override this method rather than modify
`disable`.

Reimplemented from microscope.abc.Device.

Definition at line 466 of file zaber.py.

466 def _do_disable(self) -> None:
467 self._dev_conn.lamp_off(self._channel)
468

◆ _do_enable()

bool microscope.controllers.zaber._ZaberLED._do_enable ( self)
protected
Do any device specific work on enable.

Subclasses should override this method, rather than modify
`enable`.

Reimplemented from microscope.abc.Device.

Definition at line 462 of file zaber.py.

462 def _do_enable(self) -> bool:
463 self._dev_conn.lamp_on(self._channel)
464 return True
465

◆ _do_get_power()

float microscope.controllers.zaber._ZaberLED._do_get_power ( self)
protected
Internal function that actually returns the light source power.

Reimplemented from microscope.abc.LightSource.

Definition at line 469 of file zaber.py.

469 def _do_get_power(self) -> float:
470 return self._dev_conn.get_lamp_flux(self._channel) / self._max_flux
471

◆ _do_set_power()

None microscope.controllers.zaber._ZaberLED._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 472 of file zaber.py.

472 def _do_set_power(self, power: float) -> None:
473 self._dev_conn.set_lamp_flux(self._channel, power * self._max_flux)
474

◆ _do_shutdown()

None microscope.controllers.zaber._ZaberLED._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 456 of file zaber.py.

456 def _do_shutdown(self) -> None:
457 pass
458

◆ get_is_on()

bool microscope.controllers.zaber._ZaberLED.get_is_on ( self)
Return True if the light source is currently able to produce light.

Reimplemented from microscope.abc.LightSource.

Definition at line 475 of file zaber.py.

475 def get_is_on(self) -> bool:
476 return self._dev_conn.get_lamp_is_on(self._channel)
477
478

◆ get_status()

typing.List[str] microscope.controllers.zaber._ZaberLED.get_status ( self)
Query and return the light source status.

Reimplemented from microscope.abc.LightSource.

Definition at line 459 of file zaber.py.

459 def get_status(self) -> typing.List[str]:
460 return super().get_status()
461

Member Data Documentation

◆ _channel

microscope.controllers.zaber._ZaberLED._channel = channel
protected

Definition at line 430 of file zaber.py.

◆ _dev_conn

microscope.controllers.zaber._ZaberLED._dev_conn = dev_conn
protected

Definition at line 429 of file zaber.py.

◆ _max_flux

microscope.controllers.zaber._ZaberLED._max_flux = self._dev_conn.get_lamp_max_flux(self._channel)
protected

Definition at line 431 of file zaber.py.


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