Commit 5313ee9e authored by Ruben van Bergen's avatar Ruben van Bergen

Translated barebones version of task to PsychoJS-compatible format

parent c33cb82a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -478,6 +478,59 @@
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 17,
"source": [
"from psychopy import visual\r\n",
"win = visual.Window([1024,768], allowGUI=False, units='height', fullscr=True)\r\n",
"\r\n",
"stim_size = 0.25\r\n",
"crop_frac = 0.2\r\n",
"digit_stims = list()\r\n",
"crop_stims = list()\r\n",
"font='Arial'\r\n",
"\r\n",
"for d in range(10): \r\n",
" image_path = 'digit_ims/font_' + font + '-size_512x512-digit_' + str(d) +'.png'\r\n",
" # digit_stims.append(visual.ImageStim(win=win, image=image_path, size=stim_size, interpolate=True))\r\n",
" digit_stims.append(visual.ImageStim(win=win, image=image_path, size=stim_size, interpolate=True))\r\n",
" \r\n",
" crop_path = image_path.replace('.png', '') + '_crops/' \r\n",
" for crop_file in os.listdir(crop_path):\r\n",
" if '.png' in crop_file:\r\n",
" crop_stims.append(visual.ImageStim(win=win, image=crop_path + crop_file, size=stim_size*crop_frac, interpolate=True)) \r\n",
"\r\n",
"\r\n"
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"print(digit_st)"
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 16,
"source": [
"win.close()"
],
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"107.0625 \tWARNING \tMonitor specification not found. Creating a temporary one...\n",
"107.0634 \tWARNING \tUser requested fullscreen with size [1024 768], but screen is actually [1366, 768]. Using actual size\n"
]
}
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 3,
......@@ -512,17 +565,17 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"source": [
"win.close()"
"tmp = os.listdir('digit_ims')\r\n",
"print(tmp[1].replace('.png', ''))\r\n"
],
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2.3259 \tWARNING \tMonitor specification not found. Creating a temporary one...\n",
"2.3290 \tWARNING \tUser requested fullscreen with size [1024 768], but screen is actually [1366, 768]. Using actual size\n"
"font_Arial-size_512x512-digit_1\n"
]
}
],
......
participant,session,date,expName,psychopyVersion,frameRate,
4.3231 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['sounddevice', 'PTB', 'pyo', 'pygame'] (in that order).
13.6553 WARNING User requested fullscreen with size [1024 768], but screen is actually [1366, 768]. Using actual size
15.8719 EXP Created window1 = Window(allowGUI=False, allowStencil=False, autoLog=True, backendConf=UNKNOWN, bitsMode=UNKNOWN, blendMode='avg', bpc=(8, 8, 8), color=array([0, 0, 0]), colorSpace='rgb', depthBits=8, fullscr=<method-wrapper '__getattribute__' of attributeSetter object at 0x0000025DF7FA0B70>, gamma=None, gammaErrorPolicy='raise', lms=UNKNOWN, monitor=<psychopy.monitors.calibTools.Monitor object at 0x0000025DF7EF0E10>, multiSample=False, name='window1', numSamples=2, pos=[0.0, 0.0], screen=0, size=array([1366, 768]), stencilBits=0, stereo=False, units='height', useFBO=True, useRetina=False, viewOri=0.0, viewPos=None, viewScale=None, waitBlanking=True, winType='pyglet')
15.8726 EXP window1: mouseVisible = True
15.8727 EXP window1: recordFrameIntervals = False
16.0333 EXP window1: recordFrameIntervals = True
16.2197 EXP window1: recordFrameIntervals = False
17.2242 EXP Created unnamed TextStim = TextStim(__class__=<class 'psychopy.visual.text.TextStim'>, alignHoriz=method-wrapper(...), alignText='center', alignVert=method-wrapper(...), anchorHoriz='center', anchorVert='center', antialias=True, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, flipHoriz=False, flipVert=False, font='', fontFiles=[], height=0.05, italic=False, languageStyle='LTR', name='unnamed TextStim', opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text='Generating stimuli, please wait...', units='height', win=Window(...), wrapWidth=1)
17.2580 EXP Created unnamed ImageStim = ImageStim(__class__=<class 'psychopy.visual.image.ImageStim'>, autoLog=True, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, flipHoriz=False, flipVert=False, image='digit_ims/font_Arial-size_512x512-digit_0.png', interpolate=True, mask=None, maskParams=None, name='unnamed ImageStim', opacity=1, ori=0.0, pos=array([0., 0.]), size=array([0.42708333, 0.65494792]), texRes=128, units='height', win=Window(...))
17.2826 EXP window1: mouseVisible = True
1.9072 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['sounddevice', 'PTB', 'pyo', 'pygame'] (in that order).
10.5023 WARNING User requested fullscreen with size [1024 768], but screen is actually [1366, 768]. Using actual size
11.9792 EXP Created window1 = Window(allowGUI=False, allowStencil=False, autoLog=True, backendConf=UNKNOWN, bitsMode=UNKNOWN, blendMode='avg', bpc=(8, 8, 8), color=array([0, 0, 0]), colorSpace='rgb', depthBits=8, fullscr=<method-wrapper '__getattribute__' of attributeSetter object at 0x000001F798460C50>, gamma=None, gammaErrorPolicy='raise', lms=UNKNOWN, monitor=<psychopy.monitors.calibTools.Monitor object at 0x000001F7983B0E80>, multiSample=False, name='window1', numSamples=2, pos=[0.0, 0.0], screen=0, size=array([1366, 768]), stencilBits=0, stereo=False, units='height', useFBO=True, useRetina=False, viewOri=0.0, viewPos=None, viewScale=None, waitBlanking=True, winType='pyglet')
11.9794 EXP window1: mouseVisible = True
11.9795 EXP window1: recordFrameIntervals = False
12.1450 EXP window1: recordFrameIntervals = True
12.4457 EXP window1: recordFrameIntervals = False
12.8774 EXP Created unnamed TextStim = TextStim(__class__=<class 'psychopy.visual.text.TextStim'>, alignHoriz=method-wrapper(...), alignText='center', alignVert=method-wrapper(...), anchorHoriz='center', anchorVert='center', antialias=True, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, flipHoriz=False, flipVert=False, font='', fontFiles=[], height=0.05, italic=False, languageStyle='LTR', name='unnamed TextStim', opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text='Generating stimuli, please wait...', units='height', win=Window(...), wrapWidth=1)
12.9043 EXP Created unnamed ImageStim = ImageStim(__class__=<class 'psychopy.visual.image.ImageStim'>, autoLog=True, color=array([1., 1., 1.]), colorSpace='rgb', contrast=1.0, depth=0, flipHoriz=False, flipVert=False, image='digit_ims/font_Arial-size_512x512-digit_0.png', interpolate=True, mask=None, maskParams=None, name='unnamed ImageStim', opacity=1, ori=0.0, pos=array([0., 0.]), size=array([0.42708333, 0.65494792]), texRes=128, units='height', win=Window(...))
12.9286 EXP window1: mouseVisible = True
participant,session,date,expName,psychopyVersion,frameRate,
participant,session,date,expName,psychopyVersion,frameRate,
This source diff could not be displayed because it is too large. You can view the blob instead.
participant,session,date,expName,psychopyVersion,frameRate,
trials.thisRepN,trials.thisTrialN,trials.thisN,trials.thisIndex,participant,session,date,expName,psychopyVersion,frameRate,
This source diff could not be displayed because it is too large. You can view the blob instead.
trials.thisRepN,trials.thisTrialN,trials.thisN,trials.thisIndex,participant,session,date,expName,psychopyVersion,frameRate,
This source diff could not be displayed because it is too large. You can view the blob instead.
trials.thisRepN,trials.thisTrialN,trials.thisN,trials.thisIndex,participant,session,date,expName,psychopyVersion,frameRate,
0,0,0,0,asdf,001,2021_Aug_03_1442,doodle,2021.2.0,59.19415445927801,
1,0,1,0,asdf,001,2021_Aug_03_1442,doodle,2021.2.0,59.19415445927801,
This diff is collapsed.
trials.thisRepN,trials.thisTrialN,trials.thisN,trials.thisIndex,participant,session,date,expName,psychopyVersion,frameRate,
This source diff could not be displayed because it is too large. You can view the blob instead.
trials.thisRepN,trials.thisTrialN,trials.thisN,trials.thisIndex,participant,session,date,expName,psychopyVersion,frameRate,
0,0,0,0,asdf,001,2021_Aug_03_1446,doodle,2021.2.0,60.00808909087749,
1,0,1,0,asdf,001,2021_Aug_03_1446,doodle,2021.2.0,60.00808909087749,
2,0,2,0,asdf,001,2021_Aug_03_1446,doodle,2021.2.0,60.00808909087749,
3,0,3,0,asdf,001,2021_Aug_03_1446,doodle,2021.2.0,60.00808909087749,
4,0,4,0,asdf,001,2021_Aug_03_1446,doodle,2021.2.0,60.00808909087749,
This diff is collapsed.
trials.thisRepN,trials.thisTrialN,trials.thisN,trials.thisIndex,participant,session,date,expName,psychopyVersion,frameRate,
This source diff could not be displayed because it is too large. You can view the blob instead.