Example #1
0
def main():
    t = Topology("FFT_Sample")
    readings = t.source(signal_generator.Readings(50)).transform(
        TumblingWindow(10))
    fftStream = readings.transform(fftpack.fft)
    fftStream.sink(print)

    streamsx.topology.context.submit("STANDALONE", t.graph)
Example #2
0
def main():
    ref_signal = signal.hann(10)

    t = Topology("FFTConvolve_Sample")
    readings = t.source(signal_generator.Readings(10000)).transform(TumblingWindow(1000))
    convolveStream = readings.transform(signal_functions.FFTConvolve(ref_signal))
    convolveStream.sink(print)

    streamsx.topology.context.submit("STANDALONE", t.graph)
Example #3
0
def main():
    filter_order = 4
    cutoffFreq = 100
    sampleRate = 1000

    t = Topology("LowpassFilter_Sample")
    readings = t.source(signal_generator.Readings(50000)).transform(TumblingWindow(2000))
    filterStream = readings.transform(butterworth.Lowpass(filter_order, cutoffFreq, sampleRate))
    filterStream.sink(print)

    streamsx.topology.context.submit("STANDALONE", t.graph)