navigate.model.features.common_features.LoopByCount
- class navigate.model.features.common_features.LoopByCount(model, steps=1)
Bases:
object
LoopByCount class for controlling signal and data acquisition loops.
This class provides functionality to control signal and data acquisition loops by specifying the number of steps or frames to execute.
Notes:
This class is used to control signal and data acquisition loops by specifying the
number of steps or frames to execute. It allows for flexible control of the acquisition process.
The steps parameter can be an integer specifying the number of steps/frames
directly or a string representing a configuration reference to determine the loop count dynamically.
The loop control process involves tracking the remaining steps/frames and deciding
whether to continue the loop or exit based on the remaining count.
The LoopByCount class is useful for controlling the number of acquisitions
during microscopy experiments, either by specifying a fixed count or by dynamically determining it from configuration references.
- __init__(model, steps=1)
Initialize the LoopByCount class.
Parameters:
- modelMicroscopeModel
The microscope model object used for loop control.
- stepsint or str, optional
The number of steps or a configuration reference to determine the loop count. Default is 1.
Methods
__init__
(model[, steps])Initialize the LoopByCount class.
data_func
(frame_ids)Control the data acquisition loop and update the remaining frames or steps.
Get number of steps
pre_func
()Initialize loop parameters
Control the signal acquisition loop and update the remaining steps.
Attributes
The microscope model associated with the loop control.
A boolean value indicating whether to step by frame or by step.
The remaining number of steps or frames.
The remaining number of steps.
The remaining number of frames.
Initialization flag
A dictionary defining the configuration for the loop control process.
- data_func(frame_ids)
Control the data acquisition loop and update the remaining frames or steps.
This method controls the data acquisition loop by decrementing the remaining frames or steps. It determines whether to continue the loop or exit based on the remaining count.
Parameters:
- frame_idslist
A list of frame IDs for which data acquisition should be performed.
Returns:
- bool
A boolean value indicating whether to continue the loop.
- pre_func()
Initialize loop parameters
- signal_func()
Control the signal acquisition loop and update the remaining steps.
This method controls the signal acquisition loop by decrementing the remaining steps. It determines whether to continue the loop or exit based on the remaining count.
Returns:
- bool
A boolean value indicating whether to continue the loop.
- config_table
A dictionary defining the configuration for the loop control process.
- Type:
dict
- data_frames
The remaining number of frames.
- Type:
int
- initialized
Initialization flag
- Type:
bool
- model
The microscope model associated with the loop control.
- Type:
MicroscopeModel
- signals
The remaining number of steps.
- Type:
int
- step_by_frame
A boolean value indicating whether to step by frame or by step.
- Type:
bool
- steps
The remaining number of steps or frames.
- Type:
int