def generator(src_dm, inds): res = None R = src_dm.bandlims.get_obj((0, 0))[1] A = src_dm.bandlims.get_obj((1, 1))[1] nr = src_dm.ns.get_obj((0, 0)) na = src_dm.ns.get_obj((1, 1)) dr = R / nr da = A / na S = 1.0 / dr P = 1.0 / da r = inds[0] a = inds[1] phi = 1.0 + 0.0j ampl = 1.0 symb = 'f' sfc = sgl.expfc(S, r, phi, ampl, symb) pfc = sgl.expfc(P, a, phi, ampl, symb) res = [lambda x: sfc([x[0]]) * pfc([x[1]])] return res
def generator(src_dm, ind): res = None F = src_dm.bandlims.get_obj((0, 0))[1] n = src_dm.ns.get_obj((0, 0)) df = F / n T = 1.0 / df f = ind[0] phi = 1.0 + 0.0j ampl = 1.0 symb = 't' res = [sgl.expfc(T, f, phi, ampl, symb)] return res
def generator(src_dm, ind): res = None T = src_dm.bandlims.get_obj((0, 0))[1] n = src_dm.ns.get_obj((0, 0)) dt = T / n F = 1.0 / dt t = ind[0] phi = 1.0 + 0.0j ampl = 1.0 symb = 'f' res = [sgl.expfc(F, t, phi, ampl, symb)] return res
coeffs = np.zeros(shape=(n1, n2), dtype=np.complex64) #Here tt - tt means that the signal is a linear combination of time domain base #functions and coordinatization is also done in this space. Base functions are app- #roximated currently by step functions. bsgen = pdtab.get_bsgen(symb_tt, symb_tt) #Coefficients are set in a way that the time domain signal form will be a planar #wave with frequencies (2,1). phase = 1.0 + 0.0j ampl = 1.0 f1 = 2 f2 = 1 exp1 = su.expfc(T1, f1, phase, ampl, 't') exp2 = su.expfc(T2, f2, phase, ampl, 't') coeffs = np.zeros(shape=(n1, n2), dtype=np.complex64) for i in range(0, n1): for k in range(0, n2): coeffs[i, k] = exp1([i * T1 / n1]) * exp2([k * T2 / n2]) sgl_tt_tt = sp.Signal(labels, coeffs, bsgen) #Vectorization is needed for the plot. Plotting is done by a simple Matplotlib #wrapper. vsign = sp.sigvec(sgl_tt_tt.fcval_at, dm_tt, dm_tt)[1] vw.plot_heatvec(dm_tt, vsign)