-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Acquisition Rate of planar mode is not used #145
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
from lightparam.param_qt import ParametrizedQt | ||
from lightparam import Param, ParameterTree | ||
from sashimi.hardware.light_source import light_source_class_dict | ||
from typing import Union | ||
|
||
# from sashimi.hardware import light_source_class_dict | ||
from sashimi.processes.scanning import ScannerProcess | ||
|
@@ -224,16 +225,20 @@ def calculate_calibration(self): | |
|
||
|
||
def get_voxel_size( | ||
scanning_settings: ZRecordingSettings, | ||
scanning_settings: Union[ZRecordingSettings, SinglePlaneSettings], | ||
camera_settings: CameraSettings, | ||
): | ||
scan_length = ( | ||
scanning_settings.piezo_scan_range[1] - scanning_settings.piezo_scan_range[0] | ||
) | ||
|
||
binning = int(camera_settings.binning) | ||
|
||
inter_plane = scan_length / scanning_settings.n_planes | ||
if isinstance(scanning_settings, SinglePlaneSettings): | ||
inter_plane = 1 | ||
else: | ||
scan_length = ( | ||
scanning_settings.piezo_scan_range[1] | ||
- scanning_settings.piezo_scan_range[0] | ||
) | ||
inter_plane = scan_length / scanning_settings.n_planes | ||
|
||
return ( | ||
inter_plane, | ||
|
@@ -244,13 +249,16 @@ def get_voxel_size( | |
|
||
def convert_save_params( | ||
save_settings: SaveSettings, | ||
scanning_settings: ZRecordingSettings, | ||
scanning_settings: Union[ZRecordingSettings, SinglePlaneSettings], | ||
camera_settings: CameraSettings, | ||
trigger_settings: TriggerSettings, | ||
): | ||
n_planes = scanning_settings.n_planes - ( | ||
scanning_settings.n_skip_start + scanning_settings.n_skip_end | ||
) | ||
if isinstance(scanning_settings, SinglePlaneSettings): | ||
n_planes = 0 | ||
else: | ||
n_planes = scanning_settings.n_planes - ( | ||
scanning_settings.n_skip_start + scanning_settings.n_skip_end | ||
) | ||
Comment on lines
-251
to
+261
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inside |
||
|
||
return SavingParameters( | ||
output_dir=Path(save_settings.save_dir), | ||
|
@@ -472,12 +480,21 @@ def n_planes(self): | |
|
||
@property | ||
def save_params(self): | ||
return convert_save_params( | ||
self.save_settings, | ||
self.volume_setting, | ||
self.camera_settings, | ||
self.trigger_settings, | ||
) | ||
if self.global_state == GlobalState.PLANAR_PREVIEW: | ||
save_p = convert_save_params( | ||
self.save_settings, | ||
self.single_plane_settings, | ||
self.camera_settings, | ||
self.trigger_settings, | ||
) | ||
else: | ||
save_p = convert_save_params( | ||
self.save_settings, | ||
self.volume_setting, | ||
self.camera_settings, | ||
self.trigger_settings, | ||
) | ||
return save_p | ||
Comment on lines
+483
to
+497
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. inside |
||
|
||
@property | ||
def scan_params(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inside
get_voxel_size
:checks if the scanning_settings are single_plane_settings and if so sets the z_voxel size to 1