forked from pymmcore-plus/napari-micromanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch-dev.py
36 lines (29 loc) · 1.1 KB
/
launch-dev.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Launch application
useful place to call other startup commands that don't want hardcoded in plugin
"""
from pathlib import Path
import napari
# initialize mre2 mirror
from mcsim.expt_ctrl.setup_optotune_mre2 import initialize_mre2
initialize_mre2()
# launch viewer
v = napari.Viewer()
dw, main_window = v.window.add_plugin_dock_widget("micromanager")
# set default configurations
root_dir = Path(r"C:/Users/q2ilab/Documents/mcsim_private/mcSIM/mcsim/expt_ctrl")
main_window.load_cfg("MM config", str(root_dir / "sim_odt_nidaq_c1.cfg"))
# main_window.load_cfg("Cam 2", str(root_dir / "sim_odt_nidaq_c2.cfg"))
# main_window.load_cfg("Cam 2", str(root_dir / "blackfly_flir_cam.cfg"))
main_window.load_cfg("DMD", str(root_dir / "dmd_config.zarr"))
main_window.load_cfg("DMD 2", str(root_dir / "dmd2_config.zarr"))
main_window.load_cfg("microscope", str(root_dir / "config.json"))
# grab devices
mmc1, mmc2 = main_window._mmcores
dmd = main_window.dmd
dmd2 = main_window.dmd2
daq = main_window.daq
phcam = main_window.phcam
pk_track = main_window.peak_tracker_widget
sim_odt_widget = main_window.sim_odt_acq
napari.run()