Skip to content

Modified for running in Linux and New stage driver #1045

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

SJShep
Copy link
Contributor

@SJShep SJShep commented Dec 13, 2024

Made changes for running Navigate in Ubuntu 22.04 and added a stage driver for the KST101 in Linux.
There are also some changes scattered in to the the tiling, stage and NI related functions that are specific to either Linux or our setup. For example, we made some bad changes to hard code the direction of the focus stage. For these changes a long term solution is needed. Another example is in the NI daq code, the register_done_event function throws an error. The changes should be well commented.

… communicate via serial to the FTDI chip in Linux. Minor change to loading Photometrics camera.
…n a bug where stopping or starting an acquisition moves the F stage.
…n DAQ, changes should be kept local, however a solution for stage directions should be made.
@SJShep SJShep changed the title Modified for running in Linux Modified for running in Linux and New stage driver Dec 13, 2024
@@ -266,26 +266,19 @@ def set_table(self):
y_stop = float(self.variables["y_end"].get())
y_tiles = int(self.variables["y_tiles"].get())

# NOTE: Removed shifting by the origin becuase, it was not clear how to set the origin.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss this. I'm hesitant to make the change immediately, but we can consider a better way to communicate the origin.

@@ -511,8 +511,18 @@ def load_stages(
exception=TLFTDICommunicationError,
)
)

elif stage_type == "KST101":
elif stage_type == "KINESIS" and platform.system() == "Linux":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now obsolete with the latest PR.

@@ -705,7 +711,10 @@ def start_stage(
from navigate.model.devices.stages.tl_kcube_inertial import TLKIMStage

return TLKIMStage(microscope_name, device_connection, configuration, id)

elif device_type == "KINESIS":
Copy link
Collaborator

@AdvancedImagingUTSW AdvancedImagingUTSW Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This device should also be added to the configuration wizard.

# camera_names = Camera.get_available_camera_names()
camera_to_open = Camera.select_camera(camera_connection)
camera_names = Camera.get_available_camera_names()
camera_to_open = Camera.select_camera(camera_names[0])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this assume only one camera?

@@ -172,12 +172,14 @@ def set_external_trigger(self, external_trigger=None) -> None:
self.analog_output_tasks[
board_name
].triggers.start_trigger.cfg_dig_edge_start_trig(trigger_source)
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it was throwing an error, but handled with a try/except statement, why did you have to remove it?

@@ -988,10 +988,10 @@ def pre_signal_func(self):
self.z_stack_distance = abs(
self.start_z_position - float(microscope_state["end_position"])
)

# NOTE: added a quick fix for the focus stage moving in a negative direction during z-stack acquisitions. Somehow a negative step needs to be allowed. Flipping the axes direction did not have the desired outcome.
self.start_focus = float(microscope_state["start_focus"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you set the set z/f start position and z/f end position, it can't automatically sweep in the negative direction? If not, that seems like we should fix the logic immediately after those event calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants