#qdt.get_member("lbda0").reset(qdt)

    print qdt.f0, qdt.G_f0
    if 0:
        #G_f=(1.0/sqrt(2.0))*0.5*qdt.Np*qdt.K2*qdt.f0*absolute(sinc(qdt.Np*pi*(freq-qdt.f0)/qdt.f0))
        #b.line_plot("sinc", freq, G_f, label="sinc/sqrt(2)")
        #G_f=0.5*qdt.Np*qdt.K2*qdt.f0*absolute(sinc(qdt.Np*pi*(freq-qdt.f0)/qdt.f0))
        #b.line_plot("sinc2", freq, G_f, label="sinc")
        Np = 9
        K2 = 0.048
        f0 = 2 * 5.45e9

        G_f = 0.5 * Np * K2 * f0 * (sin(Np * pi * (freq - f0) / f0) /
                                    (Np * sin(pi * (freq - f0) / f0)))**2
        b.line_plot("sine_sq", freq, G_f, label="sine_sq")
        G_f = 0.5 * Np * K2 * f0 * sinc_sq(Np * pi * (freq - f0) / f0)
        b.line_plot("sinc_sq", freq, G_f, label="sinc_sq")

        G = 1.0e9
        R = 1 / (1 + (2 * (freq - f0) / G)**2)
        b.line_plot("Rsq", freq, 0.5 * Np * K2 * f0 * R, label="R_sq")

        b.vline_plot("listen", 4.475e9, alpha=0.3, color="black")
        b.vline_plot("listent", 4.55e9, alpha=0.3, color="black")
        b.vline_plot("listenb", 4.4e9, alpha=0.3, color="black")
    if 1:
        Np = 9
        K2 = 0.048
        f0 = 5.45e9
        freq = 4.48e9
        G_f = 0.5 * Np * K2 * f0 * (sin(Np * pi * (freq - f0) / f0) /
Exemple #2
0
 def _update_G_f(self, G_f0, Np, fq, f0):
     return G_f0 * sinc_sq(Np * pi * (fq - f0) / f0)
Exemple #3
0
 def _update_G_f(self, G_f0, Np, fq, f0):
     return G_f0*sinc_sq(Np*pi*(fq-f0)/f0)
    #qdt.get_member("mult").reset(qdt)
    #qdt.get_member("lbda0").reset(qdt)

    print qdt.f0, qdt.G_f0
    if 0:
        #G_f=(1.0/sqrt(2.0))*0.5*qdt.Np*qdt.K2*qdt.f0*absolute(sinc(qdt.Np*pi*(freq-qdt.f0)/qdt.f0))
        #b.line_plot("sinc", freq, G_f, label="sinc/sqrt(2)")
        #G_f=0.5*qdt.Np*qdt.K2*qdt.f0*absolute(sinc(qdt.Np*pi*(freq-qdt.f0)/qdt.f0))
        #b.line_plot("sinc2", freq, G_f, label="sinc")
        Np=9
        K2=0.048
        f0=2*5.45e9

        G_f=0.5*Np*K2*f0*(sin(Np*pi*(freq-f0)/f0)/(Np*sin(pi*(freq-f0)/f0)))**2
        b.line_plot("sine_sq", freq, G_f, label="sine_sq")
        G_f=0.5*Np*K2*f0*sinc_sq(Np*pi*(freq-f0)/f0)
        b.line_plot("sinc_sq", freq, G_f, label="sinc_sq")

        G=1.0e9
        R=1/(1+(2*(freq-f0)/G)**2)
        b.line_plot("Rsq", freq, 0.5*Np*K2*f0*R, label="R_sq")

        b.vline_plot("listen", 4.475e9, alpha=0.3, color="black")
        b.vline_plot("listent", 4.55e9, alpha=0.3, color="black")
        b.vline_plot("listenb", 4.4e9, alpha=0.3, color="black")
    if 1:
        Np=9
        K2=0.048
        f0=5.45e9
        freq=4.48e9
        G_f=0.5*Np*K2*f0*(sin(Np*pi*(freq-f0)/f0)/(Np*sin(pi*(freq-f0)/f0)))**2
Exemple #5
0
 def Ga_f(self, Ga_0, Np, f, f0):
     return Ga_0 * sinc_sq(Np * pi * (f - f0) / f0)
Exemple #6
0
def Ga_f(Ga_0, Np, f, f0):
    """sinc squared behavior of real part of IDT admittance"""
    return Ga_0 * sinc_sq(Np * pi * (f - f0) / f0)
Exemple #7
0
    from taref.physics.fundamentals import sinc, sinc_sq,e
    print e
    b=Plotter()
    from numpy import linspace, pi, absolute, sqrt
    freq=linspace(1e9, 10e9, 1000)
    #qdt.ft="single"
    #qdt.get_member("mult").reset(qdt)
    #qdt.get_member("lbda0").reset(qdt)

    print qdt.f0, qdt.G_f0
    if 0:
        G_f=(1.0/sqrt(2.0))*0.5*qdt.Np*qdt.K2*qdt.f0*absolute(sinc(qdt.Np*pi*(freq-qdt.f0)/qdt.f0))
        b.line_plot("sinc", freq, G_f, label="sinc/sqrt(2)")
        G_f=0.5*qdt.Np*qdt.K2*qdt.f0*absolute(sinc(qdt.Np*pi*(freq-qdt.f0)/qdt.f0))
        b.line_plot("sinc2", freq, G_f, label="sinc")
        G_f=0.5*qdt.Np*qdt.K2*qdt.f0*sinc_sq(qdt.Np*pi*(freq-qdt.f0)/qdt.f0)
        b.line_plot("sinc_sq", freq, G_f, label="sinc_sq")
        b.vline_plot("listen", 4.475e9, alpha=0.3, color="black")
        b.vline_plot("listent", 4.55e9, alpha=0.3, color="black")
        b.vline_plot("listenb", 4.4e9, alpha=0.3, color="black")
    if 0:
        freq=4.475e9
        f0=linspace(5e9, 6e9, 1000)
        G_f=(1.0/sqrt(2.0))*0.5*qdt.Np*qdt.K2*f0*absolute(sinc(qdt.Np*pi*(freq-f0)/f0))
        b.line_plot("sinc", f0, G_f, label="sinc/sqrt(2)")
        G_f=0.5*qdt.Np*qdt.K2*f0*absolute(sinc(qdt.Np*pi*(freq-f0)/f0))
        b.line_plot("sinc2", f0, G_f, label="sinc")
        G_f=0.5*qdt.Np*qdt.K2*f0*sinc_sq(qdt.Np*pi*(freq-f0)/f0)
        b.line_plot("sinc_sq", f0, G_f, label="sinc_sq")
        b.vline_plot("theory", 5.45e9, alpha=0.3, color="black", label="theory")
        #b.vline_plot("listent", 4.55e9, alpha=0.3, color="black")
Exemple #8
0
 def Ga_f(self, Ga_0, Np, f, f0):
     return Ga_0*sinc_sq(Np*pi*(f-f0)/f0)
Exemple #9
0
def Ga_f(Ga_0, Np, f, f0):
    """sinc squared behavior of real part of IDT admittance"""
    return Ga_0*sinc_sq(Np*pi*(f-f0)/f0)