navigate.model.devices.camera.base.CameraBase
- class navigate.model.devices.camera.base.CameraBase(microscope_name: str, device_connection: Any, configuration: Dict[str, Any])
Bases:
object
CameraBase - Parent camera class.
- __init__(microscope_name: str, device_connection: Any, configuration: Dict[str, Any])
Initialize CameraBase class.
- 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
- Raises:
NameError – If microscope name is not in configuration
Methods
__init__
(microscope_name, device_connection, ...)Initialize CameraBase class.
Convert normal mode exposure time to light-sheet mode exposure time.
Close camera.
Return stored camera line interval.
Get offset and variance maps from file.
set_readout_direction
(mode)Set HamamatsuOrca readout direction.
Attributes
Return offset map.
Return variance map.
Name of microscope in configuration
Global configuration of the microscope
Hardware device to connect to
Camera parameters
Whether the camera is currently acquiring
Minimum image width
Minimum image height
Minimum step size for image width.
Minimum step size for image height.
Number of pixels in the x direction
Number of pixels in the y direction
minimum exposure time
- calculate_light_sheet_exposure_time(full_chip_exposure_time, shutter_width)
Convert normal mode exposure time to light-sheet mode exposure time. Calculate the parameters for an acquisition
- Parameters:
full_chip_exposure_time (float) – Normal mode exposure time in seconds.
shutter_width (int) – Width of light-sheet rolling shutter.
- Returns:
exposure_time (float) – Light-sheet mode exposure time (s).
camera_line_interval (float) – HamamatsuOrca line interval duration (s).
full_chip_exposure time (float) – Full chip exposure time (s).
- close_camera() → None
Close camera.
- get_line_interval() → float
Return stored camera line interval.
- Returns:
line_interval – line interval duration (s).
- Return type:
float
- get_offset_variance_maps()
Get offset and variance maps from file.
- Returns:
offset (np.ndarray) – Offset map.
variance (np.ndarray) – Variance map.
- Raises:
FileNotFoundError – If offset or variance map is not found.
- set_readout_direction(mode) → None
Set HamamatsuOrca readout direction.
- Parameters:
mode (str) – ‘Top-to-Bottom’, ‘Bottom-to-Top’, ‘bytrigger’, or ‘diverge’.
- camera_controller
Hardware device to connect to
- Type:
object
- camera_parameters
Camera parameters
- Type:
dict
- configuration
Global configuration of the microscope
- Type:
dict
- is_acquiring
Whether the camera is currently acquiring
- Type:
bool
- microscope_name
Name of microscope in configuration
- Type:
str
- min_image_height
Minimum image height
- Type:
int
- min_image_width
Minimum image width
- Type:
int
- minimum_exposure_time
minimum exposure time
- Type:
float
- property offset
Return offset map. If not present, load from file.
- Returns:
offset – Offset map.
- Return type:
np.ndarray
- step_image_height
Minimum step size for image height.
- Type:
int
- step_image_width
Minimum step size for image width.
- Type:
int
- property variance
Return variance map. If not present, load from file.
- Returns:
variance – Variance map.
- Return type:
np.ndarray
- x_pixels
Number of pixels in the x direction
- Type:
int
- y_pixels
Number of pixels in the y direction
- Type:
int