Using with napari-micromanager#
Launching napari from a script#
For complex scripting you likely will want to launch napari from a script or a jupyter notebook.
from pymmcore_plus import CMMCorePlus import napari v = napari.Viewer() dw, main_window = v.window.add_plugin_dock_widget("napari-micromanager") mmc = CMMCorePlus.instance() # do any complicated scripting you want here ... # start napari napari.run()
Using the integrated napari terminal#
After launching napari and starting the
napari-micromanager plugin you can open the napari terminal and get a reference to the same core object that the plugin uses by running:
from pymmcore_plus import CMMCorePlus mmc = CMMCorePlus.instance()