cleanup sources

This commit is contained in:
2026-03-18 17:21:27 +01:00
parent fc2a87ef85
commit 9d969da867
2 changed files with 2 additions and 11 deletions
+1 -9
View File
@@ -128,12 +128,10 @@ class Drawable:
def set_legend(self, channel, value):
"Sets the legend of the plot"
if key in self.legend:
if channel in self.legend:
print("Drawable Warning: Legend key \"%s\" will be overwritten with \"%s\"" % (str(channel), str(value)))
self.legend[channel] = str(value)
def get_xmin(self):
"Returns minimun of x"
return self.x.min()
@@ -142,17 +140,14 @@ class Drawable:
"Sets minimum of x"
self.xmin = xmin
def get_xmax(self):
"Returns maximum of x"
return self.x.max()
def set_xmax(self, xmax):
"Sets maximum of x"
self.xmax = xmax
def get_ymin(self):
"Returns minimum of y"
if type(self.y)==type([]):
@@ -160,12 +155,10 @@ class Drawable:
else:
return self.y.min()
def set_ymin(self, ymin):
"Sets minimum of y"
self.ymin = ymin
def get_ymax(self):
"Returns maximimum of y"
if type(self.y)==type([]):
@@ -173,7 +166,6 @@ class Drawable:
else:
return self.y.max()
def set_ymax(self, ymax):
"Sets maximum of y"
self.ymax = ymax
+1 -2
View File
@@ -136,7 +136,7 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict):
Drawable.Drawable.__init__(self)
collections.UserDict.__init__(self)
self.quantity_name=quantity_name
self.lock=threading.RLock()
self.lock = threading.RLock()
# get the selected item, if it does not exist, create an empty one
def __getitem__(self, key):
@@ -226,7 +226,6 @@ class MeasurementResult(Drawable.Drawable, collections.UserDict):
def write_to_hdf(self, hdffile, where, name, title, complib=None, complevel=None):
h5_table_format= {
"x" : tables.Float32Col(),
"y" : tables.Float32Col(),