def saveCap(self):
cap = self.src.getEEGSecs(self.getSessionTime(), filter=False)
saveDialog = wx.FileDialog(self, message='Save EEG data.',
wildcard='Pickle (*.pkl)|*.pkl|All Files|*',
style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
try:
if saveDialog.ShowModal() == wx.ID_CANCEL:
return
cap.saveFile(saveDialog.GetPath())
except Exception:
wx.LogError('Save failed!')
raise
finally:
saveDialog.Destroy()
##def decimate(self, cap):
## #cap = cap.demean().bandpass(0.5, 10.0, order=3)
## cap = cap.copy().demean().bandpass(0.5, 12.0, order=3)
## # kind of a hack XXX - idfah
## if cap.getSampRate() > 32.0:
## decimationFactor = int(np.round(cap.getSampRate()/32.0))
## cap = cap.downsample(decimationFactor)
## return cap
评论列表
文章目录