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)
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)
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)