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,83 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import re
|
|
3
|
-
|
|
4
|
-
logger = logging.getLogger(__name__)
|
|
5
|
-
|
|
6
|
-
regex_response = {
|
|
7
|
-
# Error message as ERRXXX
|
|
8
|
-
"ERROR": re.compile(r"\a(ERR\d{3})\r"),
|
|
9
|
-
# a floating point number [-]x[.[xxx]], possibly followed by spaces
|
|
10
|
-
"FLOAT": re.compile(r"(-?(\d*\.)?\d+)\s*\r\x06"),
|
|
11
|
-
# an integer number possible [-]iiiii, possibly followed by spaces
|
|
12
|
-
"INT": re.compile(r"(-?\d+)\s*\r\x06"),
|
|
13
|
-
# Anything else, stripping off '\x06'
|
|
14
|
-
"ANY": re.compile(r"(.*)\x06"),
|
|
15
|
-
# Just the null character
|
|
16
|
-
"NUL": re.compile(r"(\x00)"),
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def match_regex_response(regex_prog, res):
|
|
21
|
-
"""
|
|
22
|
-
This 'matches' from the start of the string 'res'. If you want to match anywhere in the
|
|
23
|
-
string, you will need to make another function search_regex_response() with 'search' instead
|
|
24
|
-
of 'match'.
|
|
25
|
-
|
|
26
|
-
Return None if no match and the match object otherwise.
|
|
27
|
-
"""
|
|
28
|
-
logger.flash_flood(f"res = {res} with type {type(res)}")
|
|
29
|
-
if isinstance(res, bytes):
|
|
30
|
-
res = res.decode()
|
|
31
|
-
match_obj = regex_prog.match(res)
|
|
32
|
-
return match_obj
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def patter_n_int(nr):
|
|
36
|
-
return re.compile(fr"(-?\d+)\r((-?\d+)\r){{{nr}}}\x06")
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def patter_n_float(nr):
|
|
40
|
-
return re.compile(fr"(-?\d+)\r((-?(\d*\.)?\d+)\r){{{nr}}}\x06")
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def match_int_response(res):
|
|
44
|
-
match_obj = match_regex_response(regex_response["INT"], res)
|
|
45
|
-
if match_obj is None:
|
|
46
|
-
logger.error(f"Could not parse INT response for {res}")
|
|
47
|
-
return None
|
|
48
|
-
return int(match_obj[1])
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def match_float_response(res):
|
|
52
|
-
match_obj = match_regex_response(regex_response["FLOAT"], res)
|
|
53
|
-
if match_obj is None:
|
|
54
|
-
logger.error(f"Could not parse FLOAT response for {res}")
|
|
55
|
-
return None
|
|
56
|
-
return float(match_obj[1])
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def match_error_response(res):
|
|
60
|
-
match_obj = match_regex_response(regex_response["ERROR"], res)
|
|
61
|
-
if match_obj is None:
|
|
62
|
-
logger.error(f"Could not parse ERROR response for {res}")
|
|
63
|
-
return None
|
|
64
|
-
return match_obj[1]
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def match_nul_response(res):
|
|
68
|
-
match_obj = match_regex_response(regex_response["NUL"], res)
|
|
69
|
-
if match_obj is None:
|
|
70
|
-
logger.error(f"Could not parse NUL response for {res}")
|
|
71
|
-
return None
|
|
72
|
-
return match_obj[1]
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def match_string_response(res):
|
|
76
|
-
match_obj = match_regex_response(regex_response["ANY"], res)
|
|
77
|
-
if match_obj is None:
|
|
78
|
-
logger.error(f"Could not parse STRING response for {res}")
|
|
79
|
-
return None
|
|
80
|
-
if len(match_obj[1]) > 0 and match_obj[1][-1] == "\r":
|
|
81
|
-
return match_obj[1][:-1]
|
|
82
|
-
else:
|
|
83
|
-
return match_obj[1]
|
egse/graph.py
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
The graph module defines classes and functions to work with graphs.
|
|
3
|
-
|
|
4
|
-
This code is taken and adapted from the book:
|
|
5
|
-
|
|
6
|
-
Classic Computer Science Problems in Python, David Kopec, 2019.
|
|
7
|
-
"""
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
from dataclasses import dataclass
|
|
10
|
-
from typing import Generic, TypeVar, List
|
|
11
|
-
|
|
12
|
-
V = TypeVar('V') # type of the vertices in the graph
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@dataclass
|
|
16
|
-
class Edge:
|
|
17
|
-
"""
|
|
18
|
-
An Edge defines the connection between two vertices.
|
|
19
|
-
Each vertex is represented by an integer index. By convention,
|
|
20
|
-
`u` refers to the first, i.e. 'from', vertex and `v` represents the
|
|
21
|
-
second, i.e. 'to', vertex. By this definition, an Edge is directed
|
|
22
|
-
from vertex 'u' to vertex 'v'.
|
|
23
|
-
"""
|
|
24
|
-
u: int # the 'from' vertex
|
|
25
|
-
v: int # the 'to' vertex
|
|
26
|
-
|
|
27
|
-
def reversed(self) -> Edge:
|
|
28
|
-
"""Returns the reverse connection of this Edge."""
|
|
29
|
-
return Edge(self.v, self.u)
|
|
30
|
-
|
|
31
|
-
def __str__(self) -> str:
|
|
32
|
-
return f"{self.u} -> {self.v}"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class Graph(Generic[V]):
|
|
36
|
-
def __init__(self, vertices: List[V] = None) -> None:
|
|
37
|
-
if vertices is None:
|
|
38
|
-
vertices = []
|
|
39
|
-
self._vertices: List[V] = vertices
|
|
40
|
-
self._edges: List[List[Edge]] = [[] for _ in vertices]
|
|
41
|
-
|
|
42
|
-
@property
|
|
43
|
-
def vertex_count(self) -> int:
|
|
44
|
-
"""Returns the number of vertices."""
|
|
45
|
-
return len(self._vertices)
|
|
46
|
-
|
|
47
|
-
@property
|
|
48
|
-
def edge_count(self) -> int:
|
|
49
|
-
"""Returns the number of edges."""
|
|
50
|
-
return sum(map(len, self._edges))
|
|
51
|
-
|
|
52
|
-
def add_vertex(self, vertex: V) -> int:
|
|
53
|
-
"""Adds a vertex to the graph and returns its index."""
|
|
54
|
-
self._vertices.append(vertex)
|
|
55
|
-
self._edges.append([])
|
|
56
|
-
return self.vertex_count - 1
|
|
57
|
-
|
|
58
|
-
def add_edge(self, edge: Edge) -> None:
|
|
59
|
-
"""
|
|
60
|
-
Add a edge to the graph. Since this is an undirected graph,
|
|
61
|
-
we always add edges in both directions.
|
|
62
|
-
"""
|
|
63
|
-
self._edges[edge.u].append(edge)
|
|
64
|
-
self._edges[edge.v].append(edge.reversed())
|
|
65
|
-
|
|
66
|
-
def add_edge_by_index(self, u: int, v: int) -> None:
|
|
67
|
-
"""
|
|
68
|
-
Convenience method to add an edge by index.
|
|
69
|
-
|
|
70
|
-
Args:
|
|
71
|
-
u (int): the index of the 'from' vertex
|
|
72
|
-
v (int): the index of the 'to' vertex
|
|
73
|
-
"""
|
|
74
|
-
edge: Edge = Edge(u, v)
|
|
75
|
-
self.add_edge(edge)
|
|
76
|
-
|
|
77
|
-
def add_edge_by_vertices(self, first: V, second: V) -> None:
|
|
78
|
-
"""
|
|
79
|
-
Convenience method to add an edge by looking up Vertex indices.
|
|
80
|
-
|
|
81
|
-
Args:
|
|
82
|
-
first (V): the first 'from' vertex
|
|
83
|
-
second (V): the second 'to' vertex
|
|
84
|
-
"""
|
|
85
|
-
u: int = self._vertices.index(first)
|
|
86
|
-
v: int = self._vertices.index(second)
|
|
87
|
-
self.add_edge_by_index(u, v)
|
|
88
|
-
|
|
89
|
-
def vertex_at(self, index: int) -> V:
|
|
90
|
-
"""Finds the vertex at a specific index."""
|
|
91
|
-
return self._vertices[index]
|
|
92
|
-
|
|
93
|
-
def index_of(self, vertex: V) -> int:
|
|
94
|
-
"""Finds the index of a vertex in the graph."""
|
|
95
|
-
return self._vertices.index(vertex)
|
|
96
|
-
|
|
97
|
-
def neighbors_for_index(self, index: int) -> List[V]:
|
|
98
|
-
"""Returns all the vertices that a vertex at a specific index is connected to."""
|
|
99
|
-
return [self.vertex_at(e.v) for e in self._edges[index]]
|
|
100
|
-
|
|
101
|
-
def neighbors_for_vertex(self, vertex: V) -> List[V]:
|
|
102
|
-
"""Returns all the vertices that the given vertex is connected to."""
|
|
103
|
-
return self.neighbors_for_index(self.index_of(vertex))
|
|
104
|
-
|
|
105
|
-
def edges_for_index(self, index: int) -> List[Edge]:
|
|
106
|
-
"""Returns all the edges that are associated with a vertex at the given index."""
|
|
107
|
-
return self._edges[index]
|
|
108
|
-
|
|
109
|
-
def edges_for_vertex(self, vertex: V) -> List[Edge]:
|
|
110
|
-
"""Returns all the edges that are associated with the given vertex."""
|
|
111
|
-
return self.edges_for_index(self.index_of(vertex))
|
|
112
|
-
|
|
113
|
-
def __str__(self) -> str:
|
|
114
|
-
desc: str = ""
|
|
115
|
-
for idx in range(self.vertex_count):
|
|
116
|
-
desc += f"{self.vertex_at(idx)} -> {self.neighbors_for_index(idx)}\n"
|
|
117
|
-
return desc
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
# The Graph implementation is that of an undirected graph
|
|
121
|
-
|
|
122
|
-
UndirectedGraph = Graph
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
class DirectedGraph(Graph):
|
|
126
|
-
def add_edge(self, edge: Edge) -> None:
|
|
127
|
-
"""
|
|
128
|
-
Add a edge to the graph. Since this is an directed graph, we add just this edge to the graph.
|
|
129
|
-
"""
|
|
130
|
-
self._edges[edge.u].append(edge)
|
|
131
|
-
|
|
132
|
-
|
egse/gui/__init__.py
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
from PyQt5.QtWidgets import QFrame
|
|
2
|
-
from PyQt5.QtWidgets import QMessageBox
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def show_warning_message(description: str, info_text: str = None, detailed_text: str = None):
|
|
6
|
-
msg_box = QMessageBox()
|
|
7
|
-
|
|
8
|
-
msg_box.setWindowTitle("Warning")
|
|
9
|
-
msg_box.setIcon(QMessageBox.Warning)
|
|
10
|
-
msg_box.setText(description)
|
|
11
|
-
if info_text is not None:
|
|
12
|
-
msg_box.setInformativeText(info_text)
|
|
13
|
-
if detailed_text is not None:
|
|
14
|
-
msg_box.setDetailedText(detailed_text)
|
|
15
|
-
msg_box.setStandardButtons(QMessageBox.Ok)
|
|
16
|
-
msg_box.exec_()
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def show_info_message(description: str, info_text: str = None, detailed_text: str = None):
|
|
20
|
-
msg_box = QMessageBox()
|
|
21
|
-
|
|
22
|
-
msg_box.setWindowTitle("Warning")
|
|
23
|
-
msg_box.setIcon(QMessageBox.Information)
|
|
24
|
-
msg_box.setText(description)
|
|
25
|
-
if info_text is not None:
|
|
26
|
-
msg_box.setInformativeText(info_text)
|
|
27
|
-
if detailed_text is not None:
|
|
28
|
-
msg_box.setDetailedText(detailed_text)
|
|
29
|
-
msg_box.setStandardButtons(QMessageBox.Ok)
|
|
30
|
-
msg_box.exec_()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class VLine(QFrame):
|
|
34
|
-
"""Presents a simple Vertical Bar that can be used in e.g. the status bar."""
|
|
35
|
-
|
|
36
|
-
def __init__(self):
|
|
37
|
-
super().__init__()
|
|
38
|
-
self.setFrameShape(self.VLine | self.Sunken)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class QHLine(QFrame):
|
|
42
|
-
"""Presents a simple Horizontal Bar that can be used in e.g. the status bar."""
|
|
43
|
-
|
|
44
|
-
def __init__(self):
|
|
45
|
-
super(QHLine, self). __init__()
|
|
46
|
-
self.setFrameShape(QFrame.HLine)
|
|
47
|
-
self.setFrameShadow(QFrame.Sunken)
|
egse/gui/buttons.py
DELETED
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
from typing import Optional
|
|
4
|
-
from typing import Union
|
|
5
|
-
|
|
6
|
-
from PyQt5.QtCore import QPoint
|
|
7
|
-
from PyQt5.QtCore import Qt
|
|
8
|
-
from PyQt5.QtGui import QPainter
|
|
9
|
-
from PyQt5.QtSvg import QSvgRenderer
|
|
10
|
-
from PyQt5.QtWidgets import QApplication
|
|
11
|
-
from PyQt5.QtWidgets import QCheckBox
|
|
12
|
-
from PyQt5.QtWidgets import QPushButton
|
|
13
|
-
from PyQt5.QtWidgets import QToolButton
|
|
14
|
-
from PyQt5.QtWidgets import QWidget
|
|
15
|
-
|
|
16
|
-
from egse.resource import get_resource
|
|
17
|
-
|
|
18
|
-
BUTTON_DISABLED = 0
|
|
19
|
-
BUTTON_SELECTED = 1
|
|
20
|
-
BUTTON_NOT_SELECTED = 2
|
|
21
|
-
BUTTON_NO_CHANGE = 3
|
|
22
|
-
BUTTON_ACTIONED = 4
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
# Use the ToolTouchButton when you do not have a QToolBar to manage your buttons,
|
|
26
|
-
# but you have them in a QVBoxLayout or QHBoxLayout. The other TouchButton will not
|
|
27
|
-
# properly work if not used in a QToolBar, i.e. the icons will not have the proper size.
|
|
28
|
-
|
|
29
|
-
class ToolTouchButton(QToolButton):
|
|
30
|
-
def __init__(
|
|
31
|
-
self,
|
|
32
|
-
width: int = 32,
|
|
33
|
-
height: int = 32,
|
|
34
|
-
name: str = None,
|
|
35
|
-
status_tip: str = None,
|
|
36
|
-
selected: Union[str, Path] = None,
|
|
37
|
-
disabled: Union[str, Path] = None,
|
|
38
|
-
parent: Optional[QWidget] = None
|
|
39
|
-
):
|
|
40
|
-
super().__init__(parent=parent)
|
|
41
|
-
|
|
42
|
-
self.setFixedSize(width, height)
|
|
43
|
-
self.setCursor(Qt.PointingHandCursor)
|
|
44
|
-
self.setText(name)
|
|
45
|
-
self.setStatusTip(status_tip)
|
|
46
|
-
|
|
47
|
-
self.status_tip = status_tip
|
|
48
|
-
|
|
49
|
-
self.button_selected = selected
|
|
50
|
-
self.button_disabled = disabled
|
|
51
|
-
|
|
52
|
-
self.resource = {
|
|
53
|
-
BUTTON_DISABLED: self.button_disabled,
|
|
54
|
-
BUTTON_SELECTED: self.button_selected,
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
self.state = BUTTON_SELECTED
|
|
58
|
-
self.disabled = False
|
|
59
|
-
|
|
60
|
-
self.clicked.connect(self.handle_clicked)
|
|
61
|
-
|
|
62
|
-
def handle_clicked(self):
|
|
63
|
-
self.repaint()
|
|
64
|
-
|
|
65
|
-
def print_clicked(self, *args, **kwargs):
|
|
66
|
-
print(f"clicked: {args=}, {kwargs=}")
|
|
67
|
-
print(f" {self.text()=}")
|
|
68
|
-
self.repaint()
|
|
69
|
-
|
|
70
|
-
def print_pressed(self, *args, **kwargs):
|
|
71
|
-
print(f"pressed: {args=}, {kwargs=}")
|
|
72
|
-
|
|
73
|
-
def print_released(self, *args, **kwargs):
|
|
74
|
-
print(f"released: {args=}, {kwargs=}")
|
|
75
|
-
|
|
76
|
-
def setDisabled(self, flag: bool = True):
|
|
77
|
-
self.disabled = flag
|
|
78
|
-
super().setDisabled(flag)
|
|
79
|
-
self.setStatusTip(f"{self.status_tip or ''} {'[DISABLED]' if flag else ''}")
|
|
80
|
-
|
|
81
|
-
def disable(self):
|
|
82
|
-
self.setDisabled(True)
|
|
83
|
-
|
|
84
|
-
def enable(self):
|
|
85
|
-
self.setDisabled(False)
|
|
86
|
-
|
|
87
|
-
def hitButton(self, pos: QPoint):
|
|
88
|
-
return self.contentsRect().contains(pos)
|
|
89
|
-
|
|
90
|
-
def paintEvent(self, *args, **kwargs):
|
|
91
|
-
|
|
92
|
-
painter = QPainter(self)
|
|
93
|
-
painter.setRenderHint(QPainter.Antialiasing)
|
|
94
|
-
painter.setPen(Qt.NoPen)
|
|
95
|
-
|
|
96
|
-
self.drawCustomWidget(painter)
|
|
97
|
-
|
|
98
|
-
painter.end()
|
|
99
|
-
|
|
100
|
-
def drawCustomWidget(self, painter):
|
|
101
|
-
renderer = QSvgRenderer()
|
|
102
|
-
resource = self.resource[self.state if not self.disabled else BUTTON_DISABLED]
|
|
103
|
-
renderer.load(str(resource))
|
|
104
|
-
renderer.render(painter)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
class TouchButton(QPushButton):
|
|
108
|
-
def __init__(
|
|
109
|
-
self,
|
|
110
|
-
width: int = 32,
|
|
111
|
-
height: int = 32,
|
|
112
|
-
name: str = None,
|
|
113
|
-
status_tip: str = None,
|
|
114
|
-
selected: Union[str, Path] = None,
|
|
115
|
-
disabled: Union[str, Path] = None,
|
|
116
|
-
parent: Optional[QWidget] = None
|
|
117
|
-
):
|
|
118
|
-
super().__init__(parent=parent)
|
|
119
|
-
|
|
120
|
-
self.setFixedSize(width, height)
|
|
121
|
-
self.setCursor(Qt.PointingHandCursor)
|
|
122
|
-
self.setText(name)
|
|
123
|
-
self.setStatusTip(status_tip)
|
|
124
|
-
|
|
125
|
-
self.status_tip = status_tip
|
|
126
|
-
|
|
127
|
-
self.button_selected = selected
|
|
128
|
-
self.button_disabled = disabled
|
|
129
|
-
|
|
130
|
-
self.resource = {
|
|
131
|
-
BUTTON_DISABLED: self.button_disabled,
|
|
132
|
-
BUTTON_SELECTED: self.button_selected,
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
self.state = BUTTON_SELECTED
|
|
136
|
-
self.disabled = False
|
|
137
|
-
|
|
138
|
-
self.clicked.connect(self.handle_clicked)
|
|
139
|
-
|
|
140
|
-
def handle_clicked(self):
|
|
141
|
-
self.repaint()
|
|
142
|
-
|
|
143
|
-
def print_clicked(self, *args, **kwargs):
|
|
144
|
-
print(f"clicked: {args=}, {kwargs=}")
|
|
145
|
-
print(f" {self.text()=}")
|
|
146
|
-
self.repaint()
|
|
147
|
-
|
|
148
|
-
def print_pressed(self, *args, **kwargs):
|
|
149
|
-
print(f"pressed: {args=}, {kwargs=}")
|
|
150
|
-
|
|
151
|
-
def print_released(self, *args, **kwargs):
|
|
152
|
-
print(f"released: {args=}, {kwargs=}")
|
|
153
|
-
|
|
154
|
-
def setDisabled(self, flag: bool = True):
|
|
155
|
-
self.disabled = flag
|
|
156
|
-
super().setDisabled(flag)
|
|
157
|
-
self.setStatusTip(f"{self.status_tip or ''} {'[DISABLED]' if flag else ''}")
|
|
158
|
-
|
|
159
|
-
def disable(self):
|
|
160
|
-
self.setDisabled(True)
|
|
161
|
-
|
|
162
|
-
def enable(self):
|
|
163
|
-
self.setDisabled(False)
|
|
164
|
-
|
|
165
|
-
def hitButton(self, pos: QPoint):
|
|
166
|
-
return self.contentsRect().contains(pos)
|
|
167
|
-
|
|
168
|
-
def paintEvent(self, *args, **kwargs):
|
|
169
|
-
|
|
170
|
-
painter = QPainter(self)
|
|
171
|
-
painter.setRenderHint(QPainter.Antialiasing)
|
|
172
|
-
painter.setPen(Qt.NoPen)
|
|
173
|
-
|
|
174
|
-
self.drawCustomWidget(painter)
|
|
175
|
-
|
|
176
|
-
painter.end()
|
|
177
|
-
|
|
178
|
-
def drawCustomWidget(self, painter):
|
|
179
|
-
renderer = QSvgRenderer()
|
|
180
|
-
resource = self.resource[self.state if not self.disabled else BUTTON_DISABLED]
|
|
181
|
-
renderer.load(str(resource))
|
|
182
|
-
renderer.render(painter)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
class ToggleButton(QCheckBox):
|
|
186
|
-
def __init__(
|
|
187
|
-
self,
|
|
188
|
-
width: int = 32,
|
|
189
|
-
height: int = 32,
|
|
190
|
-
name: str = None,
|
|
191
|
-
status_tip: str = None,
|
|
192
|
-
selected: Union[str, Path] = None,
|
|
193
|
-
not_selected: Union[str, Path] = None,
|
|
194
|
-
no_change: Union[str, Path] = None,
|
|
195
|
-
disabled: Union[str, Path, list] = None,
|
|
196
|
-
tristate: bool = False,
|
|
197
|
-
parent: Optional[QWidget] = None
|
|
198
|
-
):
|
|
199
|
-
super().__init__(parent=parent)
|
|
200
|
-
|
|
201
|
-
self.setFixedSize(width, height)
|
|
202
|
-
self.setCursor(Qt.PointingHandCursor)
|
|
203
|
-
self.setTristate(tristate)
|
|
204
|
-
self.setText(name)
|
|
205
|
-
self.setStatusTip(status_tip)
|
|
206
|
-
|
|
207
|
-
self.status_tip = status_tip
|
|
208
|
-
|
|
209
|
-
self.max_states = 3 if tristate else 2
|
|
210
|
-
|
|
211
|
-
self.button_selected = selected
|
|
212
|
-
self.button_not_selected = not_selected
|
|
213
|
-
self.no_change = no_change
|
|
214
|
-
if isinstance(disabled, list):
|
|
215
|
-
# this assumed we do not change the states definition anymore!
|
|
216
|
-
self.button_disabled = [0, *disabled]
|
|
217
|
-
else:
|
|
218
|
-
self.button_disabled = [0, disabled, disabled, disabled]
|
|
219
|
-
|
|
220
|
-
self.resource = {
|
|
221
|
-
BUTTON_DISABLED: self.button_disabled,
|
|
222
|
-
BUTTON_SELECTED: self.button_selected,
|
|
223
|
-
BUTTON_NOT_SELECTED: self.button_not_selected,
|
|
224
|
-
BUTTON_NO_CHANGE: self.no_change,
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
self.state = BUTTON_SELECTED
|
|
228
|
-
self.disabled = False
|
|
229
|
-
|
|
230
|
-
self.clicked.connect(self.handle_clicked)
|
|
231
|
-
|
|
232
|
-
def __str__(self):
|
|
233
|
-
return f"ToggleButton: name={self.text()}, tristate={self.isTristate()}, selected={self.is_selected()}"
|
|
234
|
-
|
|
235
|
-
def handle_clicked(self):
|
|
236
|
-
self.state = 1 if self.state == self.max_states else self.state + 1
|
|
237
|
-
self.repaint()
|
|
238
|
-
|
|
239
|
-
def setDisabled(self, flag: bool = True):
|
|
240
|
-
self.disabled = flag
|
|
241
|
-
super().setDisabled(flag)
|
|
242
|
-
self.setStatusTip(f"{self.status_tip or ''} {'[DISABLED]' if flag else ''}")
|
|
243
|
-
|
|
244
|
-
def disable(self):
|
|
245
|
-
self.setDisabled(True)
|
|
246
|
-
|
|
247
|
-
def enable(self):
|
|
248
|
-
self.setDisabled(False)
|
|
249
|
-
|
|
250
|
-
def is_selected(self):
|
|
251
|
-
return self.state == BUTTON_SELECTED
|
|
252
|
-
|
|
253
|
-
def set_selected(self, on: bool = True):
|
|
254
|
-
self.state = BUTTON_SELECTED if on else BUTTON_NOT_SELECTED
|
|
255
|
-
self.repaint()
|
|
256
|
-
|
|
257
|
-
def hitButton(self, pos: QPoint):
|
|
258
|
-
return self.contentsRect().contains(pos)
|
|
259
|
-
|
|
260
|
-
def paintEvent(self, *args, **kwargs):
|
|
261
|
-
|
|
262
|
-
painter = QPainter(self)
|
|
263
|
-
painter.setRenderHint(QPainter.Antialiasing)
|
|
264
|
-
painter.setPen(Qt.NoPen)
|
|
265
|
-
|
|
266
|
-
self.drawCustomWidget(painter)
|
|
267
|
-
painter.end()
|
|
268
|
-
|
|
269
|
-
def drawCustomWidget(self, painter):
|
|
270
|
-
renderer = QSvgRenderer()
|
|
271
|
-
if not self.disabled:
|
|
272
|
-
resource = self.resource[self.state]
|
|
273
|
-
else:
|
|
274
|
-
resource = self.resource[BUTTON_DISABLED][self.state]
|
|
275
|
-
renderer.load(str(resource))
|
|
276
|
-
renderer.render(painter)
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if __name__ == "__main__":
|
|
280
|
-
|
|
281
|
-
from PyQt5.QtWidgets import QMainWindow
|
|
282
|
-
from PyQt5.QtWidgets import QFrame
|
|
283
|
-
from PyQt5.QtWidgets import QVBoxLayout
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
class MainWindow(QMainWindow):
|
|
287
|
-
def __init__(self):
|
|
288
|
-
super().__init__()
|
|
289
|
-
self.resize(200, 200)
|
|
290
|
-
|
|
291
|
-
self.container = QFrame()
|
|
292
|
-
self.container.setObjectName("Container")
|
|
293
|
-
self.layout = QVBoxLayout()
|
|
294
|
-
|
|
295
|
-
# button_selected = get_resource(":/icons/cs-connected.svg")
|
|
296
|
-
# button_not_selected = get_resource(":/icons/cs-not-connected.svg")
|
|
297
|
-
# button_no_change = get_resource(":/icons/cs-connected-alert.svg")
|
|
298
|
-
# button_disabled = get_resource(":/icons/cs-connected-disabled.svg")
|
|
299
|
-
|
|
300
|
-
button_selected = get_resource(":/icons/start-button.svg")
|
|
301
|
-
button_not_selected = get_resource(":/icons/stop-button.svg")
|
|
302
|
-
button_no_change = get_resource(":/icons/plugged.svg")
|
|
303
|
-
button_disabled = [
|
|
304
|
-
get_resource(":/icons/start-button-disabled.svg"),
|
|
305
|
-
get_resource(":/icons/stop-button-disabled.svg"),
|
|
306
|
-
get_resource(":/icons/plugged-disabled.svg"),
|
|
307
|
-
]
|
|
308
|
-
|
|
309
|
-
self.toggle = ToggleButton(
|
|
310
|
-
name="CS-CONNECT",
|
|
311
|
-
status_tip="connect-disconnect hexapod control server",
|
|
312
|
-
selected=button_selected,
|
|
313
|
-
not_selected=button_not_selected,
|
|
314
|
-
no_change=button_no_change,
|
|
315
|
-
disabled=button_disabled,
|
|
316
|
-
tristate=True,
|
|
317
|
-
)
|
|
318
|
-
|
|
319
|
-
self.touch = TouchButton(
|
|
320
|
-
name="HOME",
|
|
321
|
-
status_tip="Perform a homing operation",
|
|
322
|
-
selected=get_resource(":/icons/home.svg"),
|
|
323
|
-
disabled=get_resource(":/icons/home-disabled.svg"),
|
|
324
|
-
)
|
|
325
|
-
|
|
326
|
-
self.layout.addWidget(self.toggle, Qt.AlignCenter, Qt.AlignCenter)
|
|
327
|
-
self.layout.addWidget(self.touch, Qt.AlignCenter, Qt.AlignCenter)
|
|
328
|
-
self.layout.addWidget(pb := QPushButton("disable"))
|
|
329
|
-
self.container.setLayout(self.layout)
|
|
330
|
-
self.setCentralWidget(self.container)
|
|
331
|
-
|
|
332
|
-
self.pb = pb
|
|
333
|
-
self.pb.setCheckable(True)
|
|
334
|
-
self.pb.clicked.connect(self.toggle_disable)
|
|
335
|
-
|
|
336
|
-
self.toggle.clicked.connect(self.print_clicked)
|
|
337
|
-
self.touch.clicked.connect(self.print_clicked)
|
|
338
|
-
|
|
339
|
-
# Use the following for further debugging
|
|
340
|
-
|
|
341
|
-
# self.toggle.stateChanged.connect(self.print_state_changed)
|
|
342
|
-
# self.toggle.pressed.connect(self.print_pressed)
|
|
343
|
-
# self.toggle.released.connect(self.print_released)
|
|
344
|
-
|
|
345
|
-
# self.touch.pressed.connect(self.print_pressed)
|
|
346
|
-
# self.touch.released.connect(self.print_released)
|
|
347
|
-
|
|
348
|
-
self.statusBar()
|
|
349
|
-
|
|
350
|
-
def toggle_disable(self, checked: bool):
|
|
351
|
-
self.toggle.disable() if checked else self.toggle.enable()
|
|
352
|
-
self.touch.disable() if checked else self.touch.enable()
|
|
353
|
-
self.pb.setText("enable" if checked else "disable")
|
|
354
|
-
|
|
355
|
-
def print_state_changed(self, *args, **kwargs):
|
|
356
|
-
sender = self.sender()
|
|
357
|
-
print(f"stateChanged: {args=}, {kwargs=}")
|
|
358
|
-
print(f" {sender.isChecked()=} {sender.checkState()=}")
|
|
359
|
-
|
|
360
|
-
def print_clicked(self, *args, **kwargs):
|
|
361
|
-
sender = self.sender()
|
|
362
|
-
print(f"clicked: {args=}, {kwargs=}")
|
|
363
|
-
print(f" {sender.state=}")
|
|
364
|
-
print(f" {sender.text()=}")
|
|
365
|
-
|
|
366
|
-
def print_pressed(self, *args, **kwargs):
|
|
367
|
-
print(f"pressed: {args=}, {kwargs=}")
|
|
368
|
-
|
|
369
|
-
def print_released(self, *args, **kwargs):
|
|
370
|
-
print(f"released: {args=}, {kwargs=}")
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
app = QApplication(sys.argv)
|
|
375
|
-
window = MainWindow()
|
|
376
|
-
window.show()
|
|
377
|
-
|
|
378
|
-
sys.exit(app.exec_())
|