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.simulators.SimulatedLightSource Class Reference
Inheritance diagram for microscope.simulators.SimulatedLightSource:
microscope._utils.OnlyTriggersBulbOnSoftwareMixin microscope.abc.LightSource microscope.abc.TriggerTargetMixin microscope.abc.TriggerTargetMixin microscope.abc.Device microscope.testsuite.devices.TestLaser

Public Member Functions

 __init__ (self, **kwargs)
 
 get_status (self)
 
 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

 _do_enable (self)
 
None _do_shutdown (self)
 
 _do_disable (self)
 
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

Protected Attributes

float _power = 0.0
 
bool _emission = False
 
 _set_point
 
- 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

Definition at line 339 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

microscope.simulators.SimulatedLightSource.__init__ ( self,
** kwargs )

Reimplemented from microscope.abc.LightSource.

Definition at line 343 of file __init__.py.

343 def __init__(self, **kwargs):
344 super().__init__(**kwargs)
345 self._power = 0.0
346 self._emission = False
347

Member Function Documentation

◆ _do_disable()

microscope.simulators.SimulatedLightSource._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 358 of file __init__.py.

358 def _do_disable(self):
359 self._emission = False
360 return self._emission
361

◆ _do_enable()

microscope.simulators.SimulatedLightSource._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 351 of file __init__.py.

351 def _do_enable(self):
352 self._emission = True
353 return self._emission
354

◆ _do_get_power()

float microscope.simulators.SimulatedLightSource._do_get_power ( self)
protected
Internal function that actually returns the light source power.

Reimplemented from microscope.abc.LightSource.

Definition at line 369 of file __init__.py.

369 def _do_get_power(self) -> float:
370 if self._emission:
371 return self._power
372 else:
373 return 0.0
374
375

◆ _do_set_power()

None microscope.simulators.SimulatedLightSource._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 365 of file __init__.py.

365 def _do_set_power(self, power: float) -> None:
366 _logger.info("Power set to %s.", power)
367 self._power = power
368

◆ _do_shutdown()

None microscope.simulators.SimulatedLightSource._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 355 of file __init__.py.

355 def _do_shutdown(self) -> None:
356 pass
357

◆ get_is_on()

microscope.simulators.SimulatedLightSource.get_is_on ( self)
Return True if the light source is currently able to produce light.

Reimplemented from microscope.abc.LightSource.

Definition at line 362 of file __init__.py.

362 def get_is_on(self):
363 return self._emission
364

◆ get_status()

microscope.simulators.SimulatedLightSource.get_status ( self)
Query and return the light source status.

Reimplemented from microscope.abc.LightSource.

Definition at line 348 of file __init__.py.

348 def get_status(self):
349 return [str(x) for x in (self._emission, self._power, self._set_point)]
350

Member Data Documentation

◆ _emission

bool microscope.simulators.SimulatedLightSource._emission = False
protected

Definition at line 346 of file __init__.py.

◆ _power

microscope.simulators.SimulatedLightSource._power = 0.0
protected

Definition at line 345 of file __init__.py.

◆ _set_point

microscope.simulators.SimulatedLightSource._set_point
protected

Definition at line 349 of file __init__.py.


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