navigate.model.devices.camera.hamamatsu.HamamatsuOrcaQuest2Camera
- class navigate.model.devices.camera.hamamatsu.HamamatsuOrcaQuest2Camera(microscope_name: str, device_connection: Any, configuration: dict[str, Any], *args: Optional[Any], **kwargs: Optional[Any])
Bases:
HamamatsuBaseORCA-Quest 2 area and unidirectional light-sheet imaging through DCAM.
Light-sheet timing uses pairs of sensor rows. USB frame pacing is kept separate from the illumination sweep through
minimum_frame_interval.- __init__(microscope_name: str, device_connection: Any, configuration: dict[str, Any], *args: Optional[Any], **kwargs: Optional[Any]) → None
Initialize the Quest 2 camera.
- Parameters:
microscope_name (str) – Microscope name in the configuration.
device_connection (Any) – Connected DCAM camera.
configuration (dict[str, Any]) – Global microscope configuration.
Methods
__init__(microscope_name, device_connection, ...)Initialize the Quest 2 camera.
Convert sweep seconds and slit width in rows to Quest timing.
Get the duration of time needed to read out an image.
Close HamamatsuOrca Camera
Close image series.
connect(camera_id)Connect to HamamatsuOrca camera.
Discover precision, restoring an idle MONO8 probe before returning.
Read the SDK's meaningful output depth, leaving missing values unknown.
Return the cached normalized format without issuing SDK calls.
Get HamamatsuOrca line interval.
Get frame from HamamatsuOrca camera.
Get offset and variance maps from file.
Get camera cooling temperature.
initialize_image_series([data_buffer, ...])Start capture, optionally resetting stale single-camera USB state.
Print Camera Settings.
set_ROI([roi_width, roi_height, center_x, ...])Change the size of the active region on the camera.
set_ROI_and_binning([roi_width, roi_height, ...])Change the size of the active region on the camera and set the binning mode.
set_binning(binning_string)Reject binning in light-sheet mode before changing image geometry.
set_bit_depth(bit_depth)Apply an idle-only depth change with exact readback and rollback.
set_cooling(cooling)Set camera cooling mode and temperature.
set_exposure_time(exposure_time)Apply exposure and refresh the transport-dependent trigger period.
set_line_interval(line_interval_time)Apply the line interval and retain the actual DCAM readback.
set_readout_direction(mode)Select forward/backward; alternating directions are not validated.
set_sensor_mode(mode)Set area/light-sheet mode while stopped and refresh ROI constraints.
set_trigger_mode([trigger_source])Set Hamamatsu trigger source and trigger mode.
Attributes
- calculate_light_sheet_exposure_time(full_chip_exposure_time: float, shutter_width: int) → tuple[float, float, float]
Convert sweep seconds and slit width in rows to Quest timing.
- Parameters:
full_chip_exposure_time (float) – Requested full sweep duration in seconds.
shutter_width (int) – Requested rolling slit width in sensor rows.
- Returns:
exposure_time (float) – Exposure duration for each row pair, in seconds.
camera_line_interval (float) – Quantized line interval in seconds.
full_chip_exposure_time (float) – Effective sweep duration in seconds.
Notes
Two rows advance per interval; the sweep includes 4H trigger delay and 5H readout overhead, matching Navigate’s convention. Odd slit widths round up to a whole row pair. Interval limits and steps are queried in light-sheet mode from the connected camera.
- calculate_readout_time() → float
Get the duration of time needed to read out an image.
- Returns:
readout_time – Duration of time needed to read out an image.
- Return type:
float
- close_camera() → None
Close HamamatsuOrca Camera
- close_image_series() → None
Close image series.
Stops the acquisition and sets is_acquiring flag to False.
- classmethod connect(camera_id: str) → navigate.model.devices.APIs.hamamatsu.HamamatsuAPI.DCAM
Connect to HamamatsuOrca camera.
- Parameters:
camera_id (int) – Camera ID.
- Returns:
camera_controller – Camera controller object.
- Return type:
object
- generate_new_frame() → None
- get_advanced_setting_capabilities() → dict[str, navigate.model.devices.camera.format.CameraSettingCapability]
Discover precision, restoring an idle MONO8 probe before returning.
DCAM can hide MONO16 precision choices while MONO8 is selected. Only that state requires a temporary pixel-type change, with exact rollback. Acquiring, failed-restoration and coupled Lightning cameras never probe.
- get_bit_depth() → Optional[int]
Read the SDK’s meaningful output depth, leaving missing values unknown.
- get_image_format() → CameraImageFormat
Return the cached normalized format without issuing SDK calls.
- get_line_interval() → float
Get HamamatsuOrca line interval.
- Returns:
line_interval_time – Line interval duration.
- Return type:
float
- get_new_frame() → list[int]
Get frame from HamamatsuOrca camera.
- Returns:
frame_ids – Frame ids from HamamatsuOrca camera.
- Return type:
list[int]
- get_offset_variance_maps() → Any
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.
- get_temperature() → float
Get camera cooling temperature.
- Returns:
temperature – Camera cooling temperature in Celsius.
- Return type:
float
- initialize_image_series(data_buffer: Optional[list] = None, number_of_frames: int = 100) → None
Start capture, optionally resetting stale single-camera USB state.
- report_settings() → None
Print Camera Settings.
Prints the current camera settings to the console and the log file.
- set_ROI(roi_width: int = 2048, roi_height: int = 2048, center_x: int = 1024, center_y: int = 1024) → bool
Change the size of the active region on the camera.
- Parameters:
roi_width (int) – Width of active camera region.
roi_height (int) – Height of active camera region.
center_x (int) – X position of the center of view
center_y (int) – Y position of the center of view
- Returns:
result – True if successful, False otherwise.
- Return type:
bool
- set_ROI_and_binning(roi_width: int = 2048, roi_height: int = 2048, center_x: int = 1024, center_y: int = 1024, binning: str = '1x1') → bool
Change the size of the active region on the camera and set the binning mode.
- Parameters:
roi_width (int) – Width of active camera region.
roi_height (int) – Height of active camera region.
center_x (int) – X position of the center of view
center_y (int) – Y position of the center of view
binning (str) – Desired binning properties (e.g., ‘1x1’, ‘2x2’, ‘4x4’, ‘8x8’, ‘16x16’, ‘1x2’, ‘2x4’)
- Returns:
result – True if successful, False otherwise.
- Return type:
bool
- set_binning(binning_string: str) → bool
Reject binning in light-sheet mode before changing image geometry.
- set_bit_depth(bit_depth: int) → int
Apply an idle-only depth change with exact readback and rollback.
- Parameters:
bit_depth (int) – An SDK-advertised precision supported by the normalized image format.
- Returns:
Confirmed operating precision.
- Return type:
int
- set_cooling(cooling: str) → None
Set camera cooling mode and temperature.
- Parameters:
cooling (str) – ‘On’ or ‘Off’
- set_exposure_time(exposure_time: float) → bool
Apply exposure and refresh the transport-dependent trigger period.
- Parameters:
exposure_time (float) – Exposure duration in seconds.
- Returns:
True when the setting and trigger-period query succeeded.
- Return type:
bool
- set_line_interval(line_interval_time: float) → bool
Apply the line interval and retain the actual DCAM readback.
- Parameters:
line_interval_time (float) – Line interval in seconds.
- Returns:
True when DCAM accepted the setting; raises on rejection.
- Return type:
bool
- set_readout_direction(mode: str) → None
Select forward/backward; alternating directions are not validated.
- set_sensor_mode(mode: str) → None
Set area/light-sheet mode while stopped and refresh ROI constraints.
- set_trigger_mode(trigger_source: str = 'External') → None
Set Hamamatsu trigger source and trigger mode.
- Parameters:
trigger_source (str) – Trigger source: “External” or “Internal”. Default is “External”.
- camera_controller
Hardware device to connect to
- Type:
object
- camera_parameters
Camera parameters
- Type:
dict
- configuration
Configuration settings
- Type:
dict
- configuration_schema = {'defect_correct_mode': SettingSpec(value_type=<class 'float'>, default=1.0, label='Defect Correct Mode', help_text="Enable the camera's pixel-defect correction. Use 1.0 for Off or 2.0 for On.", choices=(1.0, 2.0), choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=True, dynamic_source=None, depends_on=None), 'reinitialize_on_restart': SettingSpec(value_type=<class 'bool'>, default=False, label='Reinitialize DCAM on Restart', help_text='Work around stale USB capture state on Linux DCAM 4.0.7087. Requires a single camera; adds startup delay.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=False, dynamic_source=None, depends_on=None)}
- device_connection
Device connection
- Type:
object
- is_acquiring
Whether the camera is currently acquiring
- Type:
bool
- microscope_name
Name of the microscope
- 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: Any
Return offset map. If not present, load from file.
- Returns:
offset – Offset map.
- Return type:
np.ndarray
- property serial_number: str
Get Camera Serial Number
- Returns:
serial_number – Serial number for the camera.
- Return type:
str
- step_image_height
Minimum step size for image height.
- Type:
int
- step_image_width
Minimum step size for image width.
- Type:
int
- property variance: Any
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