-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMicroscope_app.py
73 lines (59 loc) · 2.65 KB
/
Microscope_app.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from ScopeFoundry import BaseMicroscopeApp
class MicroscopeApp(BaseMicroscopeApp):
# this is the name of the microscope that ScopeFoundry uses
# when storing data
name = 'microscope'
# You must define a setup function that adds all the
#capablities of the microscope and sets default settings
def setup(self):
#Add Hardware components
from HW_OceanOptics.OceanOptics_hardware import OceanOpticsHW
self.add_hardware(OceanOpticsHW(self))
from HW_PI_PiezoStage.PiezoStage_hardware import PiezoStageHW
self.add_hardware(PiezoStageHW(self))
from HW_Picoharp.picoharp import PicoHarpHW
self.add_hardware(PicoHarpHW(self))
from HW_StepperMotor.StepperMotor_hardware import StepperMotorHW
self.add_hardware(StepperMotorHW(self))
from HW_APD_StepperMotor.APD_StepperMotor_hardware import APDStepperMotorHW
self.add_hardware(APDStepperMotorHW(self))
#Add Measurement components
from HW_OceanOptics.OceanOptics_measurement import OceanOpticsMeasure
self.add_measurement(OceanOpticsMeasure(self))
from HW_OceanOptics.OceanOptics_Scan import OceanOptics_Scan
self.add_measurement(OceanOptics_Scan)
from HW_Picoharp.picoharp_countrate_measure import PicoHarpCountrateMeasure
self.add_measurement(PicoHarpCountrateMeasure)
from HW_Picoharp.picoharp_hist_measure import PicoHarpHistogramMeasure
self.add_measurement(PicoHarpHistogramMeasure)
from HW_Picoharp.picoharp_scan import PicoHarp_Scan
self.add_measurement(PicoHarp_Scan)
from HW_PI_PiezoStage.PiezoStage_independent_movement import PiezoStageIndependentMovement
self.add_measurement(PiezoStageIndependentMovement)
from HW_PI_PiezoStage.PiezoStage_control import PiezoStageControl
self.add_measurement(PiezoStageControl)
from HW_PI_PiezoStage.particle_selection import ParticleSelection
self.add_measurement(ParticleSelection)
from HW_OceanOptics.particle_spectra import ParticleSpectra
self.add_measurement(ParticleSpectra)
from HW_OceanOptics.OceanOpticsStepperMotor_Scan import OceanOpticsStepperMotor_Scan
self.add_measurement(OceanOpticsStepperMotor_Scan)
from HW_StepperMotor.StepperMotor_control import StepperMotorControl
self.add_measurement(StepperMotorControl)
from HW_Picoharp.picoharp_apd_scan import PicoHarp_APD_Scan
self.add_measurement(PicoHarp_APD_Scan)
# show ui
self.ui.show()
self.ui.activateWindow()
def on_close(self): #temp fix for properly closing the additional imageview window
BaseMicroscopeApp.on_close(self)
try:
oo_scan = self.measurements["OceanOptics_Scan"]
oo_scan.imv.close()
oo_scan.graph_layout.close()
except:
pass
if __name__ == '__main__':
import sys
app = MicroscopeApp(sys.argv)
sys.exit(app.exec_())