there are common scan types, such as hystereses which are scanned back and forth, often in a symmetric manner.
In the evaluation of these scans the binning leads to an averaging of the data which were acquired at the same x-positions but at a different direction of these scans.
As a workaround, we could use the point_number (lets call it N_Pt) to create two counters by logical_index for the two directions of the scans:
ev.clist = ['signal[N_Pt < len(N_Pt)]', 'signal[N_Pt >= len(N_Pt)]']
This should allow for binning and averaging of any signal and the user can manually set the range for each direction.
The drawback is, that the data is not available in a single counter.
First we need to check, if the upper proposal is working, as then the counters and xcol have different length and different counters need different ranges of the xcol.
Moreover, we need to check for the availability of the number of scan points N_Pt and in case make it available in for every scan automatically (need a dedicated PR for that).
Another option would be a flag or dedicated method which does all the magic in the background by call the actual binning of the data for both halfs of the scan and concatenates the results at the end.
I would first try if option 1 is working before thinking too much about option 2.
there are common scan types, such as hystereses which are scanned back and forth, often in a symmetric manner.
In the
evaluationof these scans thebinningleads to an averaging of the data which were acquired at the samex-positionsbut at a different direction of these scans.As a workaround, we could use the
point_number(lets call itN_Pt) to create two counters bylogical_indexfor the two directions of the scans:This should allow for binning and averaging of any signal and the user can manually set the range for each direction.
The drawback is, that the data is not available in a single counter.
First we need to check, if the upper proposal is working, as then the
countersandxcolhave different length and differentcountersneed different ranges of thexcol.Moreover, we need to check for the availability of the number of scan points
N_Ptand in case make it available in for every scan automatically (need a dedicated PR for that).Another option would be a flag or dedicated method which does all the magic in the background by call the actual
binningof the data for both halfs of the scan and concatenates the results at the end.I would first try if option 1 is working before thinking too much about option 2.