Guest User

Untitled

a guest
Apr 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # This is what the value of K will be at the end (in dB):
  2. kend = 10**((-6*np.log2(self.w2/self.w1))/20)
  3. # dB to rational number.
  4. k = np.log(kend)/self.T
  5.  
  6. # Making reverse probe impulse so that convolution will just
  7. # calculate dot product. Weighting it with exponent to acheive
  8. # 6 dB per octave amplitude decrease.
  9. self.reverse_pulse = self.probe_pulse[-1::-1] * \
  10. np.array(list(\
  11. map(lambda t: np.exp(t*k), np.arange(self.T))\
  12. )\
  13. )
Add Comment
Please, Sign In to add comment