Current from machinfo can be NaN sometimes
Feedback from BM18
A single point from the machinfo SR_current can be NaN in the saved dataset, sometimes.
Feedback from @bourtemb is that there was no problem in the machine side at this time.
With @muzelle we quess that it's maybe because if there is a client side failure in the tango request, the scan continue it's job, and use a NaN value instead of failing the scan.
Could it be possible?
Proposal
In the case of the tomo, the current is part of a slow chain.
If a request to the machinfo fails, we could anyway use the last known value (if not too old).
It's a patch on the machinfo controller.
This maybe could fix such problem.
What do you think?
More context
>>> import h5py
>>> f = h5py.File("/data/visitor/md1389/bm18/20240404/RAW_DATA/HA2200_2.195um_004_uterus_ROI-1_0006/HA2200_2.195um_004_uterus_ROI-1_0006_0001/HA2200_2.195um_004_uterus_ROI-1_0006_0001.h5", "r")
>>> f["/2.2/measurement/current"][389]
nan
>>> f["/2.2/measurement/current"][388]
194.41
>>> f["/2.2/measurement/epoch"][389]
1712428789.1127994
>>> import datetime
>>> t = f["/2.2/measurement/epoch"][389]
>>> datetime.datetime.fromtimestamp(t)
datetime.datetime(2024, 4, 6, 20, 39, 49, 112799)
>>> d = datetime.datetime.fromtimestamp(t)
>>> print(d)
2024-04-06 20:39:49.112799