#!/usr/bin/env python3 import wave, numpy as np, matplotlib.pyplot as plt from scipy import signal as sig launch=3 # launch occurs at 3 seconds into the audio file startplot=2; endplot=6 # plot this time period rf_frequency=869.5e6; speed_of_light=299.79e6; speed_of_sound=343; # get the audio data and normalize it infile=wave.open("data.wav"); sr=infile.getframerate() audio=np.frombuffer(infile.readframes(infile.getnframes()), dtype=np.int16).astype(np.float32)/2**15 # filter out high frequency noise above 3.5 kHz or so b,a=sig.butter(6, 3500/(sr/2), 'low', analog=False); audio=sig.filtfilt(b, a, audio) # get the instantaneous frequency freq=np.linspace(0, 0, audio.size); i=0; bla=0 while i=0: n=n+1; i=i+1 while i