f.seek(lastPosition) table = np.genfromtxt(f, dtype=float, unpack=True, invalid_raise=False) datadict[task][item].append(title) for col in table: datadict[task][item].append(col) # === Plotting === p = Plotter(show=True, pgf=True, pdf=True, latex=False, sfile=(8, 3), directory='./report/plots/', loc=2) f = Fitter() # hbnum print "=== hbnum ===" p.new(xlabel=r'time [ps]', ylabel=r'number of hydrogen bonds', name='hbnum', loc=3) n = 0 for medium, values in sorted(datadict['hbnum'].iteritems()): t = values[1] num = values[2]
amp = getAmplitude(x, v, a, t) x_s.append([array_t, array_x, r'$\omega = %.2f$' % w]) v_s.append([array_t, array_v, r'$\omega = %.2f$' % w]) a_s.append([array_t, array_a, r'$\omega = %.2f$' % w]) E_s.append([array_t, array_E, r'$\omega = %.2f$' % w]) w_s = np.arange(0.001, 2, 0.1) amp_s = [] for w in w_s: F = lambda t: Fmax * np.sin(w * t) amp = getAmplitude(x, v, a, t) amp_s.append(amp) # === Plotting === p = Plotter(show=True, pgf=False, pdf=False, loc=1) # --- Auslenkung --- p.new(title='Auslenkung', xlabel='t', ylabel='x') for v, w, name in x_s: p.plot(v, w, label=name) # --- Auslenkung --- p.new(title='Plots für ausgeschaltete Anregung', xlabel='t') v, w, name = x_s[0] p.plot(v, w, label='Auslenkung x') v, w, name = v_s[0] p.plot(v, w, label='Geschwindigkeit v') v, w, name = a_s[0] p.plot(v, w, label='Beschleunigung a')