Charge history plot stops working if BPM signals are not recieved
If BPM signals consist of an empty, the BPM charge history plot stops working, following error is observed:
ERROR:pyjapc:Exception in Subscription callback [CA.BPM0530S-SA/SamplesFromTrigger]
Traceback (most recent call last):
File "/acc/local/share/python/acc-py/apps/acc-py-rich-environment/2022.9/venv/lib/python3.9/site-packages/pyjapc/_japc.py", line 1425, in onValueReceivedWrapper
onValueReceived(parameterName, val, header)
File "/afs/cern.ch/user/z/zdvostre/Work/bcmgui/BCMSignals.py", line 294, in recieveSignal
self.timeSeries[-1] = self.calibrateBPM(signalSum[i], i)
File "/afs/cern.ch/user/z/zdvostre/Work/bcmgui/BCMSignals.py", line 245, in calibrateBPM
maxSignal = posSignal.max()
File "/acc/local/share/python/acc-py/base/2021.12/lib/python3.9/site-packages/numpy/core/_methods.py", line 40, in _amax
return umr_maximum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation maximum which has no identity
This was first observed on 3.8.2023. Before this, the BPMs at least sent a constant signal, from which zero charge was evaluated. However, now the BPM are sending just empty arrays with no data, which causes the error above.
Edited by Zdenek Vostrel