qudi
qudi copied to clipboard
Error bars in pulsed measurement not correctly displayed when x-axis is transformed to logscale
What is affected by this bug?
Error bars in pulsed measurement not correctly displayed when x-axis is transformed to logscale
When does this occur?
Always when changing the plot to log(x) in gui.
Where on the platform does it happen?
In pulsed measurement.
How do we replicate the issue?
Measuring a logarithmic decay. Right click on the graph and choose Plot options --> Transforms --> lox(x).
The error bars are displayed at the wrong position
Expected behavior (i.e. solution)
error bars should be transformed aswell, such that they match the values
Other Comments
In linear scale the error bars match the measurement points:
In log(x) the errorbars are not transformed
Apparently the pyqtgraph ErrorBarItem
does not support log scaling and apparently this issue has been reported and known since 2014. :unamused:
So either one could modify it into our own version of ErrorBarItem
by implementing
ErrorBarItem.setLogMode(x, y)
ErrorBarItem.paint()
or we need to do some ugly GUI module transformation that sets the log mode in the PlotItem
and transforms only the error data points accordingly.
A pure logic solution (like with FFT and Delta) is not possible if you want to have the logarithmic axis scaling in the plot.
Given these choices I would prefer the ErrorBarItem
mod.