From d65fc7d331ff505bcb948e272002fd54ce736e56 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 21 Dec 2021 01:13:11 -0500 Subject: fixed save for Trace and TraceXY --- qolab/data/trace.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'qolab/data/trace.py') diff --git a/qolab/data/trace.py b/qolab/data/trace.py index 9682af9..0a16ab2 100644 --- a/qolab/data/trace.py +++ b/qolab/data/trace.py @@ -99,14 +99,15 @@ class Trace: plt.grid() def getConfig(self): - return( self.config ) + d ={} + d['config'] = self.config.copy() + return( d ) def getData(self): return( self.values ) def getHeader(self, prefix=''): - d ={} - d['config'] = self.getConfig() + d = self.getConfig() return headerFromDictionary(d, prefix='') def save(self, fname, last_saved_pos=None, skip_headers_if_file_exist=False, **kwargs): @@ -152,7 +153,8 @@ class TraceXY(Trace): plt.grid() def getConfig(self): - config = self.config.copy() + config = {} + config['config'] = self.config.copy() config['TraceX'] = {} config['TraceX'] = self.x.getConfig() config['TraceY'] = {} -- cgit v1.2.3