create_waveform.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:digital_rf 作者: MITHaystack 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号