diff --git a/metabolabpy/nmr/nmrConfig.py b/metabolabpy/nmr/nmrConfig.py index b26d2ad..2a73124 100644 --- a/metabolabpy/nmr/nmrConfig.py +++ b/metabolabpy/nmr/nmrConfig.py @@ -35,6 +35,8 @@ def __init__(self): self.print_light_mode = True self.print_dataset_colours = False self.print_standard_colours = True + self.print_stacked_plot = False + self.print_auto_scale = False self.print_spc_linewidth = 2 self.print_axes_linewidth = 2 self.print_ticks_font_size = 10 @@ -52,6 +54,8 @@ def make_config(self): print_light_mode = 'yes' if self.print_light_mode is True else 'no' print_dataset_colours = 'yes' if self.print_dataset_colours is True else 'no' print_standard_colours = 'yes' if self.print_standard_colours is True else 'no' + print_stacked_plot = 'yes' if self.print_stacked_plot is True else 'no' + print_auto_scale = 'yes' if self.print_auto_scale is True else 'no' config['GUI'] = {'auto_plot': auto_plot, 'keep_zoom': keep_zoom, 'font_size': str(self.font_size), @@ -81,7 +85,9 @@ def make_config(self): 'print_spc_linewidth': self.print_spc_linewidth, 'print_axes_linewidth': self.print_axes_linewidth, 'print_ticks_font_size': self.print_ticks_font_size, - 'print_label_font_size': self.print_label_font_size} + 'print_label_font_size': self.print_label_font_size, + 'print_stacked_plot': print_stacked_plot, + 'print_auto_scale': print_auto_scale} return config def save_config(self): @@ -148,6 +154,12 @@ def set_print_dataset_colours(self, value): def set_print_standard_colours(self, value): self.print_standard_colours = True if value == "yes" else False + def set_print_stacked_plot(self, value): + self.print_stacked_plot = True if value == "yes" else False + + def set_print_auto_scale(self, value): + self.print_auto_scale = True if value == "yes" else False + def set_print_spc_linewidth(self, value): self.print_spc_linewidth = int(value) diff --git a/metabolabpy/nmr/nmrDataSet.py b/metabolabpy/nmr/nmrDataSet.py index c84cc5a..040d4fb 100644 --- a/metabolabpy/nmr/nmrDataSet.py +++ b/metabolabpy/nmr/nmrDataSet.py @@ -1367,18 +1367,11 @@ def read_spc(self, data_set_name='', data_set_number='', dataset=1): nd1.data_set_number = data_set_number nd1.read_spc() if nd1.acq.pul_prog_name.find('stddiff') > 0: - nd2 = nd.NmrData() - nd2.data_set_name = data_set_name - nd2.data_set_number = data_set_number - nd2.read_spc() - nd1.dim = 1 - nd2.dim = 1 + nd1.fid[0] -= nd1.fid[1] nd1.fid = np.copy(np.delete(nd1.fid, 1, 0)) - nd2.fid = np.copy(np.delete(nd2.fid, 0, 0)) - self.nmrdat[self.s].append(nd1) - self.nmrdat[self.s].append(nd2) - else: - self.nmrdat[self.s].append(nd1) + nd1.dim = 1 + + self.nmrdat[self.s].append(nd1) # end read_spc def read_spcs(self, data_path, data_exp, dataset=1):