def waveform_to_file(
station=0, clen=10000, oversample=10, filter_output=False,
):
a = rep_seq(
create_pseudo_random_code(clen=clen, seed=station),
rep=oversample,
)
if filter_output:
w = numpy.zeros([oversample * clen], dtype=numpy.complex64)
fl = (int(oversample + (0.1 * oversample)))
w[0:fl] = scipy.signal.blackmanharris(fl)
aa = numpy.fft.ifft(numpy.fft.fft(w) * numpy.fft.fft(a))
a = aa / numpy.max(numpy.abs(aa))
a = numpy.array(a, dtype=numpy.complex64)
a.tofile('code-l%d-b%d-%06df.bin' % (clen, oversample, station))
else:
a.tofile('code-l%d-b%d-%06d.bin' % (clen, oversample, station))
评论列表
文章目录