diff --git a/acquisition/base.py b/acquisition/base.py index 867a33c..14dc130 100644 --- a/acquisition/base.py +++ b/acquisition/base.py @@ -1,8 +1,12 @@ import time -# setup logging from loguru import logger + +# TODO +# Most of these are outdated and workarounds for previous issues. +# Do not use without review as for example the CTA is now much better integrated. + def simple_scan(): """ adjustable: Adjustable names to scan. diff --git a/acquisition/multiple_daqs.py b/acquisition/multiple_daqs.py index 9d2c08c..860353d 100644 --- a/acquisition/multiple_daqs.py +++ b/acquisition/multiple_daqs.py @@ -2,9 +2,26 @@ from slic.core.acquisition import SFAcquisition -rates = {'100Hz': 1, '50Hz': 2, '25Hz': 4, '10Hz': 10, '5Hz': 20, '1Hz': 100} +RATES = {"100Hz": 1, + "50Hz": 2, + "25Hz": 4, + "10Hz": 10, + "5Hz": 20, + "1Hz": 100, + } -def generate_DAQS(instrument, pgroup,bs_channels, pvs, detectors): - DAQS = {name:SFAcquisition(instrument, pgroup, default_channels=bs_channels, default_pvs=pvs, default_detectors=detectors, rate_multiplicator=r) for (name, r) in rates.items()} + +def generate_DAQS(instrument, pgroup, bs_channels, pvs, detectors, spreadsheet=None): + DAQS = { + name: SFAcquisition( + instrument, + pgroup, + default_channels=bs_channels, + default_pvs=pvs, + default_detectors=detectors, + rate_multiplicator=r, + spreadsheet=spreadsheet, + ) + for (name, r) in RATES.items() + } return DAQS - diff --git a/cristallina.py b/cristallina.py index c736c23..b3943c3 100644 --- a/cristallina.py +++ b/cristallina.py @@ -215,10 +215,10 @@ daq.update_config_pvs() from acquisition import multiple_daqs -DAQS = multiple_daqs.generate_DAQS(instrument, pgroup,bs_channels, pvs, detectors) +DAQS = multiple_daqs.generate_DAQS(instrument, pgroup,bs_channels, pvs, detectors, spreadsheet) -# daq = FakeAcquisition(instrument, pgroup) -# daqPV = PVAcquisition(instrument, pgroup, default_channels=channels_ks) # workaround for KS not going to DB +# daq_fake = FakeAcquisition(instrument, pgroup) +# daq_PV_only = PVAcquisition(instrument, pgroup, default_channels=channels_ks) # workaround for KS not going to DB # Run the scan only when gas monitor value larger than 10uJ (and smaller than 2000uJ): # required fraction defines ammount of data recorded to save the step and move on to the next one diff --git a/log/cristallina.log b/log/cristallina.log index 59bfd5a..8d2b071 100644 --- a/log/cristallina.log +++ b/log/cristallina.log @@ -23,3 +23,35 @@ 2024-05-27 at 16:07:16 | WARNING | Cannot write log file to pgroup p19150. 2024-05-27 at 16:07:16 | INFO | Running at cristallina with pgroup p19150. 2024-05-27 at 16:07:16 | INFO | Loading finished. +2024-05-27 at 16:17:12 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:19:57 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:20:44 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:20:45 | WARNING | Cannot connect to stand server on saresc-vcons-02.psi.ch. Disabling spreadsheet. +2024-05-27 at 16:20:45 | WARNING | Cannot write log file to pgroup p19150. +2024-05-27 at 16:20:45 | INFO | Running at cristallina with pgroup p19150. +2024-05-27 at 16:20:45 | INFO | Loading finished. +2024-05-27 at 16:35:50 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:35:50 | WARNING | Cannot connect to stand server on saresc-vcons-02.psi.ch. Disabling spreadsheet. +2024-05-27 at 16:35:50 | WARNING | Cannot write log file to pgroup p19150. +2024-05-27 at 16:35:50 | INFO | Running at cristallina with pgroup p19150. +2024-05-27 at 16:35:50 | INFO | Loading finished. +2024-05-27 at 16:36:36 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:36:37 | WARNING | Cannot connect to stand server on saresc-vcons-02.psi.ch. Disabling spreadsheet. +2024-05-27 at 16:36:37 | WARNING | Cannot write log file to pgroup p19150. +2024-05-27 at 16:36:37 | INFO | Running at cristallina with pgroup p19150. +2024-05-27 at 16:36:37 | INFO | Loading finished. +2024-05-27 at 16:40:58 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:40:59 | WARNING | Cannot connect to stand server on saresc-vcons-02.psi.ch. Disabling spreadsheet. +2024-05-27 at 16:40:59 | WARNING | Cannot write log file to pgroup p19150. +2024-05-27 at 16:40:59 | INFO | Running at cristallina with pgroup p19150. +2024-05-27 at 16:40:59 | INFO | Loading finished. +2024-05-27 at 16:41:23 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:41:24 | WARNING | Cannot connect to stand server on saresc-vcons-02.psi.ch. Disabling spreadsheet. +2024-05-27 at 16:41:24 | WARNING | Cannot write log file to pgroup p19150. +2024-05-27 at 16:41:24 | INFO | Running at cristallina with pgroup p19150. +2024-05-27 at 16:41:24 | INFO | Loading finished. +2024-05-27 at 16:42:29 | INFO | Using undulator (Aramis) offset to PSSS energy of -104 eV. +2024-05-27 at 16:42:30 | WARNING | Cannot connect to stand server on saresc-vcons-02.psi.ch. Disabling spreadsheet. +2024-05-27 at 16:42:30 | WARNING | Cannot write log file to pgroup p19150. +2024-05-27 at 16:42:30 | INFO | Running at cristallina with pgroup p19150. +2024-05-27 at 16:42:30 | INFO | Loading finished.