def run_script(args): matplotlib.interactive(False) array_amp = np.zeros([args.time]) array_time = np.arange(args.time) Rpp = args.reflectivity_model(args.Rpp0, args.Rpp1, args.theta1) array_amp[args.time // 2] = Rpp r = ricker_alg(1,128, args.f) warray_amp = np.convolve(array_amp, r, mode='same') fig = plt.figure() ax1 = fig.add_subplot(111) ax1.plot(warray_amp, array_time) plt.title(args.title % locals()) plt.ylabel('time (ms)') plt.xlabel('amplitude') ax = plt.gca() ax.set_ylim(ax.get_ylim()[::-1]) ax.set_xlim(args.xlim) return return_current_figure()
def run_script(args): matplotlib.interactive(False) Rprop0 = args.Rpp0 Rprop1 = args.Rpp1 warray_amp = create_wedge(args.ntraces, args.pad, args.max_thickness, Rprop0, Rprop1, args.theta, args.f, args.reflectivity_method) fig = plt.figure() ax1 = fig.add_subplot(111) aspect = float(warray_amp.shape[1]) / warray_amp.shape[0] ax1.imshow( warray_amp, aspect=aspect, cmap=args.colour) plt.title(args.title % locals()) plt.ylabel('time (ms)') plt.xlabel('trace') return return_current_figure()