diff --git a/sashimi/hardware/cameras/hamamatsu/interface.py b/sashimi/hardware/cameras/hamamatsu/interface.py index edcab219..0ddeff84 100644 --- a/sashimi/hardware/cameras/hamamatsu/interface.py +++ b/sashimi/hardware/cameras/hamamatsu/interface.py @@ -242,7 +242,6 @@ def get_property_value(self, property_name): def set_property_value(self, property_name, property_value, *args, **kwargs): # Check if the property exists. if not (property_name in self.properties): - raise CameraException(f"Unknown property name {property_name}") # If the value is text, figure out what the diff --git a/sashimi/hardware/cameras/hamamatsu/sdk.py b/sashimi/hardware/cameras/hamamatsu/sdk.py index ff973b10..699716eb 100644 --- a/sashimi/hardware/cameras/hamamatsu/sdk.py +++ b/sashimi/hardware/cameras/hamamatsu/sdk.py @@ -44,6 +44,7 @@ # Hamamatsu structures. + ## DCAMAPI_INIT # # The dcam initialization structure diff --git a/sashimi/hardware/scanning/scanloops.py b/sashimi/hardware/scanning/scanloops.py index 7f07ea79..2ffeee4f 100644 --- a/sashimi/hardware/scanning/scanloops.py +++ b/sashimi/hardware/scanning/scanloops.py @@ -110,7 +110,6 @@ def __init__( logger: ConcurrenceLogger, trigger_exp_from_scanner, ): - self.sample_rate = sample_rate self.n_samples = n_samples diff --git a/sashimi/processes/camera.py b/sashimi/processes/camera.py index 809888a4..186fea29 100644 --- a/sashimi/processes/camera.py +++ b/sashimi/processes/camera.py @@ -178,7 +178,6 @@ def camera_loop(self): # if no frames are received (either this loop is in between frames # or we are in the waining period) if frames: - for frame in frames: self.logger.log_message( "received frame of shape " + str(frame.shape) diff --git a/sashimi/processes/streaming_save.py b/sashimi/processes/streaming_save.py index 6cdb59e3..f1dc89dd 100644 --- a/sashimi/processes/streaming_save.py +++ b/sashimi/processes/streaming_save.py @@ -28,6 +28,7 @@ class SavingParameters: notification_email: str = "None" volumerate: float = 1 voxel_size: tuple = (1, 1, 1) + crop: tuple = (0, 0, None, None) @dataclass @@ -175,8 +176,7 @@ def finalize_dataset(self): self.save_parameters.chunk_size, *self.current_data.shape[1:], ), - "crop_start": [0, 0, 0, 0], - "crop_end": [0, 0, 0, 0], + "crop": self.save_parameters.crop, # order of params here is [hpos, vpos, hsize, vsize,] "padding": [0, 0, 0, 0], "voxel_size": self.save_parameters.voxel_size, }, diff --git a/sashimi/state.py b/sashimi/state.py index fd72b3cc..71738cda 100644 --- a/sashimi/state.py +++ b/sashimi/state.py @@ -228,7 +228,6 @@ def get_voxel_size( scanning_settings: Union[ZRecordingSettings, SinglePlaneSettings], camera_settings: CameraSettings, ): - binning = int(camera_settings.binning) if isinstance(scanning_settings, SinglePlaneSettings): @@ -266,6 +265,9 @@ def convert_save_params( notification_email=str(save_settings.notification_email), volumerate=scanning_settings.frequency, voxel_size=get_voxel_size(scanning_settings, camera_settings), + crop=[ + int(item) for item in camera_settings.roi + ], # int conversion makes it json serializable ) @@ -669,7 +671,6 @@ def obtain_noise_average(self, n_images=50): self.dispatcher.calibration_ref_queue.put(self.calibration_ref) def reset_noise_subtraction(self): - self.calibration_ref = None self.noise_subtraction_active.clear()