Пример #1
0
import sys

sys.path.append('../../pkg')
import pymod_indx, pymod_data, pymod_plot

# dat_idx = [ pymod_indx.idx_ppar( pymod_indx.directions_3,
#                                 [-1, 1, 1], "z" ) ]

dat_idx = [[4, '[-1, 1, 1] in z-axis']]
fun_idx = [lambda x: np.imag(x)]

t = np.loadtxt("../../res/time.dat")
data = np.loadtxt("res/ppar_1d_1_0.dat")

handle, legend = [], []
ax = pymod_plot.plot_1d_init()

pymod_data.plot_signal_1d(t,
                          data,
                          dat_idx,
                          fun_idx,
                          handle,
                          legend,
                          ax,
                          t0=-80,
                          lim=[-50.0, 392],
                          lbl="",
                          padding=.0)

pymod_plot.plot_draw(handle,
                     legend,
Пример #2
0
import numpy as np
import sys

sys.path.append( 'pkg' )
import pymod_indx, pymod_data, pymod_plot

handle, legend = [], []
ax = pymod_plot.plot_1d_init()

func = np.abs
t = np.loadtxt( "res/time.dat" )
data = np.loadtxt( "res/ppar_1d_dpl0_coo2_37_0.dat" )
label = '[-1, 1, 1]'
pymod_data.plot_signal_1d( t, data, func, handle, legend, ax,
                           obj='p', t0=-100, lim=[-300.0, 546],
                           lbl=label, padding=10.0, w_shift=16000. )

pymod_plot.plot_show( ax, handle=handle, legend=legend,
                      xlabel=r"Time (fs)",
                      ylabel=r"Signal (arb.)",
                      title=r"Polarization in time domain" )
                      # xlabel=r"Freq. (cm$^{-1}$)",
                      # ylabel=r"Signal (arb.)",
                      # title=r"Spectrum",
                      # xlim=[-17000, -15000]

#xlim=[-80000, 8000] )