Skip to content
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

953 confocal projection cleanup #955

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/navigate/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,6 @@ def verify_experiment_config(manager, configuration):
"end_focus": 0.0,
"abs_z_start": 0.0,
"abs_z_end": 100.0,
"scanrange": 500.0,
"n_plane": 1.0,
"offset_start": 0.0,
"offset_end": 9.8,
"conpro_cycling_mode": "per_stack",
"waveform_template": "Default",
}
if (
Expand Down
5 changes: 0 additions & 5 deletions src/navigate/config/experiment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ MicroscopeState:
end_focus: 0.0
abs_z_start: 0.0
abs_z_end: 200.0
scanrange: 500.0
n_plane: 1
offset_start: 0.0
offset_end: 10.0
conpro_cycling_mode: Per Stack
waveform_template: Default
MultiPositions:
[[15000.0,12000.0,15500.0,0.0,70000.0], [35000.0,42000.0,15500.0,0.0,70000.0]]
2 changes: 0 additions & 2 deletions src/navigate/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ def update_experiment_setting(self):
channel_warning = self.channels_tab_controller.verify_experiment_values()
if channel_warning:
return channel_warning
if self.configuration["experiment"]["MicroscopeState"]["scanrange"] == 0:
return "Scan range shouldn't be 0!"
return ""

def resize(self, event):
Expand Down
5 changes: 0 additions & 5 deletions src/navigate/controller/sub_controllers/channels_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,6 @@ def populate_experiment_values(self):
if self.microscope_state_dict["stack_cycling_mode"] == "per_z"
else "Per Stack"
)
if self.microscope_state_dict["conpro_cycling_mode"] not in [
"per_plane",
"per_stack",
]:
self.microscope_state_dict["conpro_cycling_mode"] = "per_plane"
self.channel_setting_controller.populate_experiment_values(
self.microscope_state_dict["channels"]
)
Expand Down
1 change: 1 addition & 0 deletions src/navigate/controller/sub_controllers/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def load_plugins(self):
f"Plugin {plugin_name} needs to be uninstalled from "
f"navigate or reinstalled!"
)
continue
plugin_controller = getattr(
plugin_controller_module, f"{plugin_class_name}Controller"
)
Expand Down
5 changes: 1 addition & 4 deletions src/navigate/model/metadata_sources/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,7 @@ def set_stack_order_from_configuration_experiment(self) -> None:
state = self.configuration["experiment"]["MicroscopeState"]
self._per_stack = (
state["stack_cycling_mode"] == "per_stack"
and state["image_mode"] == "z-stack"
) or (
state["conpro_cycling_mode"] == "per_stack"
and state["image_mode"] == "confocal-projection"
and state["image_mode"] != "single"
)

@property
Expand Down
8 changes: 0 additions & 8 deletions src/navigate/model/microscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,6 @@ def prepare_acquisition(self):
def end_acquisition(self):
"""End the acquisition."""
self.daq.stop_acquisition()
# set NI Galvo stage to normal stage mode
if (
self.configuration["experiment"]["MicroscopeState"]["image_mode"]
== "confocal-projection"
):
for stage, _ in self.stages_list:
if type(stage).__name__ == "GalvoNIStage":
stage.switch_mode("normal")
self.stop_stage()
if self.central_focus is not None:
self.move_stage({"f_abs": self.central_focus})
Expand Down
9 changes: 0 additions & 9 deletions test/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,6 @@ def setUp(self):
"end_focus": 0.0,
"abs_z_start": 0.0,
"abs_z_end": 100.0,
"scanrange": 500.0,
"n_plane": 1.0,
"offset_start": 0.0,
"offset_end": 9.8,
"conpro_cycling_mode": "per_stack",
"waveform_template": "Default",
}

Expand Down Expand Up @@ -641,10 +636,6 @@ def test_load_experiment_file_with_wrong_parameter_values(self):
"end_focus",
"abs_z_start",
"abs_z_end",
"scanrange",
"n_plane",
"offset_start",
"offset_end",
]:
experiment["MicroscopeState"][k] = "nonsense_value"
config.verify_experiment_config(self.manager, configuration)
Expand Down
5 changes: 0 additions & 5 deletions test/config/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ def test_microscope_state(self):
"end_focus": float,
"abs_z_start": float,
"abs_z_end": float,
"scanrange": float,
"n_plane": int,
"offset_start": float,
"offset_end": float,
"conpro_cycling_mode": str,
"waveform_template": str,
}

Expand Down
4 changes: 3 additions & 1 deletion test/model/metadata_sources/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_metadata_shape(dummy_model):
"image_mode",
[
"single",
"live",
"Confocal Projection",
"z-stack",
],
)
Expand All @@ -90,5 +90,7 @@ def test_metadata_set_stack_order_from_configuration_experiment(

if image_mode == "z-stack" and stack_cycling_mode == "per_stack":
assert md._per_stack is True
elif image_mode == "Confocal Projection" and stack_cycling_mode == "per_stack":
assert md._per_stack is True
else:
assert md._per_stack is False
Loading