aboutsummaryrefslogtreecommitdiff
path: root/qolab/data
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/data')
-rw-r--r--qolab/data/trace.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/qolab/data/trace.py b/qolab/data/trace.py
index 562224d..1c9e1d8 100644
--- a/qolab/data/trace.py
+++ b/qolab/data/trace.py
@@ -46,8 +46,8 @@ class TraceXY:
header.append(f'label = {self.label}')
for k, v in self.tags.items():
header.append(f'{k} = {v}')
- header.extend(self.x.header(prefix='x_info_'))
- header.extend(self.y.header(prefix='y_info_'))
+ header.extend(self.x.header(prefix='x_info: '))
+ header.extend(self.y.header(prefix='y_info: '))
prefixed_header = [prefix+l for l in header]
return prefixed_header
@@ -89,9 +89,9 @@ class TraceSetSameX:
header.append(f'label = {self.label}')
for k, v in self.tags.items():
header.append(f'{k} = {v}')
- header.extend(self.x.header(prefix='x_info_'))
+ header.extend(self.x.header(prefix='x_info: '))
for k, v in self.traces.items():
- header.extend(v.header(prefix=f'{k}_'))
+ header.extend(v.header(prefix=f'{k}_info: '))
prefixed_header = [prefix+l for l in header]
return prefixed_header
@@ -111,6 +111,7 @@ if __name__ == '__main__':
print(xy.header())
xyn = TraceSetSameX('many ys trace')
xyn.tags['descr'] = 'I am many ys trace'
+ xy.label='y1'
xyn.addTrace(xy)
xy.label='y2'
xyn.addTrace(xy)