python类HORIZONTAL的实例源码

mentaltasks.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def initTrialSecs(self):
        secsSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        trainTrialSecsControlBox = widgets.ControlBox(self,
                label='Train Trial Secs', orient=wx.VERTICAL)

        self.trainTrialSecsFloatSpin = agwfs.FloatSpin(self, min_val=2.00, max_val=60.0,
                increment=1/4.0, value=self.pg.trainTrialSecs)
        self.trainTrialSecsFloatSpin.SetFormat('%f')
        self.trainTrialSecsFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setTrialSecs, self.trainTrialSecsFloatSpin)
        self.offlineControls += [self.trainTrialSecsFloatSpin]
        trainTrialSecsControlBox.Add(self.trainTrialSecsFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        secsSizer.Add(trainTrialSecsControlBox, proportion=1,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        pauseSecsControlBox = widgets.ControlBox(self, label='Pause Secs', orient=wx.VERTICAL)
        self.pauseSecsFloatSpin = agwfs.FloatSpin(self, min_val=0.25, max_val=10.0,
                increment=1/4.0, value=self.pg.pauseSecs)
        self.pauseSecsFloatSpin.SetFormat('%f')
        self.pauseSecsFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setPauseSecs, self.pauseSecsFloatSpin)
        self.offlineControls += [self.pauseSecsFloatSpin]
        pauseSecsControlBox.Add(self.pauseSecsFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        secsSizer.Add(pauseSecsControlBox, proportion=1,
                flag=wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(secsSizer, proportion=0, flag=wx.EXPAND)
mentaltasks.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def initTiming(self):
        timingSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        widthControlBox = widgets.ControlBox(self, label='Width Secs', orient=wx.VERTICAL)
        self.widthFloatSpin = agwfs.FloatSpin(self, min_val=0.2, max_val=5.0,
            increment=0.05, value=self.pg.width)
        self.widthFloatSpin.SetFormat('%f')
        self.widthFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWidth, self.widthFloatSpin)
        self.offlineControls += [self.widthFloatSpin]
        widthControlBox.Add(self.widthFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        timingSizer.Add(widthControlBox, proportion=1,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        decisionSecsControlBox = widgets.ControlBox(self, label='Decision Secs', orient=wx.VERTICAL)
        self.decisionSecsFloatSpin = agwfs.FloatSpin(self, min_val=0.025, max_val=5.0,
                increment=0.025, value=self.pg.decisionSecs)
        self.decisionSecsFloatSpin.SetFormat('%f')
        self.decisionSecsFloatSpin.SetDigits(4)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setDecisionSecs, self.decisionSecsFloatSpin)
        self.offlineControls += [self.decisionSecsFloatSpin]
        decisionSecsControlBox.Add(self.decisionSecsFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        timingSizer.Add(decisionSecsControlBox, proportion=1,
            flag=wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(timingSizer, proportion=0, flag=wx.EXPAND)
specgram.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def initControls(self):
        nFreqControlBox = widgets.ControlBox(self, label='Num Freqs', orient=wx.HORIZONTAL)
        self.nFreqText = wx.StaticText(self, label='%3d' % self.pg.waveletConfig.nFreq)
        nFreqTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        nFreqTextSizer.Add(self.nFreqText, proportion=1, flag=wx.LEFT | wx.RIGHT | wx.EXPAND, border=8)
        self.nFreqSlider = wx.Slider(self, style=wx.SL_HORIZONTAL,
            value=self.pg.waveletConfig.nFreq/5, minValue=1, maxValue=100)
        nFreqControlBox.Add(nFreqTextSizer, proportion=0, flag=wx.TOP, border=10)
        nFreqControlBox.Add(self.nFreqSlider, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        self.Bind(wx.EVT_SLIDER, self.setNFreq, self.nFreqSlider)

        self.sizer.Add(nFreqControlBox, proportion=0, flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        spanControlBox = widgets.ControlBox(self, label='Span', orient=wx.HORIZONTAL)
        self.spanText = wx.StaticText(self, label='%3d' % self.pg.waveletConfig.span)
        spanTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        spanTextSizer.Add(self.spanText, proportion=1, flag=wx.LEFT | wx.RIGHT | wx.EXPAND, border=8)
        self.spanSlider = wx.Slider(self, style=wx.SL_HORIZONTAL,
            value=self.pg.waveletConfig.span, minValue=1, maxValue=50)
        spanControlBox.Add(spanTextSizer, proportion=0, flag=wx.TOP, border=10)
        spanControlBox.Add(self.spanSlider, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        self.Bind(wx.EVT_SLIDER, self.setSpan, self.spanSlider)

        self.sizer.Add(spanControlBox, proportion=0, flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
bciplayer.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def initIntervals(self):
        intervalSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        siControlBox = widgets.ControlBox(self, label='Stim Secs', orient=wx.VERTICAL)

        self.siFloatSpin = agwfs.FloatSpin(self, min_val=0.025, max_val=0.5,
                increment=1/40.0, value=self.pg.si)
        self.siFloatSpin.SetFormat("%f")
        self.siFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setSI, self.siFloatSpin)
        self.offlineControls += [self.siFloatSpin]
        siControlBox.Add(self.siFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        intervalSizer.Add(siControlBox, proportion=1,
                flag=wx.RIGHT | wx.BOTTOM | wx.LEFT | wx.EXPAND, border=10)

        isiControlBox = widgets.ControlBox(self, label='Inter-Stim Secs', orient=wx.VERTICAL)
        self.isiFloatSpin = agwfs.FloatSpin(self, min_val=0.05, max_val=1.0,
                increment=1/20.0, value=self.pg.isi)
        self.isiFloatSpin.SetFormat("%f")
        self.isiFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setISI, self.isiFloatSpin)
        self.offlineControls += [self.isiFloatSpin]
        isiControlBox.Add(self.isiFloatSpin, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        intervalSizer.Add(isiControlBox, proportion=1,
            flag=wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=10)

        self.sizer.Add(intervalSizer, proportion=0, flag=wx.EXPAND)
bciplayer.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def initSegWindow(self):
        windowSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        windowStartControlBox = widgets.ControlBox(self, label='Window Start', orient=wx.VERTICAL)

        self.windowStartFloatSpin = agwfs.FloatSpin(self, min_val=0.0, max_val=0.25,
                increment=1/40.0, value=self.pg.windowStart)
        self.windowStartFloatSpin.SetFormat("%f")
        self.windowStartFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWindowStart, self.windowStartFloatSpin)
        self.offlineControls += [self.windowStartFloatSpin]
        windowStartControlBox.Add(self.windowStartFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        windowSizer.Add(windowStartControlBox, proportion=1,
                flag=wx.RIGHT | wx.BOTTOM | wx.LEFT | wx.EXPAND, border=10)

        windowEndControlBox = widgets.ControlBox(self, label='Window End', orient=wx.VERTICAL)
        self.windowEndFloatSpin = agwfs.FloatSpin(self, min_val=0.3, max_val=1.5,
                increment=1/20.0, value=self.pg.windowEnd)
        self.windowEndFloatSpin.SetFormat("%f")
        self.windowEndFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWindowEnd, self.windowEndFloatSpin)
        self.offlineControls += [self.windowEndFloatSpin]
        windowEndControlBox.Add(self.windowEndFloatSpin, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        windowSizer.Add(windowEndControlBox, proportion=1,
            flag=wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=10)

        self.sizer.Add(windowSizer, proportion=0, flag=wx.EXPAND)
p300grid.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def initCopy(self):
        copySizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        copyControlBox = widgets.ControlBox(self, label='Copy Text', orient=wx.VERTICAL)
        self.copyTextCtrl = wx.TextCtrl(self)
        self.Bind(wx.EVT_TEXT, self.setCopyText, self.copyTextCtrl)         
        self.offlineControls += [self.copyTextCtrl]
        copyControlBox.Add(self.copyTextCtrl, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)

        copySizer.Add(copyControlBox, proportion=1,
                flag =wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(copySizer, proportion=0, flag=wx.EXPAND)
p300grid.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def initNTrial(self):
        trialSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        trialControlBox = widgets.ControlBox(self, label='Num Trials', orient=wx.VERTICAL)
        self.trialSpinCtrl = wx.SpinCtrl(self, #style=wx.SP_WRAP,
                value=str(self.pg.nTrials), min=1, max=100)
        self.Bind(wx.EVT_SPINCTRL, self.setNTrial, self.trialSpinCtrl)
        self.offlineControls += [self.trialSpinCtrl]
        trialControlBox.Add(self.trialSpinCtrl, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)

        trialSizer.Add(trialControlBox, proportion=1,
                flag=wx.LEFT | wx.BOTTOM | wx.EXPAND, border=10)

        pauseControlBox = widgets.ControlBox(self,
                label='Pause Secs', orient=wx.VERTICAL)

        self.pauseFloatSpin = agwfs.FloatSpin(self, min_val=0.5, max_val=5.0,
                increment=0.5, value=self.pg.pause)
        self.pauseFloatSpin.SetFormat("%f")
        self.pauseFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setPause, self.pauseFloatSpin)
        self.offlineControls += [self.pauseFloatSpin]
        pauseControlBox.Add(self.pauseFloatSpin, proportion=0,
            flag=wx.ALL | wx.EXPAND, border=12)

        trialSizer.Add(pauseControlBox, proportion=1,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(trialSizer, proportion=0, flag=wx.EXPAND)
p300grid.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def initIntervals(self):
        intervalSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        siControlBox = widgets.ControlBox(self, label='Stim Secs', orient=wx.VERTICAL)

        self.siFloatSpin = agwfs.FloatSpin(self, min_val=0.025, max_val=0.5,
                increment=1/40.0, value=self.pg.si)
        self.siFloatSpin.SetFormat("%f")
        self.siFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setSI, self.siFloatSpin)
        self.offlineControls += [self.siFloatSpin]
        siControlBox.Add(self.siFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)

        intervalSizer.Add(siControlBox, proportion=1,
                 flag=wx.LEFT | wx.BOTTOM | wx.EXPAND, border=10)

        isiControlBox = widgets.ControlBox(self, label='Inter-Stim Secs', orient=wx.VERTICAL)
        self.isiFloatSpin = agwfs.FloatSpin(self, min_val=0.05, max_val=1.0,
                increment=1/40.0, value=self.pg.isi)
        self.isiFloatSpin.SetFormat("%f")
        self.isiFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setISI, self.isiFloatSpin)
        self.offlineControls += [self.isiFloatSpin]
        isiControlBox.Add(self.isiFloatSpin, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)

        intervalSizer.Add(isiControlBox, proportion=1,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(intervalSizer, proportion=0, flag=wx.EXPAND)
p300grid.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def initSegWindow(self):
        windowSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        windowStartControlBox = widgets.ControlBox(self, label='Window Start', orient=wx.VERTICAL)

        self.windowStartFloatSpin = agwfs.FloatSpin(self, min_val=0.0, max_val=0.25,
                increment=1/40.0, value=self.pg.windowStart)
        self.windowStartFloatSpin.SetFormat("%f")
        self.windowStartFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWindowStart, self.windowStartFloatSpin)
        self.offlineControls += [self.windowStartFloatSpin]
        windowStartControlBox.Add(self.windowStartFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)

        windowSizer.Add(windowStartControlBox, proportion=1,
                flag=wx.LEFT | wx.BOTTOM | wx.EXPAND, border=10)

        windowEndControlBox = widgets.ControlBox(self, label='Window End', orient=wx.VERTICAL)
        self.windowEndFloatSpin = agwfs.FloatSpin(self, min_val=0.3, max_val=1.5,
                increment=1/20.0, value=self.pg.windowEnd)
        self.windowEndFloatSpin.SetFormat("%f")
        self.windowEndFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWindowEnd, self.windowEndFloatSpin)
        self.offlineControls += [self.windowEndFloatSpin]
        windowEndControlBox.Add(self.windowEndFloatSpin, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)

        windowSizer.Add(windowEndControlBox, proportion=1,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(windowSizer, proportion=0, flag=wx.EXPAND)
p300grid.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def initGridLayout(self):
        gridLayoutControlBox = widgets.ControlBox(self, label='Layout', orient=wx.VERTICAL)

        topSizer = wx.BoxSizer(orient=wx.HORIZONTAL)
        bottomSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        self.gridLayoutLowButton = wx.Button(self, label='Low')
        self.gridLayoutUppButton = wx.Button(self, label='Upp')
        self.gridLayoutNumButton = wx.Button(self, label='Num')
        self.gridLayoutEtcButton = wx.Button(self, label='Etc')
        self.gridLayoutSymButton = wx.Button(self, label='Sym')

        topSizer.Add(self.gridLayoutLowButton, proportion=0,
                flag=wx.TOP | wx.LEFT | wx.BOTTOM, border=10)
        self.Bind(wx.EVT_BUTTON, self.setGridLayoutLow, self.gridLayoutLowButton)
        topSizer.Add(self.gridLayoutUppButton, proportion=0,
                flag=wx.TOP | wx.BOTTOM, border=10)
        self.Bind(wx.EVT_BUTTON, self.setGridLayoutUpp, self.gridLayoutUppButton)
        topSizer.Add(self.gridLayoutNumButton, proportion=0,
                flag=wx.BOTTOM | wx.RIGHT | wx.TOP, border=10)
        self.Bind(wx.EVT_BUTTON, self.setGridLayoutNum, self.gridLayoutNumButton)

        bottomSizer.Add(self.gridLayoutEtcButton, proportion=0,
                flag=wx.LEFT | wx.BOTTOM, border=10)
        self.Bind(wx.EVT_BUTTON, self.setGridLayoutEtc, self.gridLayoutEtcButton)
        bottomSizer.Add(self.gridLayoutSymButton, proportion=0,
                flag=wx.RIGHT | wx.BOTTOM , border=10)
        self.Bind(wx.EVT_BUTTON, self.setGridLayoutSym, self.gridLayoutSymButton)

        gridLayoutControlBox.Add(topSizer, proportion=0, flag=wx.EXPAND)
        gridLayoutControlBox.Add(bottomSizer, proportion=0, flag=wx.EXPAND)

        self.sizer.Add(gridLayoutControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
power.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def initControls(self):
        orderControlBox = widgets.ControlBox(self, label='Model Order', orient=wx.HORIZONTAL)
        self.orderText = wx.StaticText(self, label='%3d' % self.pg.autoregConfig.order)
        orderTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        orderTextSizer.Add(self.orderText, proportion=1,
                flag=wx.LEFT | wx.RIGHT | wx.EXPAND, border=8)
        self.orderSlider = wx.Slider(self, style=wx.SL_HORIZONTAL,
            value=self.pg.autoregConfig.order, minValue=1, maxValue=100)
        orderControlBox.Add(orderTextSizer, proportion=0, flag=wx.TOP, border=10)
        orderControlBox.Add(self.orderSlider, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        self.Bind(wx.EVT_SLIDER, self.setOrder, self.orderSlider)

        self.sizer.Add(orderControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        nFreqControlBox = widgets.ControlBox(self, label='Num Freqs', orient=wx.HORIZONTAL)
        self.nFreqText = wx.StaticText(self, label='%3d' % self.pg.autoregConfig.nFreq)
        nFreqTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        nFreqTextSizer.Add(self.nFreqText, proportion=1,
                flag=wx.LEFT | wx.RIGHT | wx.EXPAND, border=8)
        self.nFreqSlider = wx.Slider(self, style=wx.SL_HORIZONTAL,
            value=self.pg.autoregConfig.nFreq/5, minValue=1, maxValue=100)
        nFreqControlBox.Add(nFreqTextSizer, proportion=0, flag=wx.TOP, border=10)
        nFreqControlBox.Add(self.nFreqSlider, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        self.Bind(wx.EVT_SLIDER, self.setNFreq, self.nFreqSlider)

        self.sizer.Add(nFreqControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
motorpong.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def initFeatures(self):
        featureSizer = wx.BoxSizer(orient=wx.HORIZONTAL)
        spanControlBox = widgets.ControlBox(self, label='Welch Span', orient=wx.VERTICAL)
        self.spanFloatSpin = agwfs.FloatSpin(self, min_val=0.1, max_val=3.0,
            increment=0.05, value=self.pg.welchConfig.span)
        self.spanFloatSpin.SetFormat('%f')
        self.spanFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setSpan, self.spanFloatSpin)
        self.cp.offlineControls += [self.spanFloatSpin]
        spanControlBox.Add(self.spanFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        featureSizer.Add(spanControlBox, proportion=1,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        # radio buttons for turning log transform on and off
        logTransControlBox = widgets.ControlBox(self, label='Log Trans', orient=wx.HORIZONTAL)

        logTransOnRbtn = wx.RadioButton(self, label='On', style=wx.RB_GROUP)
        self.Bind(wx.EVT_RADIOBUTTON, self.setLogTransOn, logTransOnRbtn)
        logTransControlBox.Add(logTransOnRbtn, proportion=0, flag=wx.ALL, border=10)
        self.cp.offlineControls += [logTransOnRbtn]

        logTransOffRbtn = wx.RadioButton(self, label='Off')
        self.Bind(wx.EVT_RADIOBUTTON, self.setLogTransOff, logTransOffRbtn)
        logTransControlBox.Add(logTransOffRbtn, proportion=0, flag=wx.ALL, border=10)
        self.cp.offlineControls += [logTransOffRbtn]

        if self.pg.welchConfig.logTrans:
            logTransOnRbtn.SetValue(True)
        else:
            logTransOffRbtn.SetValue(True)

        featureSizer.Add(logTransControlBox, proportion=1,
                flag=wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(featureSizer, proportion=0, flag=wx.EXPAND)
motorpong.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def initFreqs(self):
        lowHighFreqSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        lowFreqControlBox = widgets.ControlBox(self, label='Low Freq', orient=wx.VERTICAL)
        self.lowFreqFloatSpin = agwfs.FloatSpin(self, min_val=0.25, max_val=100.0,
                increment=1/4.0, value=self.pg.welchConfig.lowFreq)
        self.lowFreqFloatSpin.SetFormat('%f')
        self.lowFreqFloatSpin.SetDigits(4)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setLowFreq, self.lowFreqFloatSpin)
        self.cp.offlineControls += [self.lowFreqFloatSpin]
        lowFreqControlBox.Add(self.lowFreqFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        lowHighFreqSizer.Add(lowFreqControlBox, proportion=1,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        highFreqControlBox = widgets.ControlBox(self, label='High Freq', orient=wx.VERTICAL)

        self.highFreqFloatSpin = agwfs.FloatSpin(self, min_val=0.25, max_val=100.0,
             increment=1/4.0, value=self.pg.welchConfig.highFreq)
        self.highFreqFloatSpin.SetFormat('%f')
        self.highFreqFloatSpin.SetDigits(4)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setHighFreq, self.highFreqFloatSpin)
        self.cp.offlineControls += [self.highFreqFloatSpin]
        highFreqControlBox.Add(self.highFreqFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        lowHighFreqSizer.Add(highFreqControlBox, proportion=1,
                flag=wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(lowHighFreqSizer, proportion=0, flag=wx.EXPAND)
motorpong.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def initTiming(self):
        timingSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        widthControlBox = widgets.ControlBox(self, label='Width Secs', orient=wx.VERTICAL)
        self.widthFloatSpin = agwfs.FloatSpin(self, min_val=0.2, max_val=5.0,
            increment=0.05, value=self.pg.width)
        self.widthFloatSpin.SetFormat('%f')
        self.widthFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWidth, self.widthFloatSpin)
        self.offlineControls += [self.widthFloatSpin]
        widthControlBox.Add(self.widthFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        timingSizer.Add(widthControlBox, proportion=1,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        decisionSecsControlBox = widgets.ControlBox(self, label='Decision Secs', orient=wx.VERTICAL)
        self.decisionSecsFloatSpin = agwfs.FloatSpin(self, min_val=0.025, max_val=5.0,
                increment=0.025, value=self.pg.decisionSecs)
        self.decisionSecsFloatSpin.SetFormat('%f')
        self.decisionSecsFloatSpin.SetDigits(4)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setDecisionSecs, self.decisionSecsFloatSpin)
        self.offlineControls += [self.decisionSecsFloatSpin]
        decisionSecsControlBox.Add(self.decisionSecsFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        timingSizer.Add(decisionSecsControlBox, proportion=1,
            flag=wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(timingSizer, proportion=0, flag=wx.EXPAND)
motorpong.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def initGainLoss(self):
        gainLossSizer = wx.BoxSizer(orient=wx.VERTICAL)

        gainControlBox = widgets.ControlBox(self, label='Gain', orient=wx.HORIZONTAL)
        self.gainText = wx.StaticText(self, label='%0.2f' % self.pg.gain)
        gainTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        gainTextSizer.Add(self.gainText, proportion=1, flag=wx.EXPAND)
        self.gainSlider = wx.Slider(self, style=wx.SL_HORIZONTAL,
            value=int(self.pg.gain*100.0), minValue=1, maxValue=100)
        self.Bind(wx.EVT_SLIDER, self.setGain, self.gainSlider)
        gainControlBox.Add(gainTextSizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)
        gainControlBox.Add(self.gainSlider, proportion=1, flag=wx.ALL | wx.EXPAND, border=10)
        gainLossSizer.Add(gainControlBox,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        lossControlBox = widgets.ControlBox(self, label='Loss', orient=wx.HORIZONTAL)
        self.lossText = wx.StaticText(self, label='%0.2f' % self.pg.loss)
        lossTextSizer = wx.BoxSizer(orient=wx.VERTICAL)
        lossTextSizer.Add(self.lossText, proportion=1, flag=wx.EXPAND)
        self.lossSlider = wx.Slider(self, style=wx.SL_HORIZONTAL,
            value=int(self.pg.loss*100.0), minValue=1, maxValue=100)
        self.Bind(wx.EVT_SLIDER, self.setLoss, self.lossSlider)
        lossControlBox.Add(lossTextSizer, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)
        lossControlBox.Add(self.lossSlider, proportion=1, flag=wx.ALL | wx.EXPAND, border=10)
        gainLossSizer.Add(lossControlBox,
            flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(gainLossSizer, proportion=0, flag=wx.EXPAND)
p300bot.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def initRobot(self):
        # robot kind
        robotKindControlBox = widgets.ControlBox(self, label='Robot Kind', orient=wx.VERTICAL)

        self.robotKindComboBox = wx.ComboBox(self, value='ER1',
                style=wx.CB_READONLY, choices=('ER1', 'Baxter'))
        self.Bind(wx.EVT_COMBOBOX, self.setRobotKind, self.robotKindComboBox)
        self.offlineControls += [self.robotKindComboBox]
        robotKindControlBox.Add(self.robotKindComboBox, proportion=0,
                flag=wx.ALL | wx.EXPAND, border=10)

        self.sizer.Add(robotKindControlBox, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)

        robotHostControlBox = widgets.ControlBox(self, label='Robot Hostname', orient=wx.HORIZONTAL)

        # robot host
        self.robotHostTextCtrl = wx.TextCtrl(parent=self, value='IP or host name')
        #self.robotHostTextCtrl.SetHint('IP or host name') # in next version of wxpython? XXX - idfah
        robotHostControlBox.Add(self.robotHostTextCtrl, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)

        # robot connect button
        self.robotConnectButton = wx.Button(self, label='Connect')
        robotHostControlBox.Add(self.robotConnectButton, proportion=0,
                flag=wx.BOTTOM | wx.RIGHT | wx.TOP, border=10)
        self.Bind(wx.EVT_BUTTON, self.setRobotHost, self.robotConnectButton)

        self.sizer.Add(robotHostControlBox, proportion=0,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)
p300bot.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def initIntervals(self):
        intervalSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        siControlBox = widgets.ControlBox(self, label='Stim Secs', orient=wx.VERTICAL)

        self.siFloatSpin = agwfs.FloatSpin(self, min_val=0.025, max_val=0.5,
                increment=1/40.0, value=self.pg.si)
        self.siFloatSpin.SetFormat("%f")
        self.siFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setSI, self.siFloatSpin)
        self.offlineControls += [self.siFloatSpin]
        siControlBox.Add(self.siFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        intervalSizer.Add(siControlBox, proportion=1,
                flag=wx.RIGHT | wx.BOTTOM | wx.LEFT | wx.EXPAND, border=10)

        isiControlBox = widgets.ControlBox(self, label='Inter-Stim Secs', orient=wx.VERTICAL)
        self.isiFloatSpin = agwfs.FloatSpin(self, min_val=0.05, max_val=1.0,
                increment=1/20.0, value=self.pg.isi)
        self.isiFloatSpin.SetFormat("%f")
        self.isiFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setISI, self.isiFloatSpin)
        self.offlineControls += [self.isiFloatSpin]
        isiControlBox.Add(self.isiFloatSpin, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)
        intervalSizer.Add(isiControlBox, proportion=1,
            flag=wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=10)

        self.sizer.Add(intervalSizer, proportion=0, flag=wx.EXPAND)
filt.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def initLayout(self):
        sizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        sizer.Add(self.selectorSizer, proportion=0, flag=wx.EXPAND)
        sizer.Add(self.configSizer, proportion=1, flag=wx.EXPAND)

        self.SetSizer(sizer)
        self.Layout()
pieern.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def initTrialSecs(self):
        secsSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        trialSecsControlBox = widgets.ControlBox(self, label='Trial Secs', orient=wx.VERTICAL)

        self.trialSecsFloatSpin = agwfs.FloatSpin(self, min_val=0.25, max_val=50.0,
                increment=1/4.0, value=self.pg.trialSecs)
        self.trialSecsFloatSpin.SetFormat("%f")
        self.trialSecsFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setTrialSecs, self.trialSecsFloatSpin)
        self.offlineControls += [self.trialSecsFloatSpin]
        trialSecsControlBox.Add(self.trialSecsFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        secsSizer.Add(trialSecsControlBox, proportion=1,
                flag=wx.LEFT | wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        itiSecsControlBox = widgets.ControlBox(self, label='Inter-Trial Secs', orient=wx.VERTICAL)
        self.itiFloatSpin = agwfs.FloatSpin(self, min_val=0.25, max_val=10.0,
                increment=1/4.0, value=self.pg.iti)
        self.itiFloatSpin.SetFormat("%f")
        self.itiFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setITI, self.itiFloatSpin)
        self.offlineControls += [self.itiFloatSpin]
        itiSecsControlBox.Add(self.itiFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        secsSizer.Add(itiSecsControlBox, proportion=1,
                flag=wx.BOTTOM | wx.RIGHT | wx.EXPAND, border=10)

        self.sizer.Add(secsSizer, proportion=0, flag=wx.EXPAND)
freesom.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def initTiming(self):
        timingSizer = wx.BoxSizer(orient=wx.HORIZONTAL)

        widthControlBox = widgets.ControlBox(self, label='Train Width', orient=wx.VERTICAL)
        self.widthFloatSpin = agwfs.FloatSpin(self, min_val=0.5, max_val=60.0,
            increment=0.25, value=self.pg.width)
        self.widthFloatSpin.SetFormat('%f')
        self.widthFloatSpin.SetDigits(3)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setWidth, self.widthFloatSpin)
        self.offlineControls += [self.widthFloatSpin]
        widthControlBox.Add(self.widthFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        timingSizer.Add(widthControlBox, proportion=1,
            flag=wx.ALL | wx.EXPAND, border=10)

        retrainDelayControlBox = widgets.ControlBox(self, label='Retrain Delay', orient=wx.VERTICAL)
        self.retrainDelayFloatSpin = agwfs.FloatSpin(self, min_val=2.0, max_val=60.0,
                increment=0.25, value=self.pg.retrainDelay)
        self.retrainDelayFloatSpin.SetFormat('%f')
        self.retrainDelayFloatSpin.SetDigits(4)
        self.Bind(agwfs.EVT_FLOATSPIN, self.setRetrainDelay, self.retrainDelayFloatSpin)
        self.offlineControls += [self.retrainDelayFloatSpin]
        retrainDelayControlBox.Add(self.retrainDelayFloatSpin, proportion=1,
                flag=wx.ALL | wx.EXPAND, border=10)
        timingSizer.Add(retrainDelayControlBox, proportion=1,
            flag=wx.BOTTOM | wx.RIGHT | wx.TOP | wx.EXPAND, border=10)

        self.sizer.Add(timingSizer, proportion=0, flag=wx.EXPAND)


问题


面经


文章

微信
公众号

扫码关注公众号