-
Notifications
You must be signed in to change notification settings - Fork 5
Migrate to pymmcore plus #171
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
Migrate to pymmcore plus #171
Conversation
…on steps fail, cleanup_daq() is called, which then throws another exception if these aren't initialized.
…id in pymmcore-plus
| mmc.run_mda(mda) | ||
| mmc.waitForAcquisition() |
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.
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.
…denoting other cleanup that needs to be done)
… misspelled anyway)
Status 05/12/25TLDR
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. |
|
Closing this PR as I've created a duplicate with a different source branch at #177 |
This PR is to address issue #170 .