diff --git a/blast/utils.py b/blast/utils.py index db3d5236f2a249159a775f876f8c5728f0b78602..d863f53976662b6f5b3f3ff2514e79bd5acc578e 100644 --- a/blast/utils.py +++ b/blast/utils.py @@ -204,29 +204,3 @@ def getSolution(sections, write=False, toW=['x', 'xelm', 'theta', 'H', 'deltaSta f.close() print('done.') return sol - -def read(filename, delim=',', skip=1): - """Read from file and store in data array - """ - import io - import numpy as np - # read file - fl = io.open(filename, 'r') - label = fl.readline().split(',') - fl.close() - data = np.loadtxt(filename, delimiter=delim, skiprows=skip) - return data - -def plot(cfg): - from matplotlib import pyplot as plt - for i in range(len(cfg['curves'])): - plt.plot(cfg['curves'][i][:,0], cfg['curves'][i][:,1], cfg['ls'][i], color=cfg['color'][i], lw=cfg['lw'][i], label=cfg['labels'][i]) - if 'yreverse' in cfg and cfg['yreverse'] is True: plt.gca().invert_yaxis() - if 'xreverse' in cfg and cfg['xreverse'] is True: plt.gca().invert_xaxis() - if 'title' in cfg: plt.title(cfg['title']) - if 'xlim' in cfg: plt.xlim(cfg['xlim']) - if 'ylim' in cfg: plt.ylim(cfg['ylim']) - if 'legend' in cfg and cfg['legend'] is True: plt.legend(frameon=False) - if 'xlabel' in cfg: plt.xlabel(cfg['xlabel']) - if 'ylabel' in cfg: plt.ylabel(cfg['ylabel']) - plt.show()