def get_full_sequence(self, repeats=1):
"""Get the full MLS sequence as audio samples, repeated n times. When
extracting the impulse response we need to throw away the first MLS
sequence. Hence we need to repeat the signal at least once, i.e
repeat=2. More repetitions will mean longer signal but better signal
to noise ratio since we will average away any noise.
"""
chunkgen = self.generator_samples(chunk=self.L)
full_sequence = chunkgen.next()
reps_sequence = np.tile(full_sequence.T, repeats).T
self._logger.debug("May share memory: %s" %np.may_share_memory(full_sequence,
reps_sequence))
return reps_sequence
评论列表
文章目录