fixed wrong x-value type (should be float64, not float32)

This commit is contained in:
2026-03-17 08:52:24 +01:00
parent c81b05cea5
commit 05b9f1305c
+3 -3
View File
@@ -10,7 +10,7 @@ from . import Drawable
## provide gaussian statistics for a series of measured data points ## provide gaussian statistics for a series of measured data points
# #
# AccumulatedValue provides mean and error of mean after being fed with measured data # AccumulatedValue provides mean and error of mean after being fed with measured data
# internaly it keeps the sum, the sum of squares and the number of data points # internally it keeps the sum, the sum of squares and the number of data points
class AccumulatedValue: class AccumulatedValue:
def __init__(self, mean=None, mean_err=None, n=None): def __init__(self, mean=None, mean_err=None, n=None):
@@ -131,7 +131,7 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict):
""" """
convenient accumulation and interface to plot functions convenient accumulation and interface to plot functions
dictionary must not contain anything but AccumulatedValue instances The dictionary must not contain anything but AccumulatedValue instances
""" """
Drawable.Drawable.__init__(self) Drawable.Drawable.__init__(self)
collections.UserDict.__init__(self) collections.UserDict.__init__(self)
@@ -168,7 +168,7 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict):
sorted array of all dictionary entries without Accumulated Value objects with n==0 sorted array of all dictionary entries without Accumulated Value objects with n==0
""" """
keys=numpy.array([k for k in list(self.data.keys()) if not (isinstance(self.data[k], AccumulatedValue) and self.data[k].n==0)], keys=numpy.array([k for k in list(self.data.keys()) if not (isinstance(self.data[k], AccumulatedValue) and self.data[k].n==0)],
dtype="float32") dtype="float64")
keys.sort() keys.sort()
return keys return keys