Demo entry 5469309

Get Echo

   

Submitted by anonymous on Jun 26, 2016 at 20:22
Language: Python. Code size: 514 Bytes.

def GetEcho(cd, rbw, rsf, c0, Nr, r0min, delay):
    echo = np.zeros(Nr, np.complex)
    #construction of time vector
    t=2*r0min/c0+np.arange(Nr)/rsf
    #construction of the pulse envelope
    nl=np.ceil((delay-2*r0min/c0)*rsf)
    nr=np.floor((delay+cd-2*r0min/c0)*rsf)
    echo[nl: nr] = 1.
    #chirprate
    chirprate=rbw/cd
    #now add phase
    phi_fk=PI*chirprate*np.power(t-(2*r0min/c0),2)
    
    #Place Echo
    echo=echo*np.exp(-1j*4*PI*rsf*r0min/c0)*np.exp(1j*phi_fk)

return echo

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).