1
0
forked from IPKM/nmreval

restore optionality to figure saving

This commit is contained in:
Dominik Demuth 2023-05-19 11:37:24 +02:00
parent 6e9dd4d45f
commit 3dcd44c3ee

View File

@ -213,7 +213,7 @@ class FCReader:
except KeyError: except KeyError:
self.f_params[k] = [new_entry] self.f_params[k] = [new_entry]
if True: # save_fits or save_fig: if save_fits or save_fig:
xplot = np.geomspace(v.x[0], v.x[-1], num=10*len(v.x)) xplot = np.geomspace(v.x[0], v.x[-1], num=10*len(v.x))
yplot = FCReader.kww(xplot, *p0) yplot = FCReader.kww(xplot, *p0)
save_name = f'{filename.stem}_{k:011.2f}'.replace('.', 'p') + '.dat' save_name = f'{filename.stem}_{k:011.2f}'.replace('.', 'p') + '.dat'
@ -222,6 +222,7 @@ class FCReader:
np.savetxt(fit_path.joinpath(save_name), np.c_[xplot, yplot], np.savetxt(fit_path.joinpath(save_name), np.c_[xplot, yplot],
header=header+'\t'.join([f'{p}+/-{err}' for p, err in zip(p0, perr)])) header=header+'\t'.join([f'{p}+/-{err}' for p, err in zip(p0, perr)]))
if save_fig:
img_file = image_path.joinpath(save_name).with_suffix(".png") img_file = image_path.joinpath(save_name).with_suffix(".png")
gnuplot_args = [ gnuplot_args = [