示例#1
0
def __run():
    N = 3328
    d = test_data()
    p = Periodogram(d, 10000., N, window='HFT116D', overlap=0.5)

    print("FFT is " + _fft_name)
    print("Params: " + repr(p.get_parameters()))
    #plot(f, sqrt(ps_to_psd(ps, params_dict)))
    figure()
    title("linear spectrum")
    ylabel("Vrms")
    plot(p.f, p.ls())
    figure()
    title("linear spectral density")
    ylabel("Vrms/sqrt(Hz)")
    plot(p.f, p.lsd())
    yscale('log')
    show()
示例#2
0
def __run():
    N = 3328
    d = test_data()
    p = Periodogram(d, 10000., N, window='HFT116D', overlap=0.5)

    print("FFT is " + _fft_name)
    print("Params: " + repr(p.get_parameters()))
    #plot(f, sqrt(ps_to_psd(ps, params_dict)))
    figure()
    title("linear spectrum")
    ylabel("Vrms")
    plot(p.f, p.ls())
    figure()
    title("linear spectral density")
    ylabel("Vrms/sqrt(Hz)")
    plot(p.f, p.lsd())
    yscale('log')
    show()
示例#3
0
    def __init__(self, path):
        self.path = path
        self.source, self.sink = Pipe()
        self.events = { 'reading': Event() }

        if self.path is '':
            self.reader = HackRFIO(self.source, self.events)
        else:
            self.reader = FileIO(self.path, self.source, self.events)
        self.reader.start()

        self.periodogram = Periodogram(self.sink, self.events)
        self.periodogram.start()

        try:
            self.reader.join()
            self.periodogram.join()
        except KeyboardInterrupt:
            self.reader.terminate()
            self.periodogram.terminate()