Skip to content

restore the sheet after a SCAPE run - #581

Open
jseguiguren wants to merge 1 commit into
micro-manager:mainfrom
jseguiguren:restore-sheet-upstream
Open

jseguiguren wants to merge 1 commit into
micro-manager:mainfrom
jseguiguren:restore-sheet-upstream

Conversation

@jseguiguren

Copy link
Copy Markdown
Collaborator

prepareControllerForAcquisition turns IllumSlice's beam off, which parks the galvo at its upper limits (B at 4 deg), and nothing turned it back on. The Sheet box stayed ticked until the Setup Path tab was opened again. Remember whether the beam was on before the run and turn it back on in finish(), after the SPIM state machines are idle, so the adapter returns the galvo to the position it saved when the beam went off.

Tested on a SCAPE rig (Tiger Scanner:AB:33, MMCore 12.5.1, built on 1fe6c1b). The debug CoreLog shows BeamEnabled=No with ! A B at each run start, then BeamEnabled=Yes from the acquisition thread before LSM-ACQ-STOP, returning to the same A/B. This held for:

  • a run started from the LSM window;
  • a run started through the API (pycromanager);
  • a run stopped part-way.

Runs refused in setup() never turn the beam off and are left alone. No axis position is written by LSM: the adapter returns to the position it read from the card.

prepareControllerForAcquisition turns IllumSlice's beam off, which parks the
galvo at its upper limits (B at 4 deg), and nothing turned it back on. The
Sheet box stayed ticked until the Setup Path tab was opened again. Remember
whether the beam was on before the run and turn it back on in finish(), after
the SPIM state machines are idle, so the adapter returns the galvo to the
position it saved when the beam went off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 16:19
@jseguiguren

Copy link
Copy Markdown
Collaborator Author

The "Try to compile with maven" check fails before compiling: lib/MMJ_.jar (pom.xml line 93) isn't in the repository and the workflow doesn't provide it, so dependency resolution stops (same on any PR).

On my side, the change builds with mvn clean package on JDK 11 with MMJ_.jar from Micro-Manager 2.0.3 20261103, and runs on our SCAPE.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jondaniels

Copy link
Copy Markdown
Collaborator

This reveals something that needs to be fixed but it should be fixed in a different way. I just talked with Brian and Brandon about this.

The plugin moves the galvo to its home position which is the desired behavior. The undesired bit is that the home position is ever set to the extreme of travel (a hold over from diSPIM).

The firmware's default home position should be 0 in the future.

The home position for the "slice axis" (A) should be set when you change the galvo offset on the "Setup Path" panel. This number is usually changed during alignment. It is possible that the current code makes the assumption that the user changes it at some point. But in normal operation this number will be changed during alignment and the home position updated.

The home position for the "scan axis" (B) should always be set to 0 for SCAPE. I don't think the plugin does this currently (it has historically been done during the alignment procedure but we shouldn't rely on that). This needs to be fixed.

As a short-term work-around @jseguiguren please send the serial command "HM B=0"

Related but different, we also noted that we should ensure that the SAO value for the B axis should always be 0 and that in the SCAPE context the piezo offset should only be allowed to be updated when the slice position (B axis) is at 0.

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.

3 participants