![]() |
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.
|
Public Member Functions | |
| None | __init__ (self, **kwargs) |
| int | n_actuators (self) |
| None | apply_pattern (self, numpy.ndarray pattern) |
| None | queue_patterns (self, numpy.ndarray patterns) |
| None | next_pattern (self) |
| None | trigger (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) |
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) | |
Public Attributes | |
| n_actuators | |
Public Attributes inherited from microscope.abc.Device | |
| bool | enabled = False |
Protected Member Functions | |
| None | _validate_patterns (self, numpy.ndarray patterns) |
| None | _do_apply_pattern (self, numpy.ndarray pattern) |
| None | _do_trigger (self) |
Protected Member Functions inherited from microscope.abc.TriggerTargetMixin | |
Protected Member Functions inherited from microscope.abc.Device | |
| _do_disable (self) | |
| _do_enable (self) | |
| None | _do_shutdown (self) |
Protected Attributes | |
| typing.Optional[numpy.ndarray] | _patterns = None |
| int | _pattern_idx = -1 |
Protected Attributes inherited from microscope.abc.Device | |
| dict | _settings = {} |
Base class for Deformable Mirrors. There is no method to reset or clear a deformable mirror. While different vendors provide functions to do that, it is unclear exactly what it does the actuators. Does it set all actuators back to something based on a calibration file? Does it apply a voltage of zero to each? Does it set the values to zero and what does that mean since different deformable mirrors expect values in a different range? For the sake of uniformity, it is better for python-microscope users to pass the pattern they want, probably a pattern that flattens the mirror. It is also unclear what the use case for a reset. If it just to set the mirror to an initial state and not a specific shape, then destroying and re-constructing the DeformableMirror object provides the most obvious solution. The private properties `_patterns` and `_pattern_idx` are initialized to `None` to support the queueing of patterns and software triggering.
| None microscope.abc.DeformableMirror.__init__ | ( | self, | |
| ** | kwargs ) |
Reimplemented from microscope.abc.Device.
Definition at line 1076 of file abc.py.
|
protected |
|
protected |
Convenience fallback.
This only provides a convenience fallback for devices that
don't support queuing multiple patterns and software trigger,
i.e., devices that take only one pattern at a time. This is
not the case of most devices.
Devices that support queuing patterns, should override this
method.
.. todo::
Instead of a convenience fallback, we should have a
separate mixin for this.
Reimplemented from microscope.abc.TriggerTargetMixin.
Definition at line 1156 of file abc.py.
|
protected |
Validate the shape of a series of patterns. Only validates the shape of the patterns, not if the values are actually in the [0 1] range. If some hardware is unable to handle values outside their defined range (most will simply clip them), then it's the responsability of the subclass to do the clipping before sending the values.
Definition at line 1086 of file abc.py.
| None microscope.abc.DeformableMirror.apply_pattern | ( | self, | |
| numpy.ndarray | pattern ) |
Apply this pattern.
Raises:
microscope.IncompatibleStateError: if device trigger type is
not set to software.
Definition at line 1113 of file abc.py.
| int microscope.abc.DeformableMirror.n_actuators | ( | self | ) |
| None microscope.abc.DeformableMirror.next_pattern | ( | self | ) |
Apply the next pattern in the queue. DEPRECATED: this is the same as calling :meth:`trigger`.
Definition at line 1148 of file abc.py.
| None microscope.abc.DeformableMirror.queue_patterns | ( | self, | |
| numpy.ndarray | patterns ) |
Send values to the mirror.
Args:
patterns: An `KxN` elements array of values in the range
`[0 1]`, where `N` equals the number of actuators, and
`K` is the number of patterns.
A convenience fallback is provided for software triggering is
provided.
Reimplemented in microscope.mirror.alpao.AlpaoDeformableMirror.
Definition at line 1132 of file abc.py.
| None microscope.abc.DeformableMirror.trigger | ( | self | ) |
Apply the next pattern in the queue.
Reimplemented from microscope.abc.TriggerTargetMixin.
Definition at line 1178 of file abc.py.
|
protected |