Skip to content

Conversation

@jeskesen
Copy link
Collaborator

This PR is to address issue #170 .

Comment on lines +854 to +855
mmc.run_mda(mda)
mmc.waitForAcquisition()

Choose a reason for hiding this comment

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

quick note: mmc.run_mda is a convenience method for starting a thread and calling mmc.mda.run in that thread. If you just want to block immediately and wait, you can call mmc.mda.run(mda) directly and avoid the thread altogether.

@ieivanov ieivanov linked an issue May 13, 2025 that may be closed by this pull request
@jeskesen
Copy link
Collaborator Author

jeskesen commented May 13, 2025

Status 05/12/25

TLDR

  • acquisition engine runs on pymmcore_plus using demo config
  • file output is handled using acquire-zarr directly (no position handling yet).

Detail

As has been noted before, I'm trying to make the port as minimally invasive as I can. Thus, where possible, have just tried to use analogous data structures between pycromanager & pymmcore_plus. The main data structure conversions are:

The above handled most of the engine but there were a couple of modifications that needed to be made: both related to the looping structure, where the outer time & position loops are handled by ShrimPy, while the inner channel & z loops are handled by the engine, which allows autofocus and autoexposure to happen at each new position.

Previously, a copy of the acquisition_event instance was made and the copy was then modified to have the correct indices. That couldn't be exactly replicated using pymmcore-plus because MDAEvent inherits from a read-only class. To get around this, I took advantage of the fact that one can use a list of MDA Events as if it were a MDASequence, so I simply regenerate the sequence by iterating over it, and appending a new object to a list created with modified constructor args.

@jeskesen
Copy link
Collaborator Author

Closing this PR as I've created a duplicate with a different source branch at #177

@jeskesen jeskesen closed this May 13, 2025
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.

Migrate acquisition engine from Pycro-Manager to pymmcore-plus

2 participants