rm = self.env.r(self.c, pos, self.mpos.mpos)
delays = exp(-2j*pi*(rm/self.c)*\
fft.fftfreq(int(self.numsamples),1.0/self.sample_freq)[:,newaxis])
out = fft.ifft(signal[:, newaxis]*delays, axis=0).real/rm
i = 0
while i < self.numsamples:
yield out[i:i+num]
After Change
signal = self.signal.usignal(self.up)
out = empty((num, self.numchannels))
// distances
rm = self.env.r(self.c, array(self.loc).reshape((3, 1)), self.mpos.mpos)
// emission time relative to start_t (in samples) for first sample
ind = (-rm/self.c-self.start_t+self.start)*self.sample_freq
i = 0
n = self.numsamples
while n:
n -= 1
try:
out[i] = signal[array(0.5+ind*self.up, dtype=long)]/rm
ind += 1.
i += 1
if i == num: