navigate.model.devices.stage.ni.NIStage
- class navigate.model.devices.stage.ni.NIStage(microscope_name: str, device_connection: Any, configuration: Dict[str, Any], device_id: int = 0)
-
Galvo Stage Class (only supports one axis)
Generic analog controlled stage. Could be used to control piezoelectric devices, galvos, etc. Currently set up to handle National Instruments data acquisition cards.
Retrieves the volts per micron from the configuration file and uses that to determine the correct voltage to send to the stage.
- __init__(microscope_name: str, device_connection: Any, configuration: Dict[str, Any], device_id: int = 0) → None
Initialize the Galvo Stage.
- Parameters:
microscope_name (str) – Name of microscope in configuration
device_connection (Any) – Hardware device to connect to
configuration (Dict[str, Any]) – Global configuration of the microscope
device_id (int) – Device ID of the stage
Methods
__init__
(microscope_name, device_connection, ...)Initialize the Galvo Stage.
close
()Close the Galvo stage.
get_abs_position
(axis, axis_abs)Ensure the requested position is within axis bounds and return it.
Return a dictionary with the saved stage positions.
move_absolute
(move_dictionary[, wait_until_done])Move Absolute Method.
move_axis_absolute
(axis, abs_pos[, ...])Implement movement logic along a single axis.
Reports the position for all axes, and create position dictionary.
stop
()Stop all stage movement abruptly.
switch_mode
([mode, exposure_times, sweep_times])Switch Galvo stage working mode.
update_waveform
(waveform_dict)Update the waveform for the stage.
verify_abs_position
(move_dictionary[, is_strict])Ensure the requested moving positions are within axes bounds
Attributes
volts per micron scaling factor.
channel number for each axis
maximum voltage for each axis
minimum voltage for each axis
Distance threshold for wait until delay
Stage settle duration in milliseconds.
Mapping of software axes to hardware axes.
Hardware device to connect to.
Name of the microscope.
Global configuration of the microscope.
Trigger source for the DAQ.
Percent of the camera delay.
Sample rate of the DAQ.
Dictionary of exposure times for each channel.
Dictionary of sweep times for each channel.
Dictionary of waveforms for each channel.
DAQ ao task
- close() → None
Close the Galvo stage.
- get_abs_position(axis, axis_abs)
Ensure the requested position is within axis bounds and return it.
- Parameters:
axis (str) – An axis: x, y, z, f, theta
axis_abs (float) – Absolute position value
- Returns:
Position to move the stage to for this axis.
- Return type:
float
- get_position_dict()
Return a dictionary with the saved stage positions.
- Returns:
Dictionary of stage positions.
- Return type:
dict
- move_absolute(move_dictionary, wait_until_done=True)
Move Absolute Method.
- Parameters:
move_dictionary (dict) – A dictionary of values required for movement. Includes ‘x_abs’, etc. for one or more axes. Expects values in micrometers, except for theta, which is in degrees.
wait_until_done (bool) – Block until stage has moved to its new spot.
- Returns:
success – Was the move successful?
- Return type:
bool
- move_axis_absolute(axis, abs_pos, wait_until_done=False)
Implement movement logic along a single axis.
- Parameters:
axis (str) – An axis prefix in move_dictionary. For example, axis=’x’ corresponds to ‘x_abs’, ‘x_min’, etc.
abs_pos (float) – Absolute position value
wait_until_done (bool) – Block until stage has moved to its new spot.
- Returns:
Was the move successful?
- Return type:
bool
- report_position()
Reports the position for all axes, and create position dictionary.
- Returns:
Dictionary of positions for each axis.
- Return type:
dict
- stop()
Stop all stage movement abruptly.
- switch_mode(mode='normal', exposure_times=None, sweep_times=None)
Switch Galvo stage working mode.
- Parameters:
mode (str) – Name of the stage working mode Current supported modes are: confocal-projection, normal
exposure_times (dict) – Dictionary of exposure times for each channel
sweep_times (dict) – Dictionary of sweep times for each channel
- update_waveform(waveform_dict)
Update the waveform for the stage.
- Parameters:
waveform_dict (dict) – Dictionary of waveforms for each channel
- Returns:
result – success or failed
- Return type:
bool
- verify_abs_position(move_dictionary, is_strict=False)
Ensure the requested moving positions are within axes bounds
- Parameters:
move_dictionary (dict) – A dictionary of values required for movement. Includes ‘x_abs’, ‘y_abs’, etc. for one or more axes. Expect values in micrometers, except for theta, which is in degrees.
is_strict (bool, optional) – If True, return an empty dict if any axis is out of bounds.
- Returns:
a verified moving dict {axis: abs_position}
- Return type:
dict
- ao_task
DAQ ao task
- Type:
object
- axes
List of stage axes available.
- Type:
list
- axes_channels
channel number for each axis
- Type:
int
- axes_mapping
Mapping of software axes to hardware axes.
- Type:
dict
- camera_delay
Percent of the camera delay.
- Type:
float
- configuration
Global configuration of the microscope.
- Type:
multiprocessing.managers.DictProxy
- daq
Hardware device to connect to.
- Type:
object
- device_connection
Device connection object.
- Type:
Any
- distance_threshold
Distance threshold for wait until delay
- Type:
float
- exposure_times
Dictionary of exposure times for each channel.
- Type:
dict
- galvo_max_voltage
maximum voltage for each axis
- Type:
float
- galvo_min_voltage
minimum voltage for each axis
- Type:
float
- microscope_name
Name of the microscope.
- Type:
str
- sample_rate
Sample rate of the DAQ.
- Type:
float
- stage_feedback
Feedback alignment value for the stage. Default is None.
- Type:
int
- stage_limits
Whether the stage has limits enabled or not. Default is True.
- Type:
bool
- stage_settle_duration
Stage settle duration in milliseconds.
- Type:
float
- sweep_times
Dictionary of sweep times for each channel.
- Type:
dict
- trigger_source
Trigger source for the DAQ.
- Type:
str
- volts_per_micron
volts per micron scaling factor.
- Type:
float
- waveform_dict
Dictionary of waveforms for each channel.
- Type:
dict