aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-01-07 21:01:28 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-01-07 21:01:28 -0500
commit5550379accd37b8e3d00492ad93a270f9d635cc7 (patch)
tree4085f2777d3c2279316f4f7936866a620df4f768 /qolab
parent7c15a454512d5b541ced23371613ffb172ce2a34 (diff)
downloadqolab-5550379accd37b8e3d00492ad93a270f9d635cc7.tar.gz
qolab-5550379accd37b8e3d00492ad93a270f9d635cc7.zip
added repr for TraceSetSameX
Diffstat (limited to 'qolab')
-rw-r--r--qolab/data/trace.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/qolab/data/trace.py b/qolab/data/trace.py
index e5dfa2d..de6334a 100644
--- a/qolab/data/trace.py
+++ b/qolab/data/trace.py
@@ -223,6 +223,14 @@ class TraceSetSameX(Trace):
for k, tr in self.traces.items():
tr.clear_data()
+ def __repr__(self):
+ cls_name = f'{self.__class__.__name__}('
+ xlabel= f"{self.x.config['label']}"
+ xparam= f"x: '{xlabel}'"
+ yparam = f"y: {list(self.traces.keys())}"
+
+ return "".join([cls_name, xparam, ', ', yparam, f', N={self.x.values.size}', ')'])
+
def addTraceX(self, tr):
self.x = tr