cgse 2024.7.0__py3-none-any.whl → 2025.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- README.md +27 -0
- bump.py +85 -0
- cgse-2025.0.2.dist-info/METADATA +38 -0
- cgse-2025.0.2.dist-info/RECORD +5 -0
- {cgse-2024.7.0.dist-info → cgse-2025.0.2.dist-info}/WHEEL +1 -2
- cgse-2024.7.0.dist-info/COPYING +0 -674
- cgse-2024.7.0.dist-info/COPYING.LESSER +0 -165
- cgse-2024.7.0.dist-info/METADATA +0 -144
- cgse-2024.7.0.dist-info/RECORD +0 -660
- cgse-2024.7.0.dist-info/entry_points.txt +0 -75
- cgse-2024.7.0.dist-info/top_level.txt +0 -2
- egse/__init__.py +0 -12
- egse/__main__.py +0 -32
- egse/aeu/aeu.py +0 -5238
- egse/aeu/aeu_awg.yaml +0 -265
- egse/aeu/aeu_crio.yaml +0 -273
- egse/aeu/aeu_cs.py +0 -627
- egse/aeu/aeu_devif.py +0 -321
- egse/aeu/aeu_main_ui.py +0 -903
- egse/aeu/aeu_metrics.py +0 -131
- egse/aeu/aeu_protocol.py +0 -463
- egse/aeu/aeu_psu.yaml +0 -204
- egse/aeu/aeu_ui.py +0 -873
- egse/aeu/arbdata/FccdRead.arb +0 -2
- egse/aeu/arbdata/FccdRead_min_points.arb +0 -2
- egse/aeu/arbdata/HeaterSync_FccdRead.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead25.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead31_25.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead37_50.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead43_75.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead50.arb +0 -2
- egse/aeu/arbdata/Heater_FccdRead_min_points.arb +0 -2
- egse/aeu/arbdata/ccdRead25.arb +0 -2
- egse/aeu/arbdata/ccdRead25_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead31_25.arb +0 -2
- egse/aeu/arbdata/ccdRead31_25_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead37_50.arb +0 -2
- egse/aeu/arbdata/ccdRead37_50_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead43_75.arb +0 -2
- egse/aeu/arbdata/ccdRead43_75_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead50.arb +0 -2
- egse/aeu/arbdata/ccdRead50_150ms.arb +0 -2
- egse/alert/__init__.py +0 -1049
- egse/alert/alertman.yaml +0 -37
- egse/alert/alertman_cs.py +0 -233
- egse/alert/alertman_ui.py +0 -600
- egse/alert/gsm/beaglebone.py +0 -138
- egse/alert/gsm/beaglebone.yaml +0 -51
- egse/alert/gsm/beaglebone_cs.py +0 -108
- egse/alert/gsm/beaglebone_devif.py +0 -122
- egse/alert/gsm/beaglebone_protocol.py +0 -46
- egse/bits.py +0 -318
- egse/camera.py +0 -44
- egse/collimator/__init__.py +0 -0
- egse/collimator/fcul/__init__.py +0 -0
- egse/collimator/fcul/ogse.py +0 -1077
- egse/collimator/fcul/ogse.yaml +0 -14
- egse/collimator/fcul/ogse_cs.py +0 -154
- egse/collimator/fcul/ogse_devif.py +0 -358
- egse/collimator/fcul/ogse_protocol.py +0 -132
- egse/collimator/fcul/ogse_sim.py +0 -431
- egse/collimator/fcul/ogse_ui.py +0 -1108
- egse/command.py +0 -699
- egse/config.py +0 -410
- egse/confman/__init__.py +0 -1058
- egse/confman/confman.yaml +0 -70
- egse/confman/confman_cs.py +0 -240
- egse/confman/confman_ui.py +0 -381
- egse/confman/setup_ui.py +0 -565
- egse/control.py +0 -632
- egse/coordinates/__init__.py +0 -534
- egse/coordinates/avoidance.py +0 -100
- egse/coordinates/cslmodel.py +0 -127
- egse/coordinates/laser_tracker_to_dict.py +0 -122
- egse/coordinates/point.py +0 -707
- egse/coordinates/pyplot.py +0 -194
- egse/coordinates/referenceFrame.py +0 -1279
- egse/coordinates/refmodel.py +0 -737
- egse/coordinates/rotationMatrix.py +0 -85
- egse/coordinates/transform3d_addon.py +0 -419
- egse/csl/__init__.py +0 -50
- egse/csl/commanding.py +0 -78
- egse/csl/icons/hexapod-connected-selected.svg +0 -30
- egse/csl/icons/hexapod-connected.svg +0 -30
- egse/csl/icons/hexapod-homing-selected.svg +0 -68
- egse/csl/icons/hexapod-homing.svg +0 -68
- egse/csl/icons/hexapod-retract-selected.svg +0 -56
- egse/csl/icons/hexapod-retract.svg +0 -51
- egse/csl/icons/hexapod-zero-selected.svg +0 -56
- egse/csl/icons/hexapod-zero.svg +0 -56
- egse/csl/icons/logo-puna.svg +0 -92
- egse/csl/icons/stop.svg +0 -1
- egse/csl/initialisation.py +0 -102
- egse/csl/mech_pos_settings.yaml +0 -18
- egse/das.py +0 -1240
- egse/das.yaml +0 -7
- egse/data/conf/SETUP_CSL_00000_170620_150000.yaml +0 -5
- egse/data/conf/SETUP_CSL_00001_170620_151010.yaml +0 -69
- egse/data/conf/SETUP_CSL_00002_170620_151020.yaml +0 -69
- egse/data/conf/SETUP_CSL_00003_170620_151030.yaml +0 -69
- egse/data/conf/SETUP_CSL_00004_170620_151040.yaml +0 -69
- egse/data/conf/SETUP_CSL_00005_170620_151050.yaml +0 -69
- egse/data/conf/SETUP_CSL_00006_170620_151060.yaml +0 -69
- egse/data/conf/SETUP_CSL_00007_170620_151070.yaml +0 -69
- egse/data/conf/SETUP_CSL_00008_170620_151080.yaml +0 -75
- egse/data/conf/SETUP_CSL_00010_210308_083016.yaml +0 -138
- egse/data/conf/SETUP_INTA_00000_170620_150000.yaml +0 -4
- egse/data/conf/SETUP_SRON_00000_170620_150000.yaml +0 -4
- egse/decorators.py +0 -514
- egse/device.py +0 -269
- egse/dpu/__init__.py +0 -2698
- egse/dpu/ccd_ui.py +0 -514
- egse/dpu/dpu.py +0 -783
- egse/dpu/dpu.yaml +0 -153
- egse/dpu/dpu_cs.py +0 -272
- egse/dpu/dpu_ui.py +0 -671
- egse/dpu/fitsgen.py +0 -2096
- egse/dpu/fitsgen_ui.py +0 -399
- egse/dpu/hdf5_model.py +0 -332
- egse/dpu/hdf5_ui.py +0 -277
- egse/dpu/hdf5_viewer.py +0 -506
- egse/dpu/hk_ui.py +0 -468
- egse/dpu_commands.py +0 -81
- egse/dsi/__init__.py +0 -33
- egse/dsi/_libesl.py +0 -232
- egse/dsi/constants.py +0 -296
- egse/dsi/esl.py +0 -630
- egse/dsi/rmap.py +0 -444
- egse/dsi/rmapci.py +0 -39
- egse/dsi/spw.py +0 -335
- egse/dsi/spw_state.py +0 -29
- egse/dummy.py +0 -318
- egse/dyndummy.py +0 -179
- egse/env.py +0 -278
- egse/exceptions.py +0 -88
- egse/fdir/__init__.py +0 -26
- egse/fdir/fdir_manager.py +0 -85
- egse/fdir/fdir_manager.yaml +0 -37
- egse/fdir/fdir_manager_controller.py +0 -136
- egse/fdir/fdir_manager_cs.py +0 -164
- egse/fdir/fdir_manager_interface.py +0 -15
- egse/fdir/fdir_remote.py +0 -73
- egse/fdir/fdir_remote.yaml +0 -30
- egse/fdir/fdir_remote_controller.py +0 -30
- egse/fdir/fdir_remote_cs.py +0 -94
- egse/fdir/fdir_remote_interface.py +0 -9
- egse/fdir/fdir_remote_popup.py +0 -26
- egse/fee/__init__.py +0 -106
- egse/fee/f_fee_register.yaml +0 -43
- egse/fee/feesim.py +0 -914
- egse/fee/n_fee_hk.py +0 -768
- egse/fee/nfee.py +0 -188
- egse/filterwheel/__init__.py +0 -4
- egse/filterwheel/eksma/__init__.py +0 -49
- egse/filterwheel/eksma/fw8smc4.py +0 -657
- egse/filterwheel/eksma/fw8smc4.yaml +0 -121
- egse/filterwheel/eksma/fw8smc4_cs.py +0 -144
- egse/filterwheel/eksma/fw8smc4_devif.py +0 -473
- egse/filterwheel/eksma/fw8smc4_protocol.py +0 -82
- egse/filterwheel/eksma/fw8smc4_ui.py +0 -940
- egse/filterwheel/eksma/fw8smc5.py +0 -115
- egse/filterwheel/eksma/fw8smc5.yaml +0 -105
- egse/filterwheel/eksma/fw8smc5_controller.py +0 -307
- egse/filterwheel/eksma/fw8smc5_cs.py +0 -141
- egse/filterwheel/eksma/fw8smc5_interface.py +0 -65
- egse/filterwheel/eksma/fw8smc5_simulator.py +0 -29
- egse/filterwheel/eksma/fw8smc5_ui.py +0 -1065
- egse/filterwheel/eksma/testpythonfw.py +0 -215
- egse/fov/__init__.py +0 -65
- egse/fov/fov_hk.py +0 -710
- egse/fov/fov_ui.py +0 -859
- egse/fov/fov_ui_controller.py +0 -140
- egse/fov/fov_ui_model.py +0 -200
- egse/fov/fov_ui_view.py +0 -345
- egse/gimbal/__init__.py +0 -32
- egse/gimbal/symetrie/__init__.py +0 -26
- egse/gimbal/symetrie/alpha.py +0 -586
- egse/gimbal/symetrie/generic_gimbal_ui.py +0 -1521
- egse/gimbal/symetrie/gimbal.py +0 -877
- egse/gimbal/symetrie/gimbal.yaml +0 -168
- egse/gimbal/symetrie/gimbal_cs.py +0 -183
- egse/gimbal/symetrie/gimbal_protocol.py +0 -138
- egse/gimbal/symetrie/gimbal_ui.py +0 -361
- egse/gimbal/symetrie/pmac.py +0 -1006
- egse/gimbal/symetrie/pmac_regex.py +0 -83
- egse/graph.py +0 -132
- egse/gui/__init__.py +0 -47
- egse/gui/buttons.py +0 -378
- egse/gui/focalplane.py +0 -1285
- egse/gui/formatter.py +0 -10
- egse/gui/led.py +0 -162
- egse/gui/limitswitch.py +0 -143
- egse/gui/mechanisms.py +0 -587
- egse/gui/states.py +0 -148
- egse/gui/stripchart.py +0 -729
- egse/gui/styles.qss +0 -48
- egse/gui/switch.py +0 -112
- egse/h5.py +0 -274
- egse/help/__init__.py +0 -0
- egse/help/help_ui.py +0 -126
- egse/hexapod/__init__.py +0 -32
- egse/hexapod/symetrie/__init__.py +0 -137
- egse/hexapod/symetrie/alpha.py +0 -874
- egse/hexapod/symetrie/dynalpha.py +0 -1387
- egse/hexapod/symetrie/hexapod_ui.py +0 -1516
- egse/hexapod/symetrie/pmac.py +0 -1010
- egse/hexapod/symetrie/pmac_regex.py +0 -83
- egse/hexapod/symetrie/puna.py +0 -1167
- egse/hexapod/symetrie/puna.yaml +0 -193
- egse/hexapod/symetrie/puna_cs.py +0 -195
- egse/hexapod/symetrie/puna_protocol.py +0 -134
- egse/hexapod/symetrie/puna_ui.py +0 -433
- egse/hexapod/symetrie/punaplus.py +0 -107
- egse/hexapod/symetrie/zonda.py +0 -872
- egse/hexapod/symetrie/zonda.yaml +0 -337
- egse/hexapod/symetrie/zonda_cs.py +0 -172
- egse/hexapod/symetrie/zonda_devif.py +0 -414
- egse/hexapod/symetrie/zonda_protocol.py +0 -123
- egse/hexapod/symetrie/zonda_ui.py +0 -449
- egse/hk.py +0 -791
- egse/icons/aeu-cs-start.svg +0 -117
- egse/icons/aeu-cs-stop.svg +0 -118
- egse/icons/aeu-cs.svg +0 -107
- egse/icons/aeu_cs-started.svg +0 -112
- egse/icons/aeu_cs-stopped.svg +0 -112
- egse/icons/aeu_cs.svg +0 -55
- egse/icons/alert.svg +0 -1
- egse/icons/arrow-double-left.png +0 -0
- egse/icons/arrow-double-right.png +0 -0
- egse/icons/arrow-up.svg +0 -11
- egse/icons/backward.svg +0 -1
- egse/icons/busy.svg +0 -1
- egse/icons/cleaning.svg +0 -115
- egse/icons/color-scheme.svg +0 -1
- egse/icons/cs-connected-alert.svg +0 -91
- egse/icons/cs-connected-disabled.svg +0 -43
- egse/icons/cs-connected.svg +0 -89
- egse/icons/cs-not-connected.svg +0 -44
- egse/icons/double-left-arrow.svg +0 -1
- egse/icons/double-right-arrow.svg +0 -1
- egse/icons/erase-disabled.svg +0 -19
- egse/icons/erase.svg +0 -59
- egse/icons/fitsgen-start.svg +0 -47
- egse/icons/fitsgen-stop.svg +0 -48
- egse/icons/fitsgen.svg +0 -1
- egse/icons/forward.svg +0 -1
- egse/icons/fov-hk-start.svg +0 -33
- egse/icons/fov-hk-stop.svg +0 -37
- egse/icons/fov-hk.svg +0 -1
- egse/icons/front-desk.svg +0 -1
- egse/icons/home-actioned.svg +0 -15
- egse/icons/home-disabled.svg +0 -15
- egse/icons/home.svg +0 -13
- egse/icons/info.svg +0 -1
- egse/icons/invalid.png +0 -0
- egse/icons/led-green.svg +0 -20
- egse/icons/led-grey.svg +0 -20
- egse/icons/led-orange.svg +0 -20
- egse/icons/led-red.svg +0 -20
- egse/icons/led-square-green.svg +0 -134
- egse/icons/led-square-grey.svg +0 -134
- egse/icons/led-square-orange.svg +0 -134
- egse/icons/led-square-red.svg +0 -134
- egse/icons/limit-switch-all-green.svg +0 -115
- egse/icons/limit-switch-all-red.svg +0 -117
- egse/icons/limit-switch-el+.svg +0 -116
- egse/icons/limit-switch-el-.svg +0 -117
- egse/icons/location-marker.svg +0 -1
- egse/icons/logo-dpu.svg +0 -48
- egse/icons/logo-gimbal.svg +0 -112
- egse/icons/logo-huber.svg +0 -23
- egse/icons/logo-ogse.svg +0 -31
- egse/icons/logo-puna.svg +0 -92
- egse/icons/logo-tcs.svg +0 -29
- egse/icons/logo-zonda.svg +0 -66
- egse/icons/maximize.svg +0 -1
- egse/icons/meter.svg +0 -1
- egse/icons/more.svg +0 -45
- egse/icons/n-fee-hk-start.svg +0 -24
- egse/icons/n-fee-hk-stop.svg +0 -25
- egse/icons/n-fee-hk.svg +0 -83
- egse/icons/observing-off.svg +0 -46
- egse/icons/observing-on.svg +0 -46
- egse/icons/open-document-hdf5.png +0 -0
- egse/icons/open-document-hdf5.svg +0 -21
- egse/icons/ops-mode.svg +0 -1
- egse/icons/play-green.svg +0 -17
- egse/icons/plugged-disabled.svg +0 -27
- egse/icons/plugged.svg +0 -21
- egse/icons/pm_ui.svg +0 -1
- egse/icons/power-button-green.svg +0 -27
- egse/icons/power-button-red.svg +0 -27
- egse/icons/power-button.svg +0 -27
- egse/icons/radar.svg +0 -1
- egse/icons/radioactive.svg +0 -2
- egse/icons/reload.svg +0 -1
- egse/icons/remote-control-off.svg +0 -28
- egse/icons/remote-control-on.svg +0 -28
- egse/icons/repeat-blue.svg +0 -15
- egse/icons/repeat.svg +0 -1
- egse/icons/settings.svg +0 -1
- egse/icons/shrink.svg +0 -1
- egse/icons/shutter.svg +0 -1
- egse/icons/sign-off.svg +0 -1
- egse/icons/sign-on.svg +0 -1
- egse/icons/sim-mode.svg +0 -1
- egse/icons/small-buttons-go.svg +0 -20
- egse/icons/small-buttons-minus.svg +0 -51
- egse/icons/small-buttons-plus.svg +0 -51
- egse/icons/sponge.svg +0 -220
- egse/icons/start-button-disabled.svg +0 -84
- egse/icons/start-button.svg +0 -50
- egse/icons/stop-button-disabled.svg +0 -84
- egse/icons/stop-button.svg +0 -50
- egse/icons/stop-red.svg +0 -17
- egse/icons/stop.svg +0 -1
- egse/icons/switch-disabled-square.svg +0 -87
- egse/icons/switch-disabled.svg +0 -15
- egse/icons/switch-off-square.svg +0 -87
- egse/icons/switch-off.svg +0 -72
- egse/icons/switch-on-square.svg +0 -87
- egse/icons/switch-on.svg +0 -61
- egse/icons/temperature-control.svg +0 -44
- egse/icons/th_ui_logo.svg +0 -1
- egse/icons/unplugged.svg +0 -23
- egse/icons/unvalid.png +0 -0
- egse/icons/user-interface.svg +0 -1
- egse/icons/vacuum.svg +0 -1
- egse/icons/valid.png +0 -0
- egse/icons/zoom-to-pixel-dark.svg +0 -64
- egse/icons/zoom-to-pixel-white.svg +0 -36
- egse/images/big-rotation-stage.png +0 -0
- egse/images/connected-100.png +0 -0
- egse/images/cross.svg +0 -6
- egse/images/disconnected-100.png +0 -0
- egse/images/gui-icon.png +0 -0
- egse/images/home.svg +0 -6
- egse/images/info-icon.png +0 -0
- egse/images/led-black.svg +0 -89
- egse/images/led-green.svg +0 -85
- egse/images/led-orange.svg +0 -85
- egse/images/led-red.svg +0 -85
- egse/images/load-icon.png +0 -0
- egse/images/load-setup.png +0 -0
- egse/images/load.png +0 -0
- egse/images/pause.png +0 -0
- egse/images/play-button.svg +0 -8
- egse/images/play.png +0 -0
- egse/images/process-status.png +0 -0
- egse/images/restart.png +0 -0
- egse/images/search.png +0 -0
- egse/images/sma.png +0 -0
- egse/images/start.png +0 -0
- egse/images/stop-button.svg +0 -8
- egse/images/stop.png +0 -0
- egse/images/switch-off.svg +0 -48
- egse/images/switch-on.svg +0 -48
- egse/images/undo.png +0 -0
- egse/images/update-button.svg +0 -11
- egse/imageviewer/exposureselection.py +0 -475
- egse/imageviewer/imageviewer.py +0 -198
- egse/imageviewer/matchfocalplane.py +0 -179
- egse/imageviewer/subfieldposition.py +0 -133
- egse/lampcontrol/__init__.py +0 -4
- egse/lampcontrol/beaglebone/beaglebone.py +0 -178
- egse/lampcontrol/beaglebone/beaglebone.yaml +0 -62
- egse/lampcontrol/beaglebone/beaglebone_cs.py +0 -106
- egse/lampcontrol/beaglebone/beaglebone_devif.py +0 -150
- egse/lampcontrol/beaglebone/beaglebone_protocol.py +0 -73
- egse/lampcontrol/energetiq/__init__.py +0 -22
- egse/lampcontrol/energetiq/eq99.yaml +0 -98
- egse/lampcontrol/energetiq/lampEQ99.py +0 -283
- egse/lampcontrol/energetiq/lampEQ99_cs.py +0 -128
- egse/lampcontrol/energetiq/lampEQ99_devif.py +0 -158
- egse/lampcontrol/energetiq/lampEQ99_encode_decode_errors.py +0 -73
- egse/lampcontrol/energetiq/lampEQ99_protocol.py +0 -71
- egse/lampcontrol/energetiq/lampEQ99_ui.py +0 -465
- egse/lib/CentOS-7/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/CentOS-8/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/CentOS-8/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/Debian/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/Debian/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/Debian/libetherspacelink_v35_21.dylib +0 -0
- egse/lib/Linux/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/Linux/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/Ubuntu-20/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/Ubuntu-20/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/gssw/python3-gssw_2.2.3+31f63c9f-1_all.deb +0 -0
- egse/lib/ximc/__pycache__/pyximc.cpython-38 2.pyc +0 -0
- egse/lib/ximc/__pycache__/pyximc.cpython-38.pyc +0 -0
- egse/lib/ximc/libximc.framework/Frameworks/libbindy.dylib +0 -0
- egse/lib/ximc/libximc.framework/Frameworks/libxiwrapper.dylib +0 -0
- egse/lib/ximc/libximc.framework/Headers/ximc.h +0 -5510
- egse/lib/ximc/libximc.framework/Resources/Info.plist +0 -42
- egse/lib/ximc/libximc.framework/Resources/keyfile.sqlite +0 -0
- egse/lib/ximc/libximc.framework/libbindy.so +0 -0
- egse/lib/ximc/libximc.framework/libximc +0 -0
- egse/lib/ximc/libximc.framework/libximc.so +0 -0
- egse/lib/ximc/libximc.framework/libximc.so.7.0.0 +0 -0
- egse/lib/ximc/libximc.framework/libxiwrapper.so +0 -0
- egse/lib/ximc/pyximc.py +0 -922
- egse/listener.py +0 -179
- egse/logger/__init__.py +0 -243
- egse/logger/log_cs.py +0 -321
- egse/metrics.py +0 -102
- egse/mixin.py +0 -464
- egse/monitoring.py +0 -95
- egse/ni/alarms/__init__.py +0 -26
- egse/ni/alarms/cdaq9375.py +0 -300
- egse/ni/alarms/cdaq9375.yaml +0 -89
- egse/ni/alarms/cdaq9375_cs.py +0 -130
- egse/ni/alarms/cdaq9375_devif.py +0 -183
- egse/ni/alarms/cdaq9375_protocol.py +0 -48
- egse/obs_inspection.py +0 -165
- egse/observer.py +0 -41
- egse/obsid.py +0 -163
- egse/powermeter/__init__.py +0 -0
- egse/powermeter/ni/__init__.py +0 -38
- egse/powermeter/ni/cdaq9184.py +0 -224
- egse/powermeter/ni/cdaq9184.yaml +0 -73
- egse/powermeter/ni/cdaq9184_cs.py +0 -130
- egse/powermeter/ni/cdaq9184_devif.py +0 -201
- egse/powermeter/ni/cdaq9184_protocol.py +0 -48
- egse/powermeter/ni/cdaq9184_ui.py +0 -544
- egse/powermeter/thorlabs/__init__.py +0 -25
- egse/powermeter/thorlabs/pm100a.py +0 -380
- egse/powermeter/thorlabs/pm100a.yaml +0 -132
- egse/powermeter/thorlabs/pm100a_cs.py +0 -136
- egse/powermeter/thorlabs/pm100a_devif.py +0 -127
- egse/powermeter/thorlabs/pm100a_protocol.py +0 -80
- egse/powermeter/thorlabs/pm100a_ui.py +0 -725
- egse/process.py +0 -451
- egse/procman/__init__.py +0 -834
- egse/procman/cannot_start_process_popup.py +0 -43
- egse/procman/procman.yaml +0 -49
- egse/procman/procman_cs.py +0 -201
- egse/procman/procman_ui.py +0 -2081
- egse/protocol.py +0 -605
- egse/proxy.py +0 -531
- egse/randomwalk.py +0 -140
- egse/reg.py +0 -585
- egse/reload.py +0 -122
- egse/reprocess.py +0 -693
- egse/resource.py +0 -333
- egse/rmap.py +0 -406
- egse/rst.py +0 -135
- egse/search.py +0 -182
- egse/serialdevice.py +0 -190
- egse/services.py +0 -247
- egse/services.yaml +0 -68
- egse/settings.py +0 -379
- egse/settings.yaml +0 -980
- egse/setup.py +0 -1181
- egse/shutter/__init__.py +0 -0
- egse/shutter/thorlabs/__init__.py +0 -19
- egse/shutter/thorlabs/ksc101.py +0 -205
- egse/shutter/thorlabs/ksc101.yaml +0 -105
- egse/shutter/thorlabs/ksc101_cs.py +0 -136
- egse/shutter/thorlabs/ksc101_devif.py +0 -201
- egse/shutter/thorlabs/ksc101_protocol.py +0 -71
- egse/shutter/thorlabs/ksc101_ui.py +0 -548
- egse/shutter/thorlabs/sc10.py +0 -82
- egse/shutter/thorlabs/sc10.yaml +0 -52
- egse/shutter/thorlabs/sc10_controller.py +0 -81
- egse/shutter/thorlabs/sc10_cs.py +0 -108
- egse/shutter/thorlabs/sc10_interface.py +0 -25
- egse/shutter/thorlabs/sc10_simulator.py +0 -30
- egse/simulator.py +0 -41
- egse/slack.py +0 -61
- egse/socketdevice.py +0 -218
- egse/sockets.py +0 -218
- egse/spw.py +0 -1401
- egse/stages/__init__.py +0 -12
- egse/stages/aerotech/ensemble.py +0 -245
- egse/stages/aerotech/ensemble.yaml +0 -205
- egse/stages/aerotech/ensemble_controller.py +0 -275
- egse/stages/aerotech/ensemble_cs.py +0 -110
- egse/stages/aerotech/ensemble_interface.py +0 -132
- egse/stages/aerotech/ensemble_parameters.py +0 -433
- egse/stages/aerotech/ensemble_simulator.py +0 -27
- egse/stages/aerotech/mgse_sim.py +0 -188
- egse/stages/arun/smd3.py +0 -110
- egse/stages/arun/smd3.yaml +0 -68
- egse/stages/arun/smd3_controller.py +0 -470
- egse/stages/arun/smd3_cs.py +0 -112
- egse/stages/arun/smd3_interface.py +0 -53
- egse/stages/arun/smd3_simulator.py +0 -27
- egse/stages/arun/smd3_stop.py +0 -16
- egse/stages/huber/__init__.py +0 -49
- egse/stages/huber/smc9300.py +0 -920
- egse/stages/huber/smc9300.yaml +0 -63
- egse/stages/huber/smc9300_cs.py +0 -178
- egse/stages/huber/smc9300_devif.py +0 -345
- egse/stages/huber/smc9300_protocol.py +0 -113
- egse/stages/huber/smc9300_sim.py +0 -547
- egse/stages/huber/smc9300_ui.py +0 -973
- egse/state.py +0 -173
- egse/statemachine.py +0 -274
- egse/storage/__init__.py +0 -1067
- egse/storage/persistence.py +0 -2295
- egse/storage/storage.yaml +0 -79
- egse/storage/storage_cs.py +0 -231
- egse/styles/dark.qss +0 -343
- egse/styles/default.qss +0 -48
- egse/synoptics/__init__.py +0 -417
- egse/synoptics/syn.yaml +0 -9
- egse/synoptics/syn_cs.py +0 -195
- egse/system.py +0 -1611
- egse/tcs/__init__.py +0 -14
- egse/tcs/tcs.py +0 -879
- egse/tcs/tcs.yaml +0 -14
- egse/tcs/tcs_cs.py +0 -202
- egse/tcs/tcs_devif.py +0 -292
- egse/tcs/tcs_protocol.py +0 -180
- egse/tcs/tcs_sim.py +0 -177
- egse/tcs/tcs_ui.py +0 -543
- egse/tdms.py +0 -171
- egse/tempcontrol/__init__.py +0 -23
- egse/tempcontrol/agilent/agilent34970.py +0 -109
- egse/tempcontrol/agilent/agilent34970.yaml +0 -44
- egse/tempcontrol/agilent/agilent34970_cs.py +0 -114
- egse/tempcontrol/agilent/agilent34970_devif.py +0 -182
- egse/tempcontrol/agilent/agilent34970_protocol.py +0 -96
- egse/tempcontrol/agilent/agilent34972.py +0 -111
- egse/tempcontrol/agilent/agilent34972.yaml +0 -44
- egse/tempcontrol/agilent/agilent34972_cs.py +0 -115
- egse/tempcontrol/agilent/agilent34972_devif.py +0 -189
- egse/tempcontrol/agilent/agilent34972_protocol.py +0 -98
- egse/tempcontrol/beaglebone/beaglebone.py +0 -341
- egse/tempcontrol/beaglebone/beaglebone.yaml +0 -110
- egse/tempcontrol/beaglebone/beaglebone_cs.py +0 -117
- egse/tempcontrol/beaglebone/beaglebone_protocol.py +0 -134
- egse/tempcontrol/beaglebone/beaglebone_ui.py +0 -674
- egse/tempcontrol/digalox/digalox.py +0 -115
- egse/tempcontrol/digalox/digalox.yaml +0 -36
- egse/tempcontrol/digalox/digalox_cs.py +0 -108
- egse/tempcontrol/digalox/digalox_protocol.py +0 -56
- egse/tempcontrol/keithley/__init__.py +0 -33
- egse/tempcontrol/keithley/daq6510.py +0 -662
- egse/tempcontrol/keithley/daq6510.yaml +0 -105
- egse/tempcontrol/keithley/daq6510_cs.py +0 -163
- egse/tempcontrol/keithley/daq6510_devif.py +0 -343
- egse/tempcontrol/keithley/daq6510_protocol.py +0 -79
- egse/tempcontrol/keithley/daq6510_sim.py +0 -186
- egse/tempcontrol/lakeshore/__init__.py +0 -33
- egse/tempcontrol/lakeshore/lsci.py +0 -361
- egse/tempcontrol/lakeshore/lsci.yaml +0 -162
- egse/tempcontrol/lakeshore/lsci_cs.py +0 -174
- egse/tempcontrol/lakeshore/lsci_devif.py +0 -292
- egse/tempcontrol/lakeshore/lsci_protocol.py +0 -76
- egse/tempcontrol/lakeshore/lsci_ui.py +0 -387
- egse/tempcontrol/ni/__init__.py +0 -0
- egse/tempcontrol/spid/spid.py +0 -109
- egse/tempcontrol/spid/spid.yaml +0 -81
- egse/tempcontrol/spid/spid_controller.py +0 -279
- egse/tempcontrol/spid/spid_cs.py +0 -136
- egse/tempcontrol/spid/spid_protocol.py +0 -107
- egse/tempcontrol/spid/spid_ui.py +0 -723
- egse/tempcontrol/srs/__init__.py +0 -22
- egse/tempcontrol/srs/ptc10.py +0 -867
- egse/tempcontrol/srs/ptc10.yaml +0 -227
- egse/tempcontrol/srs/ptc10_cs.py +0 -128
- egse/tempcontrol/srs/ptc10_devif.py +0 -116
- egse/tempcontrol/srs/ptc10_protocol.py +0 -39
- egse/tempcontrol/srs/ptc10_ui.py +0 -906
- egse/ups/apc/apc.py +0 -236
- egse/ups/apc/apc.yaml +0 -45
- egse/ups/apc/apc_cs.py +0 -101
- egse/ups/apc/apc_protocol.py +0 -125
- egse/user.yaml +0 -7
- egse/vacuum/beaglebone/beaglebone.py +0 -149
- egse/vacuum/beaglebone/beaglebone.yaml +0 -44
- egse/vacuum/beaglebone/beaglebone_cs.py +0 -108
- egse/vacuum/beaglebone/beaglebone_devif.py +0 -159
- egse/vacuum/beaglebone/beaglebone_protocol.py +0 -192
- egse/vacuum/beaglebone/beaglebone_ui.py +0 -638
- egse/vacuum/instrutech/igm402.py +0 -91
- egse/vacuum/instrutech/igm402.yaml +0 -90
- egse/vacuum/instrutech/igm402_controller.py +0 -124
- egse/vacuum/instrutech/igm402_cs.py +0 -108
- egse/vacuum/instrutech/igm402_interface.py +0 -49
- egse/vacuum/instrutech/igm402_simulator.py +0 -36
- egse/vacuum/keller/kellerBus.py +0 -256
- egse/vacuum/keller/leo3.py +0 -100
- egse/vacuum/keller/leo3.yaml +0 -38
- egse/vacuum/keller/leo3_controller.py +0 -81
- egse/vacuum/keller/leo3_cs.py +0 -101
- egse/vacuum/keller/leo3_interface.py +0 -33
- egse/vacuum/mks/evision.py +0 -86
- egse/vacuum/mks/evision.yaml +0 -75
- egse/vacuum/mks/evision_cs.py +0 -101
- egse/vacuum/mks/evision_devif.py +0 -313
- egse/vacuum/mks/evision_interface.py +0 -60
- egse/vacuum/mks/evision_simulator.py +0 -24
- egse/vacuum/mks/evision_ui.py +0 -701
- egse/vacuum/pfeiffer/acp40.py +0 -87
- egse/vacuum/pfeiffer/acp40.yaml +0 -60
- egse/vacuum/pfeiffer/acp40_controller.py +0 -117
- egse/vacuum/pfeiffer/acp40_cs.py +0 -109
- egse/vacuum/pfeiffer/acp40_interface.py +0 -40
- egse/vacuum/pfeiffer/acp40_simulator.py +0 -37
- egse/vacuum/pfeiffer/tc400.py +0 -87
- egse/vacuum/pfeiffer/tc400.yaml +0 -83
- egse/vacuum/pfeiffer/tc400_controller.py +0 -136
- egse/vacuum/pfeiffer/tc400_cs.py +0 -109
- egse/vacuum/pfeiffer/tc400_interface.py +0 -70
- egse/vacuum/pfeiffer/tc400_simulator.py +0 -35
- egse/vacuum/pfeiffer/tpg261.py +0 -80
- egse/vacuum/pfeiffer/tpg261.yaml +0 -66
- egse/vacuum/pfeiffer/tpg261_controller.py +0 -150
- egse/vacuum/pfeiffer/tpg261_cs.py +0 -109
- egse/vacuum/pfeiffer/tpg261_interface.py +0 -59
- egse/vacuum/pfeiffer/tpg261_simulator.py +0 -23
- egse/version.py +0 -174
- egse/visitedpositions.py +0 -398
- egse/windowing.py +0 -213
- egse/zmq/__init__.py +0 -28
- egse/zmq/spw.py +0 -160
- egse/zmq_ser.py +0 -41
- scripts/alerts/cold.yaml +0 -278
- scripts/alerts/example_alerts.yaml +0 -54
- scripts/alerts/transition.yaml +0 -14
- scripts/alerts/warm.yaml +0 -49
- scripts/analyse_n_fee_hk_data.py +0 -52
- scripts/check_hdf5_files.py +0 -192
- scripts/check_register_sync.py +0 -47
- scripts/check_tcs_calib_coef.py +0 -90
- scripts/correct_ccd_cold_temperature_cal.py +0 -157
- scripts/create_hdf5_report.py +0 -293
- scripts/csl_model.py +0 -420
- scripts/csl_restore_setup.py +0 -229
- scripts/export-grafana-dashboards.py +0 -49
- scripts/fdir/cs_recovery/fdir_cs_recovery.py +0 -54
- scripts/fdir/fdir_table.yaml +0 -70
- scripts/fdir/fdir_test_recovery.py +0 -10
- scripts/fdir/hw_recovery/fdir_agilent_hw_recovery.py +0 -73
- scripts/fdir/limit_recovery/fdir_agilent_limit.py +0 -61
- scripts/fdir/limit_recovery/fdir_bb_heater_limit.py +0 -59
- scripts/fdir/limit_recovery/fdir_ensemble_limit.py +0 -33
- scripts/fdir/limit_recovery/fdir_pressure_limit_recovery.py +0 -71
- scripts/fix_csv.py +0 -80
- scripts/ias/correct_ccd_temp_cal_elfique.py +0 -43
- scripts/ias/correct_ccd_temp_cal_floreffe.py +0 -43
- scripts/ias/correct_trp_swap_achel.py +0 -199
- scripts/inta/correct_ccd_temp_cal_duvel.py +0 -43
- scripts/inta/correct_ccd_temp_cal_gueuze.py +0 -43
- scripts/n_fee_supply_voltage_calculation.py +0 -92
- scripts/playground.py +0 -30
- scripts/print_hdf5_hk_data.py +0 -68
- scripts/print_register_map.py +0 -43
- scripts/remove_lines_between_matches.py +0 -188
- scripts/sron/commanding/control_heaters.py +0 -44
- scripts/sron/commanding/pumpdown.py +0 -46
- scripts/sron/commanding/set_pid_setpoint.py +0 -19
- scripts/sron/commanding/shutdown_bbb_heaters.py +0 -10
- scripts/sron/commanding/shutdown_pumps.py +0 -33
- scripts/sron/correct_mgse_coordinates_brigand_chimay.py +0 -272
- scripts/sron/correct_trp_swap_brigand.py +0 -204
- scripts/sron/gimbal_conversions.py +0 -75
- scripts/sron/tm_gen/tm_gen_agilent.py +0 -37
- scripts/sron/tm_gen/tm_gen_heaters.py +0 -4
- scripts/sron/tm_gen/tm_gen_spid.py +0 -13
- scripts/update_operational_cgse.py +0 -268
- scripts/update_operational_cgse_old.py +0 -273
|
@@ -1,1065 +0,0 @@
|
|
|
1
|
-
import argparse
|
|
2
|
-
import logging
|
|
3
|
-
import multiprocessing
|
|
4
|
-
import pickle
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
import sys
|
|
8
|
-
import zmq
|
|
9
|
-
from PyQt5.QtCore import QThread, QObject, pyqtSignal, pyqtSlot, Qt, QSize, QRect, QLockFile
|
|
10
|
-
from PyQt5.QtGui import QFont, QIcon
|
|
11
|
-
from PyQt5.QtWidgets import QMainWindow, QApplication, QLabel, QFrame, QHBoxLayout, QGroupBox, QVBoxLayout, QGridLayout, \
|
|
12
|
-
QLineEdit, QScrollArea, QWidget, QPushButton, QSpacerItem, QSizePolicy, QMessageBox
|
|
13
|
-
from zmq import ZMQError
|
|
14
|
-
|
|
15
|
-
from egse.filterwheel.eksma.fw8smc5 import CTRL_SETTINGS as FW_CTRL_SETTINGS
|
|
16
|
-
from egse.filterwheel.eksma.fw8smc5 import Fw8Smc5Proxy
|
|
17
|
-
from egse.gui.led import Led
|
|
18
|
-
from egse.lampcontrol.beaglebone.beaglebone import BeagleboneProxy
|
|
19
|
-
from egse.lampcontrol.beaglebone.beaglebone import CTRL_SETTINGS as BB_CTRL_SETTINGS
|
|
20
|
-
from egse.observer import Observer, Observable
|
|
21
|
-
from egse.powermeter.thorlabs.pm100a import CTRL_SETTINGS as PM100_CTRL_SETTINGS
|
|
22
|
-
from egse.resource import get_resource
|
|
23
|
-
from egse.setup import get_setup
|
|
24
|
-
from egse.shutter.thorlabs.sc10 import CTRL_SETTINGS as SC10_CTRL_SETTINGS
|
|
25
|
-
from egse.shutter.thorlabs.sc10 import Sc10Proxy
|
|
26
|
-
from egse.stages.arun.smd3 import CTRL_SETTINGS as SMD3_CTRL_SETTINGS
|
|
27
|
-
from egse.stages.arun.smd3 import Smd3Proxy
|
|
28
|
-
from egse.zmq_ser import connect_address
|
|
29
|
-
|
|
30
|
-
multiprocessing.current_process().name = 'fw8smc5_ui'
|
|
31
|
-
|
|
32
|
-
logger = logging.getLogger(__name__)
|
|
33
|
-
|
|
34
|
-
class FilterWheelMonitoringWorker(QObject):
|
|
35
|
-
|
|
36
|
-
fw_ri_signal = pyqtSignal(float)
|
|
37
|
-
fw_fwc_signal = pyqtSignal(float)
|
|
38
|
-
fw_pos_1_signal = pyqtSignal(int)
|
|
39
|
-
fw_pos_2_signal = pyqtSignal(int)
|
|
40
|
-
|
|
41
|
-
hartmann_status_signal = pyqtSignal(bool)
|
|
42
|
-
|
|
43
|
-
shutter_status_signal = pyqtSignal(bool)
|
|
44
|
-
|
|
45
|
-
pm100_power_signal = pyqtSignal(float)
|
|
46
|
-
|
|
47
|
-
lamp_on_signal = pyqtSignal(bool)
|
|
48
|
-
laser_on_signal = pyqtSignal(bool)
|
|
49
|
-
module_fault_signal = pyqtSignal(bool)
|
|
50
|
-
controller_fault_signal = pyqtSignal(bool)
|
|
51
|
-
|
|
52
|
-
def __init__(self):
|
|
53
|
-
super(FilterWheelMonitoringWorker, self).__init__()
|
|
54
|
-
|
|
55
|
-
self.activate = False
|
|
56
|
-
self.just_reconnected = True
|
|
57
|
-
|
|
58
|
-
self.monitoring_socket = None
|
|
59
|
-
self.sc10_monitoring_socket = None
|
|
60
|
-
self.is_socket_connected = True
|
|
61
|
-
self.monitoring_timeout = 0.5
|
|
62
|
-
|
|
63
|
-
self.connect_socket()
|
|
64
|
-
|
|
65
|
-
self.previous_fw_ri = []
|
|
66
|
-
self.previous_fw_fwc = []
|
|
67
|
-
self.previous_fw_pos_1 = []
|
|
68
|
-
self.previous_fw_pos_2 = []
|
|
69
|
-
|
|
70
|
-
self.previous_hartmann_status = []
|
|
71
|
-
|
|
72
|
-
self.previous_shutter_status = []
|
|
73
|
-
|
|
74
|
-
self.previous_pm100_power = []
|
|
75
|
-
|
|
76
|
-
self.previous_laser_state = []
|
|
77
|
-
self.previous_lamp_state = []
|
|
78
|
-
self.previous_controller_fault = []
|
|
79
|
-
self.previous_module_fault = []
|
|
80
|
-
|
|
81
|
-
def connect_socket(self):
|
|
82
|
-
""" Create a socket and connect to the monitoring port.
|
|
83
|
-
"""
|
|
84
|
-
try:
|
|
85
|
-
transport = FW_CTRL_SETTINGS.PROTOCOL
|
|
86
|
-
hostname = FW_CTRL_SETTINGS.HOSTNAME
|
|
87
|
-
|
|
88
|
-
monitoring_port = FW_CTRL_SETTINGS.MONITORING_PORT
|
|
89
|
-
fw_monitoring_address = connect_address(transport, hostname, monitoring_port)
|
|
90
|
-
|
|
91
|
-
transport = SC10_CTRL_SETTINGS.PROTOCOL
|
|
92
|
-
hostname = SC10_CTRL_SETTINGS.HOSTNAME
|
|
93
|
-
|
|
94
|
-
monitoring_port = SC10_CTRL_SETTINGS.MONITORING_PORT
|
|
95
|
-
sc10_monitoring_address = connect_address(transport, hostname, monitoring_port)
|
|
96
|
-
|
|
97
|
-
transport = SMD3_CTRL_SETTINGS.PROTOCOL
|
|
98
|
-
hostname = SMD3_CTRL_SETTINGS.HOSTNAME
|
|
99
|
-
|
|
100
|
-
monitoring_port = SMD3_CTRL_SETTINGS.MONITORING_PORT
|
|
101
|
-
smd3_monitoring_address = connect_address(transport, hostname, monitoring_port)
|
|
102
|
-
|
|
103
|
-
transport = PM100_CTRL_SETTINGS.PROTOCOL
|
|
104
|
-
hostname = PM100_CTRL_SETTINGS.HOSTNAME
|
|
105
|
-
|
|
106
|
-
monitoring_port = PM100_CTRL_SETTINGS.MONITORING_PORT
|
|
107
|
-
pm100_monitoring_address = connect_address(transport, hostname, monitoring_port)
|
|
108
|
-
|
|
109
|
-
transport = BB_CTRL_SETTINGS.PROTOCOL
|
|
110
|
-
hostname = BB_CTRL_SETTINGS.HOSTNAME
|
|
111
|
-
|
|
112
|
-
monitoring_port = BB_CTRL_SETTINGS.MONITORING_PORT
|
|
113
|
-
bb_monitoring_address = connect_address(transport, hostname, monitoring_port)
|
|
114
|
-
|
|
115
|
-
self.monitoring_socket = zmq.Context().socket(zmq.SUB)
|
|
116
|
-
self.monitoring_socket.connect(fw_monitoring_address)
|
|
117
|
-
self.monitoring_socket.connect(sc10_monitoring_address)
|
|
118
|
-
self.monitoring_socket.connect(smd3_monitoring_address)
|
|
119
|
-
self.monitoring_socket.connect(pm100_monitoring_address)
|
|
120
|
-
self.monitoring_socket.connect(bb_monitoring_address)
|
|
121
|
-
self.monitoring_socket.setsockopt_string(zmq.SUBSCRIBE, "")
|
|
122
|
-
|
|
123
|
-
self.monitoring_timeout = 0.5
|
|
124
|
-
|
|
125
|
-
self.is_socket_connected = True
|
|
126
|
-
|
|
127
|
-
except:
|
|
128
|
-
self.is_socket_connected = False
|
|
129
|
-
|
|
130
|
-
def stop(self):
|
|
131
|
-
|
|
132
|
-
""" Stop the monitoring worker.
|
|
133
|
-
The monitoring socket is disconnected from the monitoring port and is then closed immediately.
|
|
134
|
-
"""
|
|
135
|
-
|
|
136
|
-
self.monitoring_socket.close()
|
|
137
|
-
self.is_socket_connected = False
|
|
138
|
-
|
|
139
|
-
self.active = False
|
|
140
|
-
|
|
141
|
-
def start_process(self):
|
|
142
|
-
"""Start updated the Filterwheel status"""
|
|
143
|
-
self.run()
|
|
144
|
-
|
|
145
|
-
@pyqtSlot()
|
|
146
|
-
def run(self):
|
|
147
|
-
"""Keep on checkin whether the Filterwheel state has changed
|
|
148
|
-
|
|
149
|
-
If the Filterwheel status has changed, update it in the GUI
|
|
150
|
-
Raises:
|
|
151
|
-
Exception: ZMQ Error
|
|
152
|
-
"""
|
|
153
|
-
|
|
154
|
-
self.active = True
|
|
155
|
-
while self.is_socket_connected and self.active:
|
|
156
|
-
|
|
157
|
-
try:
|
|
158
|
-
socket_list, _, exc_list = zmq.select([self.monitoring_socket], [], [], timeout=self.monitoring_timeout)
|
|
159
|
-
|
|
160
|
-
if self.monitoring_socket in socket_list:
|
|
161
|
-
try:
|
|
162
|
-
pickle_string = self.monitoring_socket.recv()
|
|
163
|
-
except Exception:
|
|
164
|
-
raise Exception
|
|
165
|
-
|
|
166
|
-
monitoring_info = pickle.loads(pickle_string)
|
|
167
|
-
|
|
168
|
-
if 'fw8smc5_status' in monitoring_info:
|
|
169
|
-
fw_ri = monitoring_info['fw8smc5_status']['RelativeIntensity']
|
|
170
|
-
fw_fwc = monitoring_info['fw8smc5_status']['FullWellCapacity']
|
|
171
|
-
fw_pos_1 = monitoring_info['fw8smc5_status']['FW1Position']
|
|
172
|
-
fw_pos_2 = monitoring_info['fw8smc5_status']['FW2Position']
|
|
173
|
-
|
|
174
|
-
if fw_ri != self.previous_fw_ri:
|
|
175
|
-
self.fw_ri_signal.emit(fw_ri)
|
|
176
|
-
|
|
177
|
-
self.previous_fw_ri = fw_ri
|
|
178
|
-
|
|
179
|
-
if fw_fwc != self.previous_fw_fwc:
|
|
180
|
-
self.fw_fwc_signal.emit(fw_fwc)
|
|
181
|
-
|
|
182
|
-
self.previous_fw_fwc = fw_fwc
|
|
183
|
-
|
|
184
|
-
if fw_pos_1 != self.previous_fw_pos_1:
|
|
185
|
-
self.fw_pos_1_signal.emit(fw_pos_1)
|
|
186
|
-
|
|
187
|
-
self.previous_fw_pos_1 = fw_pos_1
|
|
188
|
-
|
|
189
|
-
if fw_pos_2 != self.previous_fw_pos_2:
|
|
190
|
-
self.fw_pos_2_signal.emit(fw_pos_2)
|
|
191
|
-
|
|
192
|
-
self.previous_fw_pos_2 = fw_pos_2
|
|
193
|
-
|
|
194
|
-
if 'hartmann_status' in monitoring_info:
|
|
195
|
-
hartmann_status = bool(monitoring_info['hartmann_status'])
|
|
196
|
-
|
|
197
|
-
if hartmann_status != self.previous_hartmann_status:
|
|
198
|
-
self.hartmann_status_signal.emit(hartmann_status)
|
|
199
|
-
|
|
200
|
-
self.previous_hartmann_status = hartmann_status
|
|
201
|
-
|
|
202
|
-
if 'shutter_state' in monitoring_info:
|
|
203
|
-
shutter_status = bool(monitoring_info['shutter_state'])
|
|
204
|
-
|
|
205
|
-
if shutter_status != self.previous_shutter_status:
|
|
206
|
-
self.shutter_status_signal.emit(shutter_status)
|
|
207
|
-
|
|
208
|
-
self.previous_shutter_status = shutter_status
|
|
209
|
-
|
|
210
|
-
if 'pm100a_power' in monitoring_info:
|
|
211
|
-
pm100_power = float(monitoring_info['pm100a_power'])
|
|
212
|
-
|
|
213
|
-
if pm100_power != self.previous_pm100_power:
|
|
214
|
-
self.pm100_power_signal.emit(pm100_power)
|
|
215
|
-
|
|
216
|
-
self.previous_pm100_power = pm100_power
|
|
217
|
-
|
|
218
|
-
if 'lamp_status' in monitoring_info:
|
|
219
|
-
laser_state = monitoring_info['lamp_status']['laser_state']
|
|
220
|
-
lamp_state = monitoring_info['lamp_status']['lamp_state']
|
|
221
|
-
module_fault = monitoring_info['lamp_status']['module_fault']
|
|
222
|
-
controller_fault = monitoring_info['lamp_status']['controller_fault']
|
|
223
|
-
|
|
224
|
-
if laser_state != self.previous_laser_state:
|
|
225
|
-
self.laser_on_signal.emit(laser_state)
|
|
226
|
-
|
|
227
|
-
self.previous_laser_state = laser_state
|
|
228
|
-
if lamp_state != self.previous_lamp_state:
|
|
229
|
-
self.lamp_on_signal.emit(lamp_state)
|
|
230
|
-
|
|
231
|
-
self.previous_lamp_state = lamp_state
|
|
232
|
-
if module_fault != self.previous_module_fault:
|
|
233
|
-
self.module_fault_signal.emit(module_fault)
|
|
234
|
-
|
|
235
|
-
self.previous_module_fault = module_fault
|
|
236
|
-
if controller_fault != self.previous_controller_fault:
|
|
237
|
-
self.controller_fault_signal.emit(controller_fault)
|
|
238
|
-
|
|
239
|
-
self.previous_controller_fault = controller_fault
|
|
240
|
-
|
|
241
|
-
except ZMQError as exc:
|
|
242
|
-
raise exc
|
|
243
|
-
|
|
244
|
-
class OGSEWindow(QGroupBox):
|
|
245
|
-
def __init__(self, setup):
|
|
246
|
-
super().__init__()
|
|
247
|
-
|
|
248
|
-
self.setObjectName("OGSE Window")
|
|
249
|
-
|
|
250
|
-
self.gridLayout_3 = QGridLayout(self)
|
|
251
|
-
self.gridLayout_3.setObjectName("gridLayout_3")
|
|
252
|
-
self.groupBox = QGroupBox(self)
|
|
253
|
-
self.groupBox.setTitle("")
|
|
254
|
-
self.groupBox.setObjectName("groupBox")
|
|
255
|
-
self.horizontalLayout_4 = QHBoxLayout(self.groupBox)
|
|
256
|
-
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
|
257
|
-
self.gridLayout_4 = QGridLayout()
|
|
258
|
-
self.label_3 = QLabel(self.groupBox)
|
|
259
|
-
self.label_3.setObjectName("label_3")
|
|
260
|
-
self.label_3.setText("Relative intensity: ")
|
|
261
|
-
self.gridLayout_4.addWidget(self.label_3, 0, 0, 1, 1)
|
|
262
|
-
self.lineEdit_3 = QLineEdit(self.groupBox)
|
|
263
|
-
self.lineEdit_3.setMaximumSize(QSize(250, 16777215))
|
|
264
|
-
self.lineEdit_3.setReadOnly(True)
|
|
265
|
-
self.lineEdit_3.setObjectName("lineEdit_3")
|
|
266
|
-
self.gridLayout_4.addWidget(self.lineEdit_3, 0, 1, 1, 1)
|
|
267
|
-
self.label_4 = QLabel(self.groupBox)
|
|
268
|
-
self.label_4.setObjectName("label_4")
|
|
269
|
-
self.label_4.setText("Full well capacity: ")
|
|
270
|
-
self.gridLayout_4.addWidget(self.label_4, 1, 0, 1, 1)
|
|
271
|
-
self.lineEdit_4 = QLineEdit(self.groupBox)
|
|
272
|
-
self.lineEdit_4.setMaximumSize(QSize(250, 16777215))
|
|
273
|
-
self.lineEdit_4.setReadOnly(True)
|
|
274
|
-
self.lineEdit_4.setObjectName("lineEdit_4")
|
|
275
|
-
self.gridLayout_4.addWidget(self.lineEdit_4, 1, 1, 1, 1)
|
|
276
|
-
|
|
277
|
-
self.pushButton_34 = QPushButton()
|
|
278
|
-
self.pushButton_34.setText("Home")
|
|
279
|
-
self.gridLayout_4.addWidget(self.pushButton_34, 2, 0, 1, 2)
|
|
280
|
-
self.pushButton_32 = QPushButton()
|
|
281
|
-
self.pushButton_32.setMinimumWidth(150)
|
|
282
|
-
self.pushButton_32.setText("Decrease intensity")
|
|
283
|
-
self.gridLayout_4.addWidget(self.pushButton_32, 3, 0, 1, 1)
|
|
284
|
-
self.pushButton_33 = QPushButton()
|
|
285
|
-
self.pushButton_33.setMinimumWidth(150)
|
|
286
|
-
self.pushButton_33.setText("Increase Intensity")
|
|
287
|
-
self.gridLayout_4.addWidget(self.pushButton_33, 3, 1, 1, 1)
|
|
288
|
-
spacerItem_2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
|
289
|
-
self.gridLayout_4.addItem(spacerItem_2, 4, 0, 1, 2)
|
|
290
|
-
self.horizontalLayout_4.addLayout(self.gridLayout_4)
|
|
291
|
-
|
|
292
|
-
self.gridLayout = QGridLayout()
|
|
293
|
-
self.gridLayout.setObjectName("gridLayout")
|
|
294
|
-
self.scrollArea = QScrollArea(self.groupBox)
|
|
295
|
-
self.scrollArea.setMinimumSize(QSize(550, 0))
|
|
296
|
-
self.scrollArea.setWidgetResizable(True)
|
|
297
|
-
self.scrollArea.setObjectName("scrollArea")
|
|
298
|
-
self.scrollAreaWidgetContents = QWidget()
|
|
299
|
-
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 546, 178))
|
|
300
|
-
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
|
|
301
|
-
self.verticalLayout_6 = QVBoxLayout(self.scrollAreaWidgetContents)
|
|
302
|
-
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
|
303
|
-
self.gridLayout_2 = QGridLayout()
|
|
304
|
-
self.gridLayout_2.setObjectName("gridLayout_2")
|
|
305
|
-
self.horizontalLayout_16 = QHBoxLayout()
|
|
306
|
-
self.label_12 = QLabel("Search: ")
|
|
307
|
-
self.horizontalLayout_16.addWidget(self.label_12)
|
|
308
|
-
self.lineEdit_6 = QLineEdit()
|
|
309
|
-
self.horizontalLayout_16.addWidget(self.lineEdit_6)
|
|
310
|
-
self.verticalLayout_6.addLayout(self.horizontalLayout_16)
|
|
311
|
-
|
|
312
|
-
try:
|
|
313
|
-
ri_list = setup.gse.ogse.calibration.relative_intensity_by_wheel
|
|
314
|
-
|
|
315
|
-
row = 0
|
|
316
|
-
column = 0
|
|
317
|
-
self.ri_pushButtons = {}
|
|
318
|
-
for idx, value in enumerate(ri_list.values()):
|
|
319
|
-
self.ri_pushButtons[f"{value}_{idx}"] = QPushButton(self.scrollAreaWidgetContents)
|
|
320
|
-
self.ri_pushButtons[f"{value}_{idx}"].setText(f"{value:5e}")
|
|
321
|
-
self.ri_pushButtons[f"{value}_{idx}"].setObjectName(f"{value:5e}")
|
|
322
|
-
self.gridLayout_2.addWidget(self.ri_pushButtons[f"{value}_{idx}"], row, column % 4, 1, 1)
|
|
323
|
-
column += 1
|
|
324
|
-
if column >= 4 and column % 4 == 0:
|
|
325
|
-
row += 1
|
|
326
|
-
except Exception as e:
|
|
327
|
-
logger.exception("Could not generate the relative intensity buttons. This is most likely "\
|
|
328
|
-
f"caused by an incorrect setup.")
|
|
329
|
-
sys.exit()
|
|
330
|
-
|
|
331
|
-
spacerItem_3 = QSpacerItem(20, 383, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
|
332
|
-
self.gridLayout_2.addItem(spacerItem_3, row+1, 0)
|
|
333
|
-
self.verticalLayout_6.addLayout(self.gridLayout_2)
|
|
334
|
-
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
|
|
335
|
-
self.gridLayout.addWidget(self.scrollArea, 0, 0, 1, 1)
|
|
336
|
-
self.horizontalLayout_4.addLayout(self.gridLayout)
|
|
337
|
-
self.gridLayout_3.addWidget(self.groupBox, 1, 0, 1, 1)
|
|
338
|
-
self.horizontalLayout = QHBoxLayout()
|
|
339
|
-
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
340
|
-
self.verticalLayout_3 = QVBoxLayout()
|
|
341
|
-
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
|
342
|
-
self.groupBox_3 = QGroupBox(self)
|
|
343
|
-
self.groupBox_3.setMaximumSize(QSize(16777215, 370))
|
|
344
|
-
self.groupBox_3.setTitle("")
|
|
345
|
-
self.groupBox_3.setObjectName("groupBox_3")
|
|
346
|
-
self.verticalLayout_4 = QVBoxLayout(self.groupBox_3)
|
|
347
|
-
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
|
348
|
-
self.label = QLabel(self.groupBox_3)
|
|
349
|
-
self.label.setMaximumSize(QSize(16777215, 50))
|
|
350
|
-
self.label.setText("Filterwheel 1")
|
|
351
|
-
font = QFont()
|
|
352
|
-
font.setPointSize(20)
|
|
353
|
-
self.label.setFont(font)
|
|
354
|
-
self.label.setAlignment(Qt.AlignCenter)
|
|
355
|
-
self.label.setObjectName("label")
|
|
356
|
-
self.verticalLayout_4.addWidget(self.label)
|
|
357
|
-
self.lineEdit = QLineEdit(self.groupBox_3)
|
|
358
|
-
self.lineEdit.setMinimumSize(QSize(150, 290))
|
|
359
|
-
font = QFont()
|
|
360
|
-
font.setPointSize(150)
|
|
361
|
-
self.lineEdit.setFont(font)
|
|
362
|
-
self.lineEdit.setAlignment(Qt.AlignCenter)
|
|
363
|
-
self.lineEdit.setReadOnly(True)
|
|
364
|
-
self.lineEdit.setObjectName("lineEdit")
|
|
365
|
-
self.verticalLayout_4.addWidget(self.lineEdit)
|
|
366
|
-
self.verticalLayout_3.addWidget(self.groupBox_3)
|
|
367
|
-
self.groupBox_2 = QGroupBox(self)
|
|
368
|
-
self.groupBox_2.setMaximumSize(QSize(16777215, 50))
|
|
369
|
-
self.groupBox_2.setTitle("")
|
|
370
|
-
self.groupBox_2.setObjectName("groupBox_2")
|
|
371
|
-
self.horizontalLayout_2 = QHBoxLayout(self.groupBox_2)
|
|
372
|
-
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
|
373
|
-
|
|
374
|
-
self.pushButton = QPushButton(self.groupBox_2)
|
|
375
|
-
self.pushButton.setMinimumSize(QSize(50, 0))
|
|
376
|
-
self.pushButton.setObjectName("fw1_<")
|
|
377
|
-
self.pushButton.setText("<")
|
|
378
|
-
self.horizontalLayout_2.addWidget(self.pushButton)
|
|
379
|
-
|
|
380
|
-
self.fw1_positions = {}
|
|
381
|
-
|
|
382
|
-
for i in range(0, 8):
|
|
383
|
-
self.fw1_positions[f"fw1_{i}"] = QPushButton(self.groupBox_2)
|
|
384
|
-
self.fw1_positions[f"fw1_{i}"].setMinimumSize(QSize(30, 0))
|
|
385
|
-
self.fw1_positions[f"fw1_{i}"].setObjectName(f"fw1_{i}")
|
|
386
|
-
self.fw1_positions[f"fw1_{i}"].setText(f"{i}")
|
|
387
|
-
self.horizontalLayout_2.addWidget(self.fw1_positions[f"fw1_{i}"])
|
|
388
|
-
|
|
389
|
-
self.pushButton_2 = QPushButton(self.groupBox_2)
|
|
390
|
-
self.pushButton_2.setMinimumSize(QSize(50, 0))
|
|
391
|
-
self.pushButton_2.setObjectName("fw1_>")
|
|
392
|
-
self.pushButton_2.setText(">")
|
|
393
|
-
self.horizontalLayout_2.addWidget(self.pushButton_2)
|
|
394
|
-
self.verticalLayout_3.addWidget(self.groupBox_2)
|
|
395
|
-
self.horizontalLayout.addLayout(self.verticalLayout_3)
|
|
396
|
-
self.verticalLayout_2 = QVBoxLayout()
|
|
397
|
-
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
|
398
|
-
self.groupBox_4 = QGroupBox(self)
|
|
399
|
-
self.groupBox_4.setMaximumSize(QSize(16777215, 370))
|
|
400
|
-
self.groupBox_4.setTitle("")
|
|
401
|
-
self.groupBox_4.setObjectName("groupBox_4")
|
|
402
|
-
self.verticalLayout_5 = QVBoxLayout(self.groupBox_4)
|
|
403
|
-
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
|
404
|
-
self.label_2 = QLabel(self.groupBox_4)
|
|
405
|
-
self.label_2.setMaximumSize(QSize(16777215, 50))
|
|
406
|
-
self.label_2.setText("Filterwheel 2")
|
|
407
|
-
font = QFont()
|
|
408
|
-
font.setPointSize(20)
|
|
409
|
-
self.label_2.setFont(font)
|
|
410
|
-
self.label_2.setAlignment(Qt.AlignCenter)
|
|
411
|
-
self.label_2.setObjectName("label_2")
|
|
412
|
-
self.verticalLayout_5.addWidget(self.label_2)
|
|
413
|
-
self.lineEdit_2 = QLineEdit(self.groupBox_4)
|
|
414
|
-
self.lineEdit_2.setMinimumSize(QSize(150, 290))
|
|
415
|
-
font = QFont()
|
|
416
|
-
font.setPointSize(150)
|
|
417
|
-
self.lineEdit_2.setFont(font)
|
|
418
|
-
self.lineEdit_2.setAlignment(Qt.AlignCenter)
|
|
419
|
-
self.lineEdit_2.setReadOnly(True)
|
|
420
|
-
self.lineEdit_2.setObjectName("lineEdit_2")
|
|
421
|
-
self.verticalLayout_5.addWidget(self.lineEdit_2)
|
|
422
|
-
self.verticalLayout_2.addWidget(self.groupBox_4)
|
|
423
|
-
self.groupBox_5 = QGroupBox(self)
|
|
424
|
-
self.groupBox_5.setMaximumSize(QSize(16777215, 50))
|
|
425
|
-
self.groupBox_5.setTitle("")
|
|
426
|
-
self.groupBox_5.setObjectName("groupBox_5")
|
|
427
|
-
self.horizontalLayout_3 = QHBoxLayout(self.groupBox_5)
|
|
428
|
-
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
|
429
|
-
self.pushButton_20 = QPushButton(self.groupBox_5)
|
|
430
|
-
self.pushButton_20.setMinimumSize(QSize(50, 0))
|
|
431
|
-
self.pushButton_20.setObjectName("fw2_<")
|
|
432
|
-
self.pushButton_20.setText("<")
|
|
433
|
-
self.horizontalLayout_3.addWidget(self.pushButton_20)
|
|
434
|
-
|
|
435
|
-
self.fw2_positions = {}
|
|
436
|
-
for i in range(0, 8):
|
|
437
|
-
self.fw2_positions[f"fw2_{i}"] = QPushButton(self.groupBox_5)
|
|
438
|
-
self.fw2_positions[f"fw2_{i}"].setMinimumSize(QSize(30, 0))
|
|
439
|
-
self.fw2_positions[f"fw2_{i}"].setObjectName(f"fw2_{i}")
|
|
440
|
-
self.fw2_positions[f"fw2_{i}"].setText(f"{i}")
|
|
441
|
-
self.horizontalLayout_3.addWidget(self.fw2_positions[f"fw2_{i}"])
|
|
442
|
-
|
|
443
|
-
self.pushButton_18 = QPushButton(self.groupBox_5)
|
|
444
|
-
self.pushButton_18.setMinimumSize(QSize(50, 0))
|
|
445
|
-
self.pushButton_18.setObjectName("fw2_>")
|
|
446
|
-
self.pushButton_18.setText(">")
|
|
447
|
-
self.horizontalLayout_3.addWidget(self.pushButton_18)
|
|
448
|
-
self.verticalLayout_2.addWidget(self.groupBox_5)
|
|
449
|
-
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
|
450
|
-
self.gridLayout_3.addLayout(self.horizontalLayout, 0, 0, 1, 1)
|
|
451
|
-
self.groupBox_6 = QGroupBox(self)
|
|
452
|
-
self.groupBox_6.setMinimumSize(QSize(200, 0))
|
|
453
|
-
self.groupBox_6.setTitle("")
|
|
454
|
-
self.groupBox_6.setObjectName("groupBox_6")
|
|
455
|
-
self.verticalLayout = QVBoxLayout(self.groupBox_6)
|
|
456
|
-
self.verticalLayout.setObjectName("verticalLayout")
|
|
457
|
-
self.horizontalLayout_5 = QHBoxLayout()
|
|
458
|
-
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
|
459
|
-
self.widget = Led(self.groupBox_6)
|
|
460
|
-
self.widget.setMinimumSize(QSize(25, 25))
|
|
461
|
-
self.widget.setMaximumSize(QSize(25, 25))
|
|
462
|
-
self.horizontalLayout_5.addWidget(self.widget)
|
|
463
|
-
self.label_5 = QLabel(self.groupBox_6)
|
|
464
|
-
self.label_5.setMinimumSize(QSize(0, 0))
|
|
465
|
-
self.label_5.setObjectName("label_5")
|
|
466
|
-
self.label_5.setText("Shutter control")
|
|
467
|
-
self.horizontalLayout_5.addWidget(self.label_5)
|
|
468
|
-
self.verticalLayout.addLayout(self.horizontalLayout_5)
|
|
469
|
-
self.horizontalLayout_6 = QHBoxLayout()
|
|
470
|
-
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
|
471
|
-
self.pushButton_25 = QPushButton(self.groupBox_6)
|
|
472
|
-
self.pushButton_25.setObjectName("pushButton_25")
|
|
473
|
-
self.pushButton_25.setText("Open")
|
|
474
|
-
self.pushButton_25.setEnabled(False)
|
|
475
|
-
self.horizontalLayout_6.addWidget(self.pushButton_25)
|
|
476
|
-
self.pushButton_26 = QPushButton(self.groupBox_6)
|
|
477
|
-
self.pushButton_26.setObjectName("pushButton_26")
|
|
478
|
-
self.pushButton_26.setText("Close")
|
|
479
|
-
self.pushButton_26.setEnabled(False)
|
|
480
|
-
self.horizontalLayout_6.addWidget(self.pushButton_26)
|
|
481
|
-
self.verticalLayout.addLayout(self.horizontalLayout_6)
|
|
482
|
-
self.line = QFrame(self.groupBox_6)
|
|
483
|
-
self.line.setFrameShape(QFrame.HLine)
|
|
484
|
-
self.line.setFrameShadow(QFrame.Sunken)
|
|
485
|
-
self.line.setObjectName("line")
|
|
486
|
-
self.verticalLayout.addWidget(self.line)
|
|
487
|
-
self.horizontalLayout_7 = QHBoxLayout()
|
|
488
|
-
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
|
|
489
|
-
self.widget_2 = Led(self.groupBox_6)
|
|
490
|
-
self.widget_2.setMinimumSize(QSize(25, 25))
|
|
491
|
-
self.widget_2.setMaximumSize(QSize(25, 25))
|
|
492
|
-
self.widget_2.setObjectName("widget_2")
|
|
493
|
-
self.horizontalLayout_7.addWidget(self.widget_2)
|
|
494
|
-
self.label_6 = QLabel(self.groupBox_6)
|
|
495
|
-
self.label_6.setObjectName("label_6")
|
|
496
|
-
self.label_6.setText("Hartmann control")
|
|
497
|
-
self.horizontalLayout_7.addWidget(self.label_6)
|
|
498
|
-
self.verticalLayout.addLayout(self.horizontalLayout_7)
|
|
499
|
-
self.horizontalLayout_8 = QHBoxLayout()
|
|
500
|
-
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
|
|
501
|
-
self.pushButton_27 = QPushButton(self.groupBox_6)
|
|
502
|
-
self.pushButton_27.setObjectName("pushButton_27")
|
|
503
|
-
self.pushButton_27.setText("Unmask")
|
|
504
|
-
self.pushButton_27.setEnabled(False)
|
|
505
|
-
self.horizontalLayout_8.addWidget(self.pushButton_27)
|
|
506
|
-
self.pushButton_28 = QPushButton(self.groupBox_6)
|
|
507
|
-
self.pushButton_28.setObjectName("pushButton_28")
|
|
508
|
-
self.pushButton_28.setText("Mask")
|
|
509
|
-
self.pushButton_28.setEnabled(False)
|
|
510
|
-
self.horizontalLayout_8.addWidget(self.pushButton_28)
|
|
511
|
-
self.verticalLayout.addLayout(self.horizontalLayout_8)
|
|
512
|
-
self.line_2 = QFrame(self.groupBox_6)
|
|
513
|
-
self.line_2.setFrameShape(QFrame.HLine)
|
|
514
|
-
self.line_2.setFrameShadow(QFrame.Sunken)
|
|
515
|
-
self.line_2.setObjectName("line_2")
|
|
516
|
-
self.verticalLayout.addWidget(self.line_2)
|
|
517
|
-
self.horizontalLayout_9 = QHBoxLayout()
|
|
518
|
-
self.horizontalLayout_9.setObjectName("horizontalLayout_9")
|
|
519
|
-
self.label_7 = QLabel(self.groupBox_6)
|
|
520
|
-
self.label_7.setObjectName("label_7")
|
|
521
|
-
self.label_7.setText("Powermeter")
|
|
522
|
-
self.horizontalLayout_9.addWidget(self.label_7)
|
|
523
|
-
self.verticalLayout.addLayout(self.horizontalLayout_9)
|
|
524
|
-
self.lineEdit_5 = QLineEdit(self.groupBox_6)
|
|
525
|
-
self.lineEdit_5.setObjectName("lineEdit_5")
|
|
526
|
-
self.lineEdit_5.setEnabled(True)
|
|
527
|
-
self.lineEdit_5.setReadOnly(True)
|
|
528
|
-
self.verticalLayout.addWidget(self.lineEdit_5)
|
|
529
|
-
|
|
530
|
-
self.line_3 = QFrame(self.groupBox_6)
|
|
531
|
-
self.line_3.setFrameShape(QFrame.HLine)
|
|
532
|
-
self.line_3.setFrameShadow(QFrame.Sunken)
|
|
533
|
-
self.line_3.setObjectName("line_3")
|
|
534
|
-
self.verticalLayout.addWidget(self.line_3)
|
|
535
|
-
self.label_13 = QLabel(self.groupBox_6)
|
|
536
|
-
self.label_13.setObjectName("label_8")
|
|
537
|
-
self.label_13.setText("Lamp controller")
|
|
538
|
-
self.verticalLayout.addWidget(self.label_13)
|
|
539
|
-
self.horizontalLayout_10 = QHBoxLayout()
|
|
540
|
-
self.widget_3 = Led(self.groupBox_6)
|
|
541
|
-
self.widget_3.setMinimumSize(QSize(25, 25))
|
|
542
|
-
self.widget_3.setMaximumSize(QSize(25, 25))
|
|
543
|
-
self.widget_3.setObjectName("widget_3")
|
|
544
|
-
self.horizontalLayout_10.addWidget(self.widget_3)
|
|
545
|
-
self.label_8 = QLabel(self.groupBox_6)
|
|
546
|
-
self.label_8.setObjectName("label_8")
|
|
547
|
-
self.label_8.setText("Laser on")
|
|
548
|
-
self.horizontalLayout_10.addWidget(self.label_8)
|
|
549
|
-
self.verticalLayout.addLayout(self.horizontalLayout_10)
|
|
550
|
-
|
|
551
|
-
self.horizontalLayout_11 = QHBoxLayout()
|
|
552
|
-
self.widget_4 = Led(self.groupBox_6)
|
|
553
|
-
self.widget_4.setMinimumSize(QSize(25, 25))
|
|
554
|
-
self.widget_4.setMaximumSize(QSize(25, 25))
|
|
555
|
-
self.widget_4.setObjectName("widget_4")
|
|
556
|
-
self.horizontalLayout_11.addWidget(self.widget_4)
|
|
557
|
-
self.label_9 = QLabel(self.groupBox_6)
|
|
558
|
-
self.label_9.setObjectName("label_9")
|
|
559
|
-
self.label_9.setText("Lamp on")
|
|
560
|
-
self.horizontalLayout_11.addWidget(self.label_9)
|
|
561
|
-
self.verticalLayout.addLayout(self.horizontalLayout_11)
|
|
562
|
-
|
|
563
|
-
self.horizontalLayout_12 = QHBoxLayout()
|
|
564
|
-
self.widget_5 = Led(self.groupBox_6)
|
|
565
|
-
self.widget_5.setMinimumSize(QSize(25, 25))
|
|
566
|
-
self.widget_5.setMaximumSize(QSize(25, 25))
|
|
567
|
-
self.widget_5.setObjectName("widget_5")
|
|
568
|
-
self.horizontalLayout_12.addWidget(self.widget_5)
|
|
569
|
-
self.label_10 = QLabel(self.groupBox_6)
|
|
570
|
-
self.label_10.setObjectName("label_10")
|
|
571
|
-
self.label_10.setText("Controller fault")
|
|
572
|
-
self.horizontalLayout_12.addWidget(self.label_10)
|
|
573
|
-
self.verticalLayout.addLayout(self.horizontalLayout_12)
|
|
574
|
-
|
|
575
|
-
self.horizontalLayout_13 = QHBoxLayout()
|
|
576
|
-
self.widget_6 = Led(self.groupBox_6)
|
|
577
|
-
self.widget_6.setMinimumSize(QSize(25, 25))
|
|
578
|
-
self.widget_6.setMaximumSize(QSize(25, 25))
|
|
579
|
-
self.widget_6.setObjectName("widget_6")
|
|
580
|
-
self.horizontalLayout_13.addWidget(self.widget_6)
|
|
581
|
-
self.label_11 = QLabel(self.groupBox_6)
|
|
582
|
-
self.label_11.setObjectName("label_11")
|
|
583
|
-
self.label_11.setText("Lamp module fault")
|
|
584
|
-
self.horizontalLayout_13.addWidget(self.label_11)
|
|
585
|
-
self.verticalLayout.addLayout(self.horizontalLayout_13)
|
|
586
|
-
|
|
587
|
-
self.horizontalLayout_14 = QHBoxLayout()
|
|
588
|
-
self.pushButton_29 = QPushButton(self.groupBox_6)
|
|
589
|
-
self.pushButton_29.setObjectName("pushButton_29")
|
|
590
|
-
self.pushButton_29.setText("Turn on")
|
|
591
|
-
self.pushButton_29.setEnabled(False)
|
|
592
|
-
self.horizontalLayout_14.addWidget(self.pushButton_29)
|
|
593
|
-
self.pushButton_30 = QPushButton(self.groupBox_6)
|
|
594
|
-
self.pushButton_30.setObjectName("pushButton_30")
|
|
595
|
-
self.pushButton_30.setText("Turn off")
|
|
596
|
-
self.pushButton_30.setEnabled(False)
|
|
597
|
-
self.horizontalLayout_14.addWidget(self.pushButton_30)
|
|
598
|
-
self.verticalLayout.addLayout(self.horizontalLayout_14)
|
|
599
|
-
|
|
600
|
-
self.horizontalLayout_15 = QHBoxLayout()
|
|
601
|
-
self.pushButton_31 = QPushButton(self.groupBox_6)
|
|
602
|
-
self.pushButton_31.setObjectName("pushButton_31")
|
|
603
|
-
self.pushButton_31.setText("Fix controller fault")
|
|
604
|
-
self.pushButton_31.setEnabled(False)
|
|
605
|
-
self.horizontalLayout_15.addWidget(self.pushButton_31)
|
|
606
|
-
self.verticalLayout.addLayout(self.horizontalLayout_15)
|
|
607
|
-
|
|
608
|
-
spacerItem = QSpacerItem(20, 383, QSizePolicy.Minimum, QSizePolicy.Expanding)
|
|
609
|
-
self.verticalLayout.addItem(spacerItem)
|
|
610
|
-
self.gridLayout_3.addWidget(self.groupBox_6, 0, 1, 2, 1)
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
class OGSEUIView(QMainWindow, Observable):
|
|
614
|
-
WHEEL_POSITIONS = 8
|
|
615
|
-
TOTAL_POSITIONS = WHEEL_POSITIONS * WHEEL_POSITIONS
|
|
616
|
-
ROTATION_STEPS = 600
|
|
617
|
-
POSITION_STEPS = ROTATION_STEPS // WHEEL_POSITIONS
|
|
618
|
-
|
|
619
|
-
def __init__(self):
|
|
620
|
-
super().__init__()
|
|
621
|
-
self.resize(1089, 650)
|
|
622
|
-
self.setMaximumSize(1100, 850)
|
|
623
|
-
self.setWindowTitle("Filterwheel GUI")
|
|
624
|
-
|
|
625
|
-
self.fw_monitoring_thread = QThread(self)
|
|
626
|
-
self.fw_monitoring_worker = FilterWheelMonitoringWorker()
|
|
627
|
-
self.fw_monitoring_worker.moveToThread(self.fw_monitoring_thread)
|
|
628
|
-
|
|
629
|
-
self.fw_monitoring_worker.fw_ri_signal.connect(self.on_fw_ri_changed)
|
|
630
|
-
self.fw_monitoring_worker.fw_fwc_signal.connect(self.on_fw_fwc_changed)
|
|
631
|
-
self.fw_monitoring_worker.fw_pos_1_signal.connect(self.on_fw_pos_1_changed)
|
|
632
|
-
self.fw_monitoring_worker.fw_pos_2_signal.connect(self.on_fw_pos_2_changed)
|
|
633
|
-
|
|
634
|
-
self.fw_monitoring_worker.shutter_status_signal.connect(self.on_shutter_changed)
|
|
635
|
-
self.fw_monitoring_worker.hartmann_status_signal.connect(self.on_hartmann_changed)
|
|
636
|
-
self.fw_monitoring_worker.pm100_power_signal.connect(self.on_power_meter_changed)
|
|
637
|
-
|
|
638
|
-
self.fw_monitoring_worker.laser_on_signal.connect(self.on_laser_changed)
|
|
639
|
-
self.fw_monitoring_worker.lamp_on_signal.connect(self.on_lamp_changed)
|
|
640
|
-
self.fw_monitoring_worker.module_fault_signal.connect(self.on_module_fault_changed)
|
|
641
|
-
self.fw_monitoring_worker.controller_fault_signal.connect(self.on_controller_fault_changed)
|
|
642
|
-
|
|
643
|
-
self.fw_monitoring_thread.started.connect(self.fw_monitoring_worker.start_process)
|
|
644
|
-
self.fw_monitoring_thread.start()
|
|
645
|
-
|
|
646
|
-
self.initUI()
|
|
647
|
-
|
|
648
|
-
def initUI(self):
|
|
649
|
-
setup = get_setup()
|
|
650
|
-
self.groupbox = OGSEWindow(setup)
|
|
651
|
-
self.setCentralWidget(self.groupbox)
|
|
652
|
-
|
|
653
|
-
# Connect relative intensity
|
|
654
|
-
for button in self.groupbox.ri_pushButtons.values():
|
|
655
|
-
button.clicked.connect(self.select_relative_intensity)
|
|
656
|
-
|
|
657
|
-
# Connect filterwheel 1 buttons
|
|
658
|
-
for button in self.groupbox.fw1_positions.values():
|
|
659
|
-
button.clicked.connect(self.select_position_wheel)
|
|
660
|
-
|
|
661
|
-
# Connect filterwheel 2 buttons
|
|
662
|
-
for button in self.groupbox.fw2_positions.values():
|
|
663
|
-
button.clicked.connect(self.select_position_wheel)
|
|
664
|
-
|
|
665
|
-
self.groupbox.pushButton_25.clicked.connect(self.toggle_shutter_control)
|
|
666
|
-
self.groupbox.pushButton_26.clicked.connect(self.toggle_shutter_control)
|
|
667
|
-
|
|
668
|
-
self.groupbox.pushButton_27.clicked.connect(self.toggle_hartmann_control)
|
|
669
|
-
self.groupbox.pushButton_28.clicked.connect(self.toggle_hartmann_control)
|
|
670
|
-
|
|
671
|
-
self.groupbox.pushButton_29.clicked.connect(self.toggle_lamp_control)
|
|
672
|
-
self.groupbox.pushButton_30.clicked.connect(self.toggle_lamp_control)
|
|
673
|
-
self.groupbox.pushButton_31.clicked.connect(self.clear_lamp_fault)
|
|
674
|
-
|
|
675
|
-
self.groupbox.lineEdit_6.textChanged.connect(self.update_scrollArea)
|
|
676
|
-
|
|
677
|
-
self.groupbox.pushButton_34.clicked.connect(self.home_filterwheel)
|
|
678
|
-
self.groupbox.pushButton_32.clicked.connect(self.decrease_intensity_wheel)
|
|
679
|
-
self.groupbox.pushButton_33.clicked.connect(self.increase_intensity_wheel)
|
|
680
|
-
|
|
681
|
-
self.groupbox.pushButton_20.clicked.connect(self.decrease_position_wheel)
|
|
682
|
-
self.groupbox.pushButton_18.clicked.connect(self.increase_position_wheel)
|
|
683
|
-
|
|
684
|
-
self.groupbox.pushButton.clicked.connect(self.decrease_position_wheel)
|
|
685
|
-
self.groupbox.pushButton_2.clicked.connect(self.increase_position_wheel)
|
|
686
|
-
|
|
687
|
-
self.home_offsets = setup.gse.filterwheel.home_offset
|
|
688
|
-
|
|
689
|
-
def select_relative_intensity(self):
|
|
690
|
-
sender = self.sender()
|
|
691
|
-
try:
|
|
692
|
-
self.actionObservers({"set_relative_intensity" : [float(sender.text())]})
|
|
693
|
-
except Exception as e:
|
|
694
|
-
warning_popup(f"set_relative_intensity {sender.text()}", e)
|
|
695
|
-
|
|
696
|
-
def increase_position_wheel(self):
|
|
697
|
-
sender = self.sender()
|
|
698
|
-
name = sender.objectName()
|
|
699
|
-
wheel = 0 if 'fw1' in name else 1
|
|
700
|
-
if 'fw1' in name:
|
|
701
|
-
current_pos = self.groupbox.lineEdit.text()
|
|
702
|
-
elif 'fw2' in name:
|
|
703
|
-
current_pos = self.groupbox.lineEdit_2.text()
|
|
704
|
-
|
|
705
|
-
try:
|
|
706
|
-
self.actionObservers({'set_position_wheel' : [int(wheel), int(current_pos) + 1]})
|
|
707
|
-
except Exception as e:
|
|
708
|
-
warning_popup(f"set_position_wheel {wheel} {int(current_pos) + 1}", e)
|
|
709
|
-
|
|
710
|
-
def decrease_position_wheel(self):
|
|
711
|
-
sender = self.sender()
|
|
712
|
-
name = sender.objectName()
|
|
713
|
-
wheel = 0 if 'fw1' in name else 1
|
|
714
|
-
if 'fw1' in name:
|
|
715
|
-
current_pos = self.groupbox.lineEdit.text()
|
|
716
|
-
elif 'fw2' in name:
|
|
717
|
-
current_pos = self.groupbox.lineEdit_2.text()
|
|
718
|
-
|
|
719
|
-
try:
|
|
720
|
-
self.actionObservers({'set_position_wheel' : [int(wheel), int(current_pos) - 1]})
|
|
721
|
-
except Exception as e:
|
|
722
|
-
warning_popup(f"set_position_wheel {wheel} {int(current_pos) - 1}", e)
|
|
723
|
-
|
|
724
|
-
def increase_intensity_wheel(self):
|
|
725
|
-
try:
|
|
726
|
-
self.actionObservers({"increase_intensity":[]})
|
|
727
|
-
except Exception as e:
|
|
728
|
-
warning_popup(f"increase_intensity", e)
|
|
729
|
-
|
|
730
|
-
def decrease_intensity_wheel(self):
|
|
731
|
-
try:
|
|
732
|
-
self.actionObservers({"decrease_intensity":[]})
|
|
733
|
-
except Exception as e:
|
|
734
|
-
warning_popup(f"decrease_intensity", e)
|
|
735
|
-
|
|
736
|
-
def home_filterwheel(self):
|
|
737
|
-
try:
|
|
738
|
-
self.actionObservers({"home_filterwheel":[]})
|
|
739
|
-
except Exception as e:
|
|
740
|
-
warning_popup(f"home_filterwheel", e)
|
|
741
|
-
|
|
742
|
-
def select_position_wheel(self):
|
|
743
|
-
sender = self.sender()
|
|
744
|
-
wheel = sender.objectName().split("_")[0]
|
|
745
|
-
wheel = 0 if wheel == "fw1" else 1
|
|
746
|
-
lens = sender.objectName().split("_")[1]
|
|
747
|
-
try:
|
|
748
|
-
self.actionObservers({"set_position_wheel" : [int(wheel), int(lens)]})
|
|
749
|
-
except Exception as e:
|
|
750
|
-
warning_popup(f"set_position_wheel {wheel} {lens}", e)
|
|
751
|
-
|
|
752
|
-
def toggle_shutter_control(self):
|
|
753
|
-
try:
|
|
754
|
-
self.actionObservers({'set_shutter' : []})
|
|
755
|
-
except Exception as e:
|
|
756
|
-
warning_popup(f"set_shutter", e)
|
|
757
|
-
|
|
758
|
-
def toggle_hartmann_control(self):
|
|
759
|
-
sender = self.sender()
|
|
760
|
-
state = True if sender.text() == 'Unmask' else False
|
|
761
|
-
|
|
762
|
-
try:
|
|
763
|
-
self.actionObservers({'set_hartmann' : [state]})
|
|
764
|
-
except Exception as e:
|
|
765
|
-
warning_popup(f"set_hartmann {state}", e)
|
|
766
|
-
|
|
767
|
-
def toggle_lamp_control(self):
|
|
768
|
-
sender = self.sender()
|
|
769
|
-
state = True if 'on' in sender.text() else False
|
|
770
|
-
|
|
771
|
-
try:
|
|
772
|
-
self.actionObservers({'set_lamp' : [state]})
|
|
773
|
-
except Exception as e:
|
|
774
|
-
warning_popup(f"set_lamp {state}", e)
|
|
775
|
-
|
|
776
|
-
def clear_lamp_fault(self):
|
|
777
|
-
try:
|
|
778
|
-
self.actionObservers({'fix_controller_fault': []})
|
|
779
|
-
except Exception as e:
|
|
780
|
-
warning_popup("fix_controller_fault", e)
|
|
781
|
-
|
|
782
|
-
def update_scrollArea(self, text):
|
|
783
|
-
for button in self.groupbox.ri_pushButtons.values():
|
|
784
|
-
if text in button.text():
|
|
785
|
-
button.show()
|
|
786
|
-
else:
|
|
787
|
-
button.hide()
|
|
788
|
-
|
|
789
|
-
row = 0
|
|
790
|
-
column = 0
|
|
791
|
-
for button in self.groupbox.ri_pushButtons.values():
|
|
792
|
-
self.groupbox.gridLayout_2.removeWidget(button)
|
|
793
|
-
if button.isVisible():
|
|
794
|
-
self.groupbox.gridLayout_2.addWidget(button, row, column % 4)
|
|
795
|
-
column += 1
|
|
796
|
-
if column >= 4 and column % 4 == 0:
|
|
797
|
-
row += 1
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
def on_fw_ri_changed(self, monitoring_info: float):
|
|
801
|
-
self.groupbox.lineEdit_3.setText(f"{monitoring_info:4e}")
|
|
802
|
-
|
|
803
|
-
def on_fw_fwc_changed(self, monitoring_info: float):
|
|
804
|
-
self.groupbox.lineEdit_4.setText(f"{monitoring_info:4e}")
|
|
805
|
-
|
|
806
|
-
def on_fw_pos_1_changed(self, monitoring_info: int):
|
|
807
|
-
self.groupbox.lineEdit.setText(f"{(monitoring_info - self.home_offsets[0]) // self.POSITION_STEPS % self.WHEEL_POSITIONS}")
|
|
808
|
-
|
|
809
|
-
def on_fw_pos_2_changed(self, monitoring_info: int):
|
|
810
|
-
self.groupbox.lineEdit_2.setText(f"{(monitoring_info - self.home_offsets[1]) // self.POSITION_STEPS % self.WHEEL_POSITIONS}")
|
|
811
|
-
|
|
812
|
-
def on_shutter_changed(self, monitoring_info: bool):
|
|
813
|
-
if monitoring_info:
|
|
814
|
-
self.groupbox.widget.set_color(1)
|
|
815
|
-
self.groupbox.pushButton_25.setEnabled(False)
|
|
816
|
-
self.groupbox.pushButton_26.setEnabled(True)
|
|
817
|
-
else:
|
|
818
|
-
self.groupbox.widget.set_color(3)
|
|
819
|
-
self.groupbox.pushButton_25.setEnabled(True)
|
|
820
|
-
self.groupbox.pushButton_26.setEnabled(False)
|
|
821
|
-
|
|
822
|
-
def on_hartmann_changed(self, monitoring_info: bool):
|
|
823
|
-
if not monitoring_info:
|
|
824
|
-
self.groupbox.widget_2.set_color(1)
|
|
825
|
-
self.groupbox.pushButton_27.setEnabled(False)
|
|
826
|
-
self.groupbox.pushButton_28.setEnabled(True)
|
|
827
|
-
else:
|
|
828
|
-
self.groupbox.widget_2.set_color(3)
|
|
829
|
-
self.groupbox.pushButton_27.setEnabled(True)
|
|
830
|
-
self.groupbox.pushButton_28.setEnabled(False)
|
|
831
|
-
|
|
832
|
-
def on_power_meter_changed(self, monitoring_info):
|
|
833
|
-
self.groupbox.lineEdit_5.setText(f'{monitoring_info:.3e} W')
|
|
834
|
-
|
|
835
|
-
def on_laser_changed(self, monitoring_info: bool):
|
|
836
|
-
if monitoring_info:
|
|
837
|
-
self.groupbox.widget_3.set_color(1)
|
|
838
|
-
self.groupbox.pushButton_29.setEnabled(False)
|
|
839
|
-
self.groupbox.pushButton_30.setEnabled(True)
|
|
840
|
-
else:
|
|
841
|
-
self.groupbox.widget_3.set_color(3)
|
|
842
|
-
self.groupbox.pushButton_29.setEnabled(True)
|
|
843
|
-
self.groupbox.pushButton_30.setEnabled(False)
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
def on_lamp_changed(self, monitoring_info: bool):
|
|
847
|
-
if monitoring_info:
|
|
848
|
-
self.groupbox.widget_4.set_color(1)
|
|
849
|
-
else:
|
|
850
|
-
self.groupbox.widget_4.set_color(3)
|
|
851
|
-
|
|
852
|
-
def on_module_fault_changed(self, monitoring_info: bool):
|
|
853
|
-
if monitoring_info:
|
|
854
|
-
self.groupbox.widget_5.set_color(2)
|
|
855
|
-
else:
|
|
856
|
-
self.groupbox.widget_5.set_color(1)
|
|
857
|
-
|
|
858
|
-
def on_controller_fault_changed(self, monitoring_info: bool):
|
|
859
|
-
if monitoring_info:
|
|
860
|
-
self.groupbox.widget_6.set_color(2)
|
|
861
|
-
self.groupbox.pushButton_31.setEnabled(True) # Change to true when implemented and tested
|
|
862
|
-
else:
|
|
863
|
-
self.groupbox.widget_6.set_color(1)
|
|
864
|
-
self.groupbox.pushButton_31.setEnabled(False)
|
|
865
|
-
|
|
866
|
-
def warning_popup(command, error):
|
|
867
|
-
msgBox = QMessageBox()
|
|
868
|
-
msgBox.setWindowTitle("OGSE error occured")
|
|
869
|
-
msgBox.setIcon(QMessageBox.Warning)
|
|
870
|
-
msgBox.setText(f"An error occured while executing: {command}")
|
|
871
|
-
msgBox.setInformativeText(f"{error}")
|
|
872
|
-
msgBox.setStandardButtons(QMessageBox.Ok)
|
|
873
|
-
msgBox.exec_()
|
|
874
|
-
|
|
875
|
-
class OGSEUIModel:
|
|
876
|
-
def __init__(self, mode):
|
|
877
|
-
pass
|
|
878
|
-
|
|
879
|
-
def has_commands(self):
|
|
880
|
-
if self.mode == 'proxy':
|
|
881
|
-
with Fw8Smc5Proxy() as fw:
|
|
882
|
-
fw.has_commands()
|
|
883
|
-
|
|
884
|
-
return True
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
def load_commands(self):
|
|
888
|
-
if self.mode == 'proxy':
|
|
889
|
-
with Fw8Smc5Proxy() as fw:
|
|
890
|
-
fw.load_commands()
|
|
891
|
-
|
|
892
|
-
def is_simulator(self):
|
|
893
|
-
with Fw8Smc5Proxy() as fw:
|
|
894
|
-
fw.is_simulator()
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
def is_connected(self):
|
|
898
|
-
with Fw8Smc5Proxy() as fw:
|
|
899
|
-
fw.is_cs_connected()
|
|
900
|
-
|
|
901
|
-
def reconnect(self):
|
|
902
|
-
if self.mode == "proxy":
|
|
903
|
-
with Fw8Smc5Proxy() as fw:
|
|
904
|
-
fw.reconnect()
|
|
905
|
-
return self.fw.is_cs_connected()
|
|
906
|
-
return False
|
|
907
|
-
|
|
908
|
-
def disconnect(self):
|
|
909
|
-
if self.mode == "proxy":
|
|
910
|
-
with Fw8Smc5Proxy() as fw:
|
|
911
|
-
return fw.disconnect_cs()
|
|
912
|
-
|
|
913
|
-
elif self.mode == 'simulator':
|
|
914
|
-
return self.fw.disconnect()
|
|
915
|
-
|
|
916
|
-
def set_position_wheel(self, id, position):
|
|
917
|
-
with Fw8Smc5Proxy() as fw:
|
|
918
|
-
fw.set_position_wheel(id, position)
|
|
919
|
-
|
|
920
|
-
def set_relative_intensity(self, rel_intensity):
|
|
921
|
-
with Fw8Smc5Proxy() as fw:
|
|
922
|
-
fw.set_relative_intensity(rel_intensity)
|
|
923
|
-
|
|
924
|
-
def toggle_shutter(self):
|
|
925
|
-
with Sc10Proxy() as sc10:
|
|
926
|
-
sc10.toggle_enable()
|
|
927
|
-
|
|
928
|
-
def set_hartmann(self, state):
|
|
929
|
-
with Smd3Proxy() as smd3:
|
|
930
|
-
smd3.move_mask_fov(state)
|
|
931
|
-
|
|
932
|
-
def increase_position_wheel(self):
|
|
933
|
-
with Fw8Smc5Proxy() as fw:
|
|
934
|
-
fw.intensity_level_up()
|
|
935
|
-
|
|
936
|
-
def decrease_position_wheel(self):
|
|
937
|
-
with Fw8Smc5Proxy() as fw:
|
|
938
|
-
fw.intensity_level_down()
|
|
939
|
-
|
|
940
|
-
def home_filterwheel(self):
|
|
941
|
-
with Fw8Smc5Proxy() as fw:
|
|
942
|
-
fw.home()
|
|
943
|
-
|
|
944
|
-
def set_lamp(self, state):
|
|
945
|
-
with BeagleboneProxy() as bb:
|
|
946
|
-
bb.set_lamp(state)
|
|
947
|
-
|
|
948
|
-
def fix_controller_fault(self):
|
|
949
|
-
with BeagleboneProxy() as bb:
|
|
950
|
-
bb.fix_controller_fault()
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
class OGSEUIController(Observer):
|
|
954
|
-
def __init__(self, model: OGSEUIModel, view: OGSEUIView):
|
|
955
|
-
self.model = model
|
|
956
|
-
self.view = view
|
|
957
|
-
self.view.addObserver(self)
|
|
958
|
-
|
|
959
|
-
def update(self, changed_object):
|
|
960
|
-
|
|
961
|
-
text = changed_object.text()
|
|
962
|
-
|
|
963
|
-
if text == "Reconnect":
|
|
964
|
-
|
|
965
|
-
if changed_object.isChecked():
|
|
966
|
-
|
|
967
|
-
logger.debug("Reconnecting the Heater model.")
|
|
968
|
-
|
|
969
|
-
if self.model.reconnect():
|
|
970
|
-
|
|
971
|
-
self.view.set_connection_state(True)
|
|
972
|
-
|
|
973
|
-
if not self.model.has_commands():
|
|
974
|
-
|
|
975
|
-
self.model.load_commands()
|
|
976
|
-
|
|
977
|
-
else:
|
|
978
|
-
self.view.reconnect_action.setChecked(False)
|
|
979
|
-
else:
|
|
980
|
-
|
|
981
|
-
logger.debug("Disconnecting the Heater model.")
|
|
982
|
-
self.model.disconnect()
|
|
983
|
-
self.view.set_connection_state(False)
|
|
984
|
-
|
|
985
|
-
return
|
|
986
|
-
|
|
987
|
-
def do(self, actions):
|
|
988
|
-
for action, value in actions.items():
|
|
989
|
-
logger.debug(f"do {action} with {value}")
|
|
990
|
-
|
|
991
|
-
if action == "set_relative_intensity":
|
|
992
|
-
rel_intensity = value[0]
|
|
993
|
-
|
|
994
|
-
self.model.set_relative_intensity(rel_intensity)
|
|
995
|
-
if action == "set_position_wheel":
|
|
996
|
-
idx = value[0]
|
|
997
|
-
position = value[1]
|
|
998
|
-
|
|
999
|
-
self.model.set_position_wheel(idx, position)
|
|
1000
|
-
|
|
1001
|
-
if action == 'set_shutter':
|
|
1002
|
-
self.model.toggle_shutter()
|
|
1003
|
-
|
|
1004
|
-
if action == 'set_hartmann':
|
|
1005
|
-
state = value[0]
|
|
1006
|
-
|
|
1007
|
-
self.model.set_hartmann(state)
|
|
1008
|
-
if action == "increase_intensity":
|
|
1009
|
-
self.model.increase_position_wheel()
|
|
1010
|
-
if action == "decrease_intensity":
|
|
1011
|
-
self.model.decrease_position_wheel()
|
|
1012
|
-
if action == "home_filterwheel":
|
|
1013
|
-
self.model.home_filterwheel()
|
|
1014
|
-
if action == "set_lamp":
|
|
1015
|
-
state = value[0]
|
|
1016
|
-
self.model.set_lamp(state)
|
|
1017
|
-
if action == "fix_controller_fault":
|
|
1018
|
-
self.model.fix_controller_fault()
|
|
1019
|
-
|
|
1020
|
-
def parse_arguments():
|
|
1021
|
-
"""
|
|
1022
|
-
Prepare the arguments that are specific for this application.
|
|
1023
|
-
"""
|
|
1024
|
-
parser = argparse.ArgumentParser()
|
|
1025
|
-
parser.add_argument(
|
|
1026
|
-
"--type",
|
|
1027
|
-
dest="type",
|
|
1028
|
-
action="store",
|
|
1029
|
-
choices={"proxy", "simulator"},
|
|
1030
|
-
help="Specify Filterwheel implementation you want to connect to.",
|
|
1031
|
-
default="proxy",
|
|
1032
|
-
)
|
|
1033
|
-
|
|
1034
|
-
args = parser.parse_args()
|
|
1035
|
-
return args
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
def main():
|
|
1039
|
-
lock_file = QLockFile(str(Path("~/fw8scm5_ui.app.lock").expanduser()))
|
|
1040
|
-
|
|
1041
|
-
args = list(sys.argv)
|
|
1042
|
-
app = QApplication(args)
|
|
1043
|
-
app.setWindowIcon(QIcon(str(get_resource(":/icons/color-scheme.svg"))))
|
|
1044
|
-
|
|
1045
|
-
if lock_file.tryLock(100):
|
|
1046
|
-
args = parse_arguments()
|
|
1047
|
-
|
|
1048
|
-
view = OGSEUIView()
|
|
1049
|
-
model = OGSEUIModel(args.type)
|
|
1050
|
-
controller = OGSEUIController(model, view)
|
|
1051
|
-
|
|
1052
|
-
view.show()
|
|
1053
|
-
return app.exec_()
|
|
1054
|
-
else:
|
|
1055
|
-
error_message = QMessageBox()
|
|
1056
|
-
error_message.setIcon(QMessageBox.Warning)
|
|
1057
|
-
error_message.setWindowTitle("Error")
|
|
1058
|
-
error_message.setText("The FW8SMC4 GUI application is already running!")
|
|
1059
|
-
error_message.setStandardButtons(QMessageBox.Ok)
|
|
1060
|
-
|
|
1061
|
-
return error_message.exec()
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
if __name__ == "__main__":
|
|
1065
|
-
sys.exit(main())
|