-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_calibration_docs.py
More file actions
46 lines (41 loc) · 1.25 KB
/
start_calibration_docs.py
File metadata and controls
46 lines (41 loc) · 1.25 KB
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
37
38
39
40
41
42
43
44
45
46
import logging
# import os
# import sys
# from time import sleep
#
# if __name__ == "__main__":
# os.environ.setdefault("EXPERIMENTOR_SETTINGS_MODULE", "calibration_settings")
#
# this_dir = os.path.abspath(os.path.dirname(__file__))
# sys.path.append(this_dir)
#
# from experimentor.core.app import ExperimentApp
#
# app = ExperimentApp(gui=True, logger=logging.INFO)
#
# while app.is_running:
# sleep(1)
# app.finalize()
import sys
import time
import yaml
from PyQt5.QtWidgets import QApplication
from calibration.models.experiment import CalibrationSetup
from calibration.view.fiber_window import FiberWindow
from calibration.view.microscope_window import MicroscopeWindow
from calibration.view.testing_docks import MainWindow
from experimentor.lib.log import log_to_screen, get_logger
if __name__ == "__main__":
logger = get_logger()
handler = log_to_screen(logger=logger)
experiment = CalibrationSetup()
experiment.load_configuration('dispertech.yml', yaml.UnsafeLoader)
executor = experiment.initialize()
while executor.running():
time.sleep(.1)
app = QApplication([])
mw = MainWindow(experiment=experiment, parent=None)
mw.show()
app.exec()
experiment.finalize()
sys.exit()