[Pybrainsim-activity] SF.net SVN: pybrainsim:[88] trunk/src/Experiment.py
Status: Planning
Brought to you by:
rgoj
From: <rg...@us...> - 2009-08-05 13:03:19
|
Revision: 88 http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=88&view=rev Author: rgoj Date: 2009-08-05 13:03:11 +0000 (Wed, 05 Aug 2009) Log Message: ----------- * Calculating epoch time points * Added a commented out line that allows plotting of an ERP signal instead of the continous signal Modified Paths: -------------- trunk/src/Experiment.py Modified: trunk/src/Experiment.py =================================================================== --- trunk/src/Experiment.py 2009-08-05 13:01:36 UTC (rev 87) +++ trunk/src/Experiment.py 2009-08-05 13:03:11 UTC (rev 88) @@ -35,7 +35,10 @@ self.baseline = baseline self.epochDuration = epochDuration - self.timePoints = list(arange( 1.0/self.samplingFrequency, self.duration + 1.0/self.samplingFrequency, 1.0/self.samplingFrequency )) + timeStep = 1.0/self.samplingFrequency + self.timePoints = list(arange( timeStep, self.duration + timeStep, timeStep )) + epochStartTime = - timeStep * (self.baseline // timeStep) + self.epochTimePoints = list(arange( epochStartTime, self.epochDuration + epochStartTime, timeStep)) def setSamplingFrequency(self, samplingFrequency): self.samplingFrequency = samplingFrequency @@ -76,7 +79,6 @@ def getRecordingSlice(self, sliceStart, sliceDuration, sliceChannel=0): startIndex = self.findNearestTimeIndex(sliceStart) endIndex = self.findNearestTimeIndex(sliceStart + sliceDuration) - #print str(startIndex) + " " + str(endIndex) return self.recording[sliceChannel][startIndex:endIndex] def getERP(self, stimulusNumber=0): @@ -94,6 +96,7 @@ def plotRecording(self): plot(self.timePoints, self.recording[0], linewidth=1.0) + #plot(self.epochTimePoints, self.getERP(), linewidth=1.0) xlabel('Time (s)') ylabel('Amplitude') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |