class MultibandFlow(object): def init(self, context): channel1 = context.get_channel('Channel 1', color='red', label='Raw with 50/60 Hz Noise') dcblock = DCBlock(channel1) channel1 = BandPass(0.0, 30.0, input=dcblock.ac, order=6) self.OSC1 = Oscilloscope('Raw Signal', channels=[channel1]) alpha = BandPass(9, 11, input=channel1) theta = BandPass(5, 7, input=channel1) delta = BandPass(1.5, 3, input=channel1) lobeta = BandPass(13, 15, input=channel1) hibeta = BandPass(15, 20, input=channel1) alpha.output.color = 'green' theta.output.color = 'orange' delta.output.color = 'red' lobeta.output.color = 'blue' hibeta.output.color = 'cyan' chanlist = [alpha, theta, delta, lobeta, hibeta] self.OSC2 = Oscilloscope('Band Signal', channels=chanlist) amplitudes = [RMS(channel) for channel in chanlist] self.OSC3 = Oscilloscope('Amplitude', channels=amplitudes) trends = [Trendline(channel) for channel in amplitudes] self.OSC4 = Oscilloscope('SMR Trendline', channels=trends) self.Spec = BarSpectrogram('Spectrogram', input=channel1) dctrend = Trendline(dcblock.dc) self.DCOSC = Oscilloscope('DC Trend', channels=[dctrend]) def widget(self): w = QtGui.QWidget() layout = QtGui.QGridLayout() w.setLayout(layout) layout.addWidget(self.OSC1.widget(), 0, 0) layout.addWidget(self.OSC2.widget(), 1, 0) layout.addWidget(self.OSC3.widget(), 2, 0) layout.addWidget(self.OSC4.widget(), 3, 0) layout.addWidget(self.Spec.widget(), 0, 1, 3, 1) layout.addWidget(self.DCOSC.widget(), 3, 1) return w
class MultibandFlow(object): def init(self, context): channel1 = context.get_channel('Channel 1', color='red', label='Raw with 50/60 Hz Noise') dcblock = DCBlock(channel1) channel1 = BandPass(0.0, 30.0, input=dcblock.ac, order=6) self.OSC1 = Oscilloscope('Raw Signal', channels=[channel1]) alpha = BandPass(9, 11, input=channel1) theta = BandPass(5, 7, input=channel1) delta = BandPass(1.5, 3, input=channel1) lobeta = BandPass(13, 15, input=channel1) hibeta = BandPass(15, 20, input=channel1) alpha.output.color = 'green' theta.output.color = 'orange' delta.output.color = 'red' lobeta.output.color = 'blue' hibeta.output.color = 'cyan' chanlist = [alpha, theta, delta, lobeta, hibeta] self.OSC2 = Oscilloscope('Band Signal', channels=chanlist) amplitudes = [RMS(channel) for channel in chanlist] self.OSC3 = Oscilloscope('Amplitude', channels=amplitudes) trends = [Trendline(channel) for channel in amplitudes] self.OSC4 = Oscilloscope('SMR Trendline', channels=trends) self.Spec = BarSpectrogram('Spectrogram', input=channel1) dctrend = Trendline(dcblock.dc) self.DCOSC = Oscilloscope('DC Trend', channels=[dctrend]) def widget(self): w = QtGui.QWidget() layout = QtGui.QGridLayout() w.setLayout(layout) layout.addWidget(self.OSC1.widget(), 0, 0) layout.addWidget(self.OSC2.widget(), 1, 0) layout.addWidget(self.OSC3.widget(), 2, 0) layout.addWidget(self.OSC4.widget(), 3, 0) layout.addWidget(self.Spec.widget(), 0, 1, 3, 1) layout.addWidget(self.DCOSC.widget(), 3, 1) return w
class SMRFlow(object): def init(self, context): Cz = context.get_channel('Channel 1', color='red', label='Raw with 50/60 Hz Noise') Cz = DCBlock(Cz).ac Cz = BandPass(0.0, 35.0, input=Cz) self.OSC1 = Oscilloscope('Raw Signal', channels=[BandPass(0.0, 30.0, input=Cz)]) SMR = BandPass(12, 15, input=Cz, order=6) self.OSC2 = Oscilloscope('SMR Signal', channels=[SMR]) SMR_amplitude = RMS(SMR) theta_ampl = RMS(BandPass(4, 8, input=Cz)) theta_ampl.output.color = 'red' total_power = RMS(Cz) self.OSC3 = Oscilloscope('SMR Amplitude', channels=[SMR_amplitude, theta_ampl]) SMR_trend = Trendline(SMR_amplitude) total_trend = Trendline(total_power) total_trend.output.color = 'red' self.OSC4 = Oscilloscope('SMR Trendline', channels=[SMR_trend, total_trend]) self.bb = BinauralBeat(volume=SMR_amplitude) self.Spec = BarSpectrogram('Cz Spectrogram', input=BandPass(0.1, 30.0, input=Cz, order=6)) def widget(self): w = QtGui.QWidget() layout = QtGui.QGridLayout() w.setLayout(layout) layout.addWidget(self.OSC1.widget(), 0, 0) layout.addWidget(self.OSC2.widget(), 1, 0) layout.addWidget(self.OSC3.widget(), 2, 0) layout.addWidget(self.OSC4.widget(), 3, 0) layout.addWidget(self.Spec.widget(), 0, 1, 4, 1) return w
class SMRFlow(object): def init(self, context): Cz = context.get_channel('Channel 1', color='red', label='Raw with 50/60 Hz Noise') Cz = DCBlock(Cz).ac Cz = BandPass(0.0, 35.0, input=Cz) self.OSC1 = Oscilloscope('Raw Signal', channels=[BandPass(0.0, 30.0, input=Cz)]) SMR = BandPass(12, 15, input=Cz, order=6) self.OSC2 = Oscilloscope('SMR Signal', channels=[SMR]) SMR_amplitude = RMS(SMR) theta_ampl = RMS(BandPass(4, 8, input=Cz)) theta_ampl.output.color='red' total_power = RMS(Cz) self.OSC3 = Oscilloscope('SMR Amplitude', channels=[SMR_amplitude, theta_ampl]) SMR_trend = Trendline(SMR_amplitude) total_trend = Trendline(total_power) total_trend.output.color = 'red' self.OSC4 = Oscilloscope('SMR Trendline', channels=[SMR_trend, total_trend]) self.bb = BinauralBeat(volume=SMR_amplitude) self.Spec = BarSpectrogram('Cz Spectrogram', input=BandPass(0.1, 30.0, input=Cz, order=6)) def widget(self): w = QtGui.QWidget() layout = QtGui.QGridLayout() w.setLayout(layout) layout.addWidget(self.OSC1.widget(), 0, 0) layout.addWidget(self.OSC2.widget(), 1, 0) layout.addWidget(self.OSC3.widget(), 2, 0) layout.addWidget(self.OSC4.widget(), 3, 0) layout.addWidget(self.Spec.widget(), 0, 1, 4, 1) return w