コード例 #1
0
def crossExpContour(dm):

	"""
	desc:
		Plots a multipanel contour plot depicting the correlation between
		pupil size and fixation saliency for each experiment.

	arguments:
		dm:
			type:	DataMatrix
	"""

	assert(constants.exp == 'exp1')
	Plot.new(constants.bigPlot)
	plt.subplot(221)
	simpleContour(dm, title='Exp. 1')
	constants.exp = 'exp2'
	dm = helpers.getDataMatrix(cacheId='data.%s' % constants.exp)
	dm = helpers.filter(dm, cacheId='filter.%s' % constants.exp)
	plt.subplot(222)
	simpleContour(dm, title='Exp. 2')
	constants.exp = 'exp3'
	dm = helpers.getDataMatrix(cacheId='data.%s' % constants.exp)
	dm = helpers.filter(dm, cacheId='filter.%s' % constants.exp)
	plt.subplot(223)
	simpleContour(dm.select('cond == "single"'), title='Exp. 3 single')
	plt.subplot(224)
	simpleContour(dm.select('cond == "dual"'), title='Exp. 3 dual')
	Plot.save('correlationPlot', folder='crossExp', show=constants.show)
コード例 #2
0
def crossExpWindowPlot(dm):

	"""
	desc:
		Creates a window plot with the Exp. 1 and 2 as individual lines.

	arguments:
		dm:
			type:	DataMatrix
	"""

	assert(constants.exp == 'exp1')
	Plot.new(constants.widePlot)
	helpers.windowPlot(dm, standalone=False, color=constants.exp1Col,
		label='Exp. 1')
	constants.exp = 'exp2'
	dm = helpers.getDataMatrix(cacheId='data.%s' % constants.exp)
	dm = helpers.filter(dm, cacheId='filter.%s' % constants.exp)
	helpers.windowPlot(dm, standalone=False, color=constants.exp2Col,
		label='Exp. 2')
	plt.legend(frameon=False)
	Plot.save('windowPlot', folder='crossExp', show=constants.show)
コード例 #3
0
"""
This file is part of P0010.5.

P0010.5 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

P0010.5 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with P0010.5.  If not, see <http://www.gnu.o#!/bin/basjhrg/licenses/>.
"""

import sys
from exparser import Tools
from analysis import helpers, helpersExp1, helpersExp2, helpersExp3, \
	constants, helpersCrossExp
if constants.exp != None:
	dm = helpers.getDataMatrix(cacheId='data.%s' % constants.exp)
	dm = helpers.filter(dm, cacheId='filter.%s' % constants.exp)
	print('N = %d' % len(dm))
else:
	dm = None
Tools.analysisLoop(dm, mods=[helpers, helpersExp1, helpersExp2, helpersExp3,
	helpersCrossExp])