Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
4a0fdb0
COMMIS.ENH: initial draft of TbT measurement class
vellosok75 Apr 12, 2024
bc0ba35
COMMISS.TBT.ENH: add harmonic analysis methods
vellosok75 Apr 12, 2024
70de76f
COMMIS.TBT.BUG: add None type exceptions in str method
vellosok75 Apr 15, 2024
594756b
COMMISS.TBT.BUG: fix MeasTbTData initialization
vellosok75 Apr 15, 2024
44d3802
COMMISS.TBT.ENH: add restoring strengths methods, remove input to par…
vellosok75 Apr 15, 2024
f1d8fb9
COMMISS.TBT.ENH: change ordering to params, meas, analysis
vellosok75 Apr 15, 2024
67412f7
COMMISS.TBT.WIP: trying to create magnets timing objects & minor form…
vellosok75 Apr 15, 2024
55eab24
COMMISS.TBT.ENH: add magnets timing properties
vellosok75 Apr 16, 2024
8eef202
COMMISS.TBT.ENH: remove unecessary setters for properties
vellosok75 Apr 16, 2024
aac09db
COMMIS.TBT.ENH: correct initialization of derived classes, remove rep…
vellosok75 Apr 16, 2024
792ad62
COMMIS.TBT.ENH: remove fname property from meas class
vellosok75 Apr 16, 2024
79824bb
COMMISS.TBT.BUG: fix `get_timing_state` s return
vellosok75 Apr 16, 2024
8328ef3
COMMISS.TBT.ENH: keep standard `orbx` & `orby` keys
vellosok75 Apr 16, 2024
a4fefd3
COMMISS.TBT.ENH: minor changes in `get_default_fname`
vellosok75 Apr 16, 2024
282a692
COMMISS.TBT.ENH: simplify magnets preparation during meas
vellosok75 Apr 16, 2024
021c505
COMMIS.ACQBPMS.ENH: remove `do_pulse_evg` and related function
vellosok75 Apr 16, 2024
6419c3c
COMMIS.ACQBPMS.ENH: add timing state to saved data during acquisition
vellosok75 Apr 16, 2024
5340576
COMMIS.TBT.ENH: remove redundant function
vellosok75 Apr 16, 2024
14651ef
COMMISS.TBT.ENH: add selection of magnets to pulse & stregnths settin…
vellosok75 Apr 16, 2024
274822a
COMMISS.TBT.ENH: check for valid `pingers2kick' settings
vellosok75 Apr 17, 2024
cb1586a
COMMISS.TBT.ENH: handle `None` type in `pingers2kick` & improve the l…
vellosok75 Apr 17, 2024
ad96347
COMMIS.TBT.ENH: fix formatting
vellosok75 Apr 17, 2024
099cb2a
COMMISS.TBT.ENH: add prefix for kicked beam data, the acq rate and in…
vellosok75 Apr 17, 2024
1cd811b
COMMIS.TBT.ENH: remove unecessary initializations and properties.
vellosok75 Apr 17, 2024
6bb8422
COMMISS.TBT.BUG: fix pingh trigger device creation
vellosok75 Apr 17, 2024
8477440
COMMISS.TBT.ENH: wait magnets ramp during strength setting
vellosok75 Apr 17, 2024
b1f7ca9
COMMISS.TBT.ENH: formatting fix
vellosok75 Apr 17, 2024
9c40863
COMMIS.ACQBPM.BUG: update EVG events after event setting
vellosok75 Apr 17, 2024
88c9cae
COMMISS.ACQBPM.ENH: signal user to trigger timing event.
vellosok75 Apr 18, 2024
1d9001e
COMMISS.TBT.ENH: `magnets_wait_time` -> `magnets_timeout`.
vellosok75 Apr 18, 2024
b695282
COMMISS.TBT.ENH: fix magnets waiting time, return flag indicating scu…
vellosok75 Apr 18, 2024
84c7c0d
COMMISS.TBT.ENH: improve handling of `pingers2kick`
vellosok75 Apr 18, 2024
025e289
COMMIS.TBT.ENH: improve checking and waiting the setting of magnets s…
vellosok75 Apr 18, 2024
d34c550
COMMISS.TBT.BUG: create pingers devices regardless of `pingers2kick`
vellosok75 Apr 18, 2024
2fdf8e5
COMMISS.TBT.ENH: keep both kicks info in naming system & flag `"inact…
vellosok75 Apr 18, 2024
e30cfb9
COMMISS.TBT.ENH: add `magnets_timeout` property in params & improve r…
vellosok75 Apr 18, 2024
f635e3e
COMMISS.TBT.BUG: prevent attempt at rounding a `None` type
vellosok75 Apr 18, 2024
369e031
COMMISS.TBT.ENH: handle also `"vh"` as keyword for `pingers2kick`
vellosok75 Apr 18, 2024
5891688
COMMISS.TBT.ENH: linear fit for fourier components instead of raw-dat…
vellosok75 Apr 19, 2024
a430e5e
COMMISS.TBT.ENH: "vectorize" harmonic model fitting
vellosok75 Apr 19, 2024
0b37d47
COMMISS.TBT.ENH: fix turning magnets on/off
vellosok75 Apr 22, 2024
8dec5e6
COMMISS.TBT.ENH: magnets state as a dict with pwrstate and pulsestate
vellosok75 Apr 22, 2024
f6a390f
COMMISS.TBT.ENH: do nothing if strengths are `None` & prepare magnets…
vellosok75 Apr 22, 2024
74a42a3
COMMISS.TBT.ENH: include magnets state & strengths to `get_data` func…
vellosok75 Apr 22, 2024
829d576
COMMISS.TBT.BUG: fixes during online tests, change to mrad.
vellosok75 Apr 23, 2024
4441d18
COMMISS.TBT.ENH: add analysis class properties and load method
vellosok75 Apr 25, 2024
f62972d
COMMISS.TBT.ENH: add plotting method to analysis class
vellosok75 Apr 25, 2024
59f2ec0
COMMISS.TBT.ENH: add plotting method for beta-beat and phase-errors &…
vellosok75 Apr 25, 2024
f9f0043
COMMISS.TBT.ENH: fix formatting
vellosok75 Apr 25, 2024
8b141b7
COMMISS.TBT.ENH: add harmonic analysis (fitting)
vellosok75 Apr 26, 2024
cf74983
COMMISS.TBT.ENH: add PCA analysis
vellosok75 Apr 26, 2024
89ac141
COMMISS.TBT.ENH: do not change manges pwr_state
vellosok75 Apr 28, 2024
197791b
COMMISS.TBT.ENH: do not attempt setting mags and doing the meas if `p…
vellosok75 Apr 29, 2024
f06ef34
TBT.COMMISS.ENH: include the possibility of failing at restoring magn…
vellosok75 Apr 29, 2024
8ef517c
COMMISS.TBT.BUG: fix default naming to deal with `None`-type strengths
vellosok75 Apr 29, 2024
d3c93ad
COMMISS.TBT.BUG: fix restore strengths
vellosok75 Apr 29, 2024
92eec58
COMMISS.TBT.ANLY: default chromaticity if `chroms == None`
vellosok75 Apr 29, 2024
b5e2246
COMMISS.TBT.MEAS: minor formating fixes
vellosok75 Apr 29, 2024
1302549
COMMISS.TBT.MEAS.ENH: wait magnets mon instead of rb
vellosok75 Apr 29, 2024
df8c325
COMMISS.TBT.ENH: minor improvements in PCA analysis
vellosok75 May 6, 2024
7f68880
COMMISS.TBT.MEAS.ENH: include magnets strengths in magnets state; uni…
vellosok75 May 6, 2024
cd9ef79
COMMISS.TBT.MEAS.ENH: fixes during last online tests
vellosok75 May 8, 2024
7e8c6b2
COMMISS.TBT.ANLY.ENH: improve plot methods
vellosok75 May 10, 2024
c7eeab4
undo changes in `phase_space.py` committed & pushed by accident
vellosok75 May 10, 2024
5499162
again to undo stuff done with `phase_space.py`
vellosok75 May 10, 2024
554db79
COMMISS.TBT.ENH: remove RC params configs
vellosok75 May 10, 2024
a013d08
COMMISS.TBT.ANLY.ENH: rename prorperty `fitting_optics` to `fitting_d…
vellosok75 May 14, 2024
2d19c1c
COMMISS.TBT.ANLY.ENH: plot phase advance and phase advance errors ins…
vellosok75 May 14, 2024
a6b4136
COMMISS.TBT.ANLY.ENH: refactor PCA analysis to share workflow with IC…
vellosok75 May 14, 2024
aaa0d7f
COMMISS.TBT.ANLY.ENH: add ICA analysis with sklearn's FastICA
vellosok75 May 14, 2024
0551862
COMMISS.TBT.MEAS.ENH: update default params
vellosok75 May 16, 2024
b4c4ed9
COMMISS.AcqBPMS.ENH: get BPM trigger event & mode as strings
vellosok75 May 16, 2024
a216779
COMMIS.TBT.MEAS.ENH: get pingers trigger event source as strings
vellosok75 May 16, 2024
5756579
COMMISS.TBT.MEAS.ENH: fixes in default filname
vellosok75 May 16, 2024
7f13ff7
COMMISS.TBT.ANLY.ENH: fixes in analysis str method
vellosok75 May 16, 2024
edf8b7a
COMMISS.TBT.ANLY.ENH: add default traj turns selection for linear opt…
vellosok75 May 16, 2024
c7d0692
COMMISS.TbT.ANLY.ENH: fix saving of fitting_data only after loops fin…
vellosok75 May 17, 2024
b8279e0
COMMISS.TBT.ANLY.ENH: add reference to docstring
vellosok75 May 17, 2024
fc9792c
COMMISS.TBT.ANLY.ENH: fix typo in ICA
vellosok75 May 17, 2024
982b546
COMMISS.TBT.ANLY.ENH: add PCA & ICA docstrings
vellosok75 May 17, 2024
ac5ca9d
COMMISS.TBT.MEAS.ENH: save also pingers voltage
vellosok75 May 17, 2024
3ca39f6
COMMISS.TBT.ANLY.ENH: add option to compare fit & acquision in `plot_…
vellosok75 May 17, 2024
e935f06
COMMISS.TBT.ANLY.ENH: save also fitting residue in `fitting_data`
vellosok75 May 17, 2024
70e41aa
COMMISS.TBT.ANLY.ENH: plot also residue in `plot_trajs`
vellosok75 May 20, 2024
32a0aed
COMMISS.TBT.ANLY.ENH: add `plot_fit_comparison` & `plot_rms_residue`
vellosok75 May 20, 2024
b0bdcec
COMMISS.TBT.ANLY.ENH: update and add some docstrings
vellosok75 May 20, 2024
b7d451d
COMMISS.TBT.ANLY.ENH: fixes fit comparison in `plot_trajs`
vellosok75 May 21, 2024
edaa2f7
COMMISS.TBT.ANLY.ENH: fix tune setting in `_get_nominal_optics`
vellosok75 May 21, 2024
6114a8b
COMMISS.TBT.ANLY.ENH: save also amplitudes in `harmonic_analysis`
vellosok75 May 23, 2024
8825e6a
COMMISS.TBT.ENH: add `plot` argument to plot analysis results only wh…
vellosok75 May 23, 2024
e8ee1e6
COMMISS.TBT.ENH.MEAS: turn-off pulse before changing magnets strengths
vellosok75 May 23, 2024
45b896b
COMMISS.TBT.ENH: use int part of tunes only to get nominal optics
vellosok75 Jun 7, 2024
c2241b7
COMMISS.TBT.ANLY.ENH: add selection of BPMs & plot relative phase ad…
vellosok75 Jun 7, 2024
0ec8981
COMMISS.TBT.ANLY.ENH: add `plot_trajs_spectrum`
vellosok75 Jun 10, 2024
66909c2
COMMISS.TBT.ANLY.ENH: add spatio-temporal modes analysis
vellosok75 Jun 10, 2024
4466544
COMMISS.TBT.MEAS.ENH: add `restore_init_state` option & pingers kicks…
vellosok75 Jul 15, 2024
7b32ffd
COMMISS.TBT.ANLY.ENH: automatically update `trajs_turn_slice`
vellosok75 Aug 30, 2024
704dcef
COMMISS.TBT.ANLY.ENH: handle missing data in `load_and_apply`
vellosok75 Aug 30, 2024
fa8909c
COMMISS.TBT.ANLY.ENH: add error bars for PCA analysis
vellosok75 Aug 30, 2024
9f9d907
COMMISS.TBT.ANLY.ENH: set unwrap discont to pi
vellosok75 Aug 30, 2024
1d48a38
COMMISS.TBT.ANLY.ENH: add PCA analysis for stacked xy data
vellosok75 Sep 4, 2024
91fa11e
COMMISS.TBT.ANLY.ENH: update default chromaticity & add TODOs
vellosok75 Sep 4, 2024
957ddde
COMMISS.TBT.BUG: spec & tunes calculation in stackedxy PCA
vellosok75 Sep 13, 2024
79105c1
COMMISS.TBT.ANLY.WIP: add SOBI for ICA
vellosok75 Sep 17, 2024
fba6f15
COMMISS.TBT.MEAS.BUG: normalize by scaling factor when getting pinger…
vellosok75 Oct 14, 2024
f41a970
COMMISS.TBT,BPMS_SIGNAlS.MNT: general formating
vellosok75 Oct 14, 2024
3f1115c
COMMISS.TBT.WIP: migrating meas class to a threaded meas
vellosok75 Jan 14, 2025
cebd600
COMMISS.TBT:WIP: improve `_do_measurement` flow
vellosok75 Jan 15, 2025
5bc632b
COMMISS.TBT.WIP: improve `set_magnets_strength`'s bad pinger logic
vellosok75 Jan 15, 2025
b75e0ca
COMMISS.TBT.WIP: `_set_magnets_strengths` improvements
vellosok75 Jan 15, 2025
d9c5804
COMMISS.TBT.WIP: prevent changing strengths if pinger not used
vellosok75 Jan 15, 2025
481b565
COMMISS.TBT.MEAS.BUG: fixes & formatting imprvmnts.
vellosok75 Jan 16, 2025
150db00
COMMISS.TBT.MEAS.ENH: init states acquired during initialization
vellosok75 Jan 17, 2025
5af51c8
COMMISS.TBT.MEAS.DEV: check if machine was restored
vellosok75 Jan 17, 2025
3b44752
COMMISS.TBT.ENH: change pingers delay to delay_raw
vellosok75 Jan 17, 2025
43a6057
COMMISS.TBT.MEAS.ENH: avoid code repetition in `_get_timing_state`
vellosok75 Jan 17, 2025
82ac612
COMMISS.TBT.MEAS.ENH: avoid code repeteition in `_get_magnets_strength`
vellosok75 Jan 17, 2025
3f95865
COMMISS.TBT.MEAS.ENH: add `_acquire_data` method
vellosok75 Jan 20, 2025
fe2b6f5
COMMISS.TBTMEAS.BUG: fixes
vellosok75 Apr 3, 2025
01899a5
COMMISS.TBT.MEAS.ENH: simplify setting strengths in `set_magnets_satate`
vellosok75 Apr 3, 2025
4bf7415
COMMISS.TBT.MEAS.ENH: fixes in `set_magnets_strength`
vellosok75 Apr 3, 2025
e462e72
COMMISS.TBT.MEAS.BUG: use the `_magnets_ok` flag when changing mags
vellosok75 Apr 3, 2025
0f87a97
COMMISS.TBT.MEAS.ENH: move data saving to `acquire_data` & `get_data`…
vellosok75 Apr 3, 2025
688f472
COMMISS.TBT.MEAS.ENH: automatically handle `pingers2kick`
vellosok75 Apr 7, 2025
bf3e291
COMMISS.TbT: Fix some bugs.
fernandohds564 Apr 8, 2025
ca704b7
COMMISS.TbT.MEAS.ENH: some improvements
vellosok75 Apr 9, 2025
d92a2b0
COMMISS.TBT.ENH: improve meas flow checkings
vellosok75 Apr 9, 2025
d16ed58
COMMISS.ACQBPMS.ENH: restore support for automatic EVG pulses
vellosok75 Apr 28, 2025
5c2cfc3
COMMISS.TBT.MEAS.ENH: change default parameter initialization (nr poi…
vellosok75 Apr 28, 2025
69dabc0
COMMISS.ANLY.TMP: comment unused param for old data compatibility
vellosok75 Apr 30, 2025
136086b
Merge branch 'threaded_tbt_meas' of github.com:lnls-fac/apsuite into …
vellosok75 Apr 30, 2025
7ce968a
COMMISS.TBT.BUG: fixes during online tests
vellosok75 May 5, 2025
2a072b0
COMMISS.TBT.ANLY.BUG: avoid operations with None object if orbx, orby…
vellosok75 May 7, 2025
c488994
COMMISS.ANLY.ENH: change default timescale in `plot_trajs`& minor sty…
vellosok75 May 7, 2025
934ca08
COMMISS.TBTANLY.ENH: refactor PCA analysis
vellosok75 May 8, 2025
7c140c8
COMMISS.AcqBPMs.ENH: changes during online tests
vellosok75 Jun 16, 2025
75164ff
COMMISS.TBT.MEAS.ENH: changes during online tests
vellosok75 Jun 16, 2025
9396eef
COMMISS.TBT.ANLY.ENH: refactor PCA & modal analysis
vellosok75 Jun 26, 2025
0aa9acc
COMMISS.TBT.ANLY.ENH: refactor ICA
vellosok75 Jun 26, 2025
d86bafb
COMMISS.TBT.ANLY.BUG: minor fixes
vellosok75 Jun 27, 2025
85ebb23
TBT.MNT: minor changes
vellosok75 Aug 12, 2025
6dded73
Merge branch 'master' into tbt-data-analysis
vellosok75 Aug 13, 2025
f4e4077
TBT.ANLY.ENH: handle possibly missing dict keys
vellosok75 Aug 14, 2025
1dba782
COMMISS.TBT.ANLY.ENH: some standardization
vellosok75 Aug 18, 2025
b1af1e4
COMMISS.TBT..ANLY.ENH: show phase error in plots
vellosok75 Aug 18, 2025
5bf0461
COMMISS.TBT.ANLY.MNT: plot relevent planes only
vellosok75 Aug 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 42 additions & 30 deletions apsuite/commisslib/meas_bpms_signals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""."""


import time as _time

import numpy as _np
Expand All @@ -18,11 +19,11 @@ class AcqBPMsSignalsParams(_ParamsBaseClass):

def __init__(self):
"""."""
self.trigbpm_delay = None
self.trigbpm_delay_raw = None
self.trigbpm_nrpulses = 1
self.do_pulse_evg = True
self._timing_event = "Study"
self.event_delay = None
self.event_delay_raw = None
self.event_mode = "External"
self.timeout = 40
self.nrpoints_before = 0
Expand All @@ -37,23 +38,27 @@ def __str__(self):
dtmp = "{0:26s} = {1:9d} {2:s}\n".format
stmp = "{0:26s} = {1:9} {2:s}\n".format
stg = ""
dly = self.trigbpm_delay
dly = self.trigbpm_delay_raw
if dly is None:
stg += stmp(
"trigbpm_delay", "same", "(current value will not be changed)"
"trigbpm_delay_raw",
"same",
"(current value will not be changed)"
)
else:
stg += ftmp("trigbpm_delay", dly, "[us]")
stg += dtmp("trigbpm_delay_raw", int(dly), "")
stg += dtmp("trigbpm_nrpulses", self.trigbpm_nrpulses, "")
stg += stmp("do_pulse_evg", str(self.do_pulse_evg), "")
stg += stmp("timing_event", self.timing_event, "")
dly = self.event_delay
dly = self.event_delay_raw
if dly is None:
stg += stmp(
"event_delay", "same", "(current value will not be changed)"
"event_delay_raw",
"same",
"(current value will not be changed)"
)
else:
stg += ftmp("event_delay", dly, "[us]")
stg += dtmp("event_delay_raw", int(dly), "")
stg += stmp("event_mode", self.event_mode, "")
stg += ftmp("timeout", self.timeout, "[s]")
stg += dtmp("nrpoints_before", self.nrpoints_before, "")
Expand Down Expand Up @@ -90,18 +95,21 @@ class AcqBPMsSignals(_BaseClass):
BPM_TRIGGER = "SI-Fam:TI-BPM"
PSM_TRIGGER = "SI-Fam:TI-BPM-PsMtm"

def __init__(self, isonline=True, ispost_mortem=False):
def __init__(self, params=None, isonline=True, ispost_mortem=False):
"""."""
super().__init__(params=AcqBPMsSignalsParams(), isonline=isonline)
params = params or AcqBPMsSignalsParams()
super().__init__(params=params, isonline=isonline)
self._ispost_mortem = ispost_mortem

if self.isonline:
self.create_devices()

calc_positions_from_amplitudes = staticmethod(
FamBPMs.calc_positions_from_amplitudes)
calc_positions_from_amplitudes.__doc__ = \
FamBPMs.calc_positions_from_amplitudes
)
calc_positions_from_amplitudes.__doc__ = (
FamBPMs.calc_positions_from_amplitudes.__doc__
)

def load_and_apply(self, fname: str):
"""Load and apply `data` and `params` from pickle or HDF5 file.
Expand Down Expand Up @@ -144,16 +152,16 @@ def get_timing_state(self):
trigbpm = self.devices["trigbpm"]

state = dict()
state["trigbpm_source"] = trigbpm.source
state["trigbpm_source"] = trigbpm.source_str
state["trigbpm_nrpulses"] = trigbpm.nr_pulses
state["trigbpm_delay"] = trigbpm.delay
state["trigbpm_delay_raw"] = trigbpm.delay_raw
if self.params.do_pulse_evg:
state["evg_nrpulses"] = self.devices["evg"].nrpulses

evt = self._get_event(self.params.timing_event)
if evt is not None:
state["evt_delay"] = evt.delay
state["evt_mode"] = evt.mode
state["event_delay_raw"] = evt.delay_raw
state["event_mode"] = evt.mode_str
return state

def recover_timing_state(self, state):
Expand All @@ -165,9 +173,9 @@ def prepare_timing(self, state=None):
state = dict() if state is None else state

trigbpm = self.devices["trigbpm"]
dly = state.get("trigbpm_delay", self.params.trigbpm_delay)
dly = state.get("trigbpm_delay_raw", self.params.trigbpm_delay_raw)
if dly is not None:
trigbpm.delay = dly
trigbpm.delay_raw = dly

trigbpm.nr_pulses = state.get(
"trigbpm_nrpulses", self.params.trigbpm_nrpulses
Expand All @@ -177,21 +185,23 @@ def prepare_timing(self, state=None):

evt = self._get_event(self.params.timing_event)
if evt is not None:
dly = state.get("evt_delay", self.params.event_delay)
dly = state.get("event_delay_raw", self.params.event_delay_raw)
if dly is not None:
evt.delay = dly
evt.mode = state.get("evt_mode", self.params.event_mode)
evt.delay_raw = dly
evt.mode = state.get("event_mode", self.params.event_mode)

if self.params.event_mode != "External":
nrpul = 1 if self.params.do_pulse_evg else None
nrpul = state.get("evg_nrpulses", nrpul)
if nrpul is not None:
self.devices["evg"].set_nrpulses(nrpul)

nrpul = 1 if self.params.do_pulse_evg else None
nrpul = state.get("evg_nrpulses", nrpul)
if nrpul is not None:
evg = self.devices["evg"]
evg.set_nrpulses(nrpul)
evg.cmd_update_events()
self.devices["evg"].cmd_update_events()

def trigger_timing_signal(self):
"""."""
if not self.params.do_pulse_evg:
print("Waiting for trigger event to be fired.")
return
evt = self._get_event(self.params.timing_event)
if evt is not None and evt.mode_str == "External":
Expand All @@ -215,13 +225,14 @@ def acquire_data(self):
"""."""
fambpms = self.devices["fambpms"]
ret = self.prepare_bpms_acquisition()
tag = self._bpm_tag(idx=abs(int(ret))-1)
tag = self._bpm_tag(idx=abs(int(ret)) - 1)
if ret < 0:
print(tag + " did not finish last acquisition.")
elif ret > 0:
print(tag + " is not ready for acquisition.")

fambpms.reset_mturn_initial_state()

self.trigger_timing_signal()

time0 = _time.time()
Expand All @@ -230,7 +241,7 @@ def acquire_data(self):
if ret != 0:
print("There was a problem with acquisition")
if ret > 0:
tag = self._bpm_tag(idx=int(ret)-1)
tag = self._bpm_tag(idx=int(ret) - 1)
pos = fambpms.mturn_signals2acq[int((ret % 1) * 10) - 1]
print("This BPM did not update: " + tag + ", signal " + pos)
elif ret == -1:
Expand Down Expand Up @@ -281,6 +292,7 @@ def get_data(self):
data["switching_frequency"] = fbpms.get_switching_frequency(rf_freq)
data["tunex_enable"] = tune.enablex
data["tuney_enable"] = tune.enabley
data["timing_state"] = self.get_timing_state()
return data

@staticmethod
Expand Down Expand Up @@ -360,7 +372,7 @@ def simulate_data_decimation(orb, downsampling=12 * 8):
"""
ds = downsampling
fil = _np.ones(ds) / ds
return _sp_sig.convolve(orb, fil[:, None], mode='same')
return _sp_sig.convolve(orb, fil[:, None], mode="same")

@staticmethod
def calc_spectrum(data, fs=1.0, axis=0):
Expand Down
Loading