@pimms.value<EOL><INDENT>def v123_table(cache_directory, subjects):<DEDENT>
<EOL>cachefl = os.path.join(cache_directory, '<STR_LIT>')<EOL>if os.path.isfile(cachefl):<EOL><INDENT>try: return pimms.load(cachefl)<EOL>except Exception:<EOL><INDENT>msg = '<STR_LIT>' % cache_file<EOL>warnings.warn(msg)<EOL><DEDENT><DEDENT>data = AutoDict()<EOL>data.on_miss = lambda:[] <EOL>props = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:label>']<EOL>for (sid,sub) in six.iteritems(subjects):<EOL><INDENT>for hname in ['<STR_LIT>','<STR_LIT>']:<EOL><INDENT>hemi = sub.hemis[hname]<EOL>for (dskey,dsdata) in six.iteritems(BensonWinawer2018Dataset.prf_meta_data):<EOL><INDENT>dsid = <NUM_LIT> if dskey == '<STR_LIT>' else int(dskey[<NUM_LIT:3>:])<EOL>ang = hemi.prop(dskey + '<STR_LIT>')<EOL>ecc = hemi.prop(dskey + '<STR_LIT>')<EOL>iang = hemi.prop('<STR_LIT>' + dskey + '<STR_LIT>')<EOL>iecc = hemi.prop('<STR_LIT>' + dskey + '<STR_LIT>')<EOL>ilbl = hemi.prop('<STR_LIT>' + dskey + '<STR_LIT>')<EOL>(x, y)  = as_retinotopy({'<STR_LIT>':ang,  '<STR_LIT>':ecc},<EOL>'<STR_LIT>')<EOL>(ix,iy) = as_retinotopy({'<STR_LIT>':iang, '<STR_LIT>':iecc},<EOL>'<STR_LIT>')<EOL>ii = np.where((iecc < <NUM_LIT:12>) & np.sum([ilbl == k for k in (<NUM_LIT:1>,<NUM_LIT:2>,<NUM_LIT:3>)], axis=<NUM_LIT:0>))[<NUM_LIT:0>]<EOL>for p in props: data[p].append(hemi.prop(p)[ii])<EOL>for p0 in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>p = dskey + '<STR_LIT:_>' + p0<EOL>data[p0].append(hemi.prop(p)[ii])<EOL><DEDENT>for (p,u) in zip(['<STR_LIT:x>', '<STR_LIT:y>'], [x,y]):<EOL><INDENT>data[p].append(u)<EOL><DEDENT>for p0 in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>p = '<STR_LIT>' + dskey + p0<EOL>data['<STR_LIT>' + p0].append(hemi.prop(p)[ii])<EOL><DEDENT>for (p0,u) in zip(['<STR_LIT>', '<STR_LIT>'], [ix,iy]):<EOL><INDENT>data[p0].append(u)<EOL><DEDENT>extras = {'<STR_LIT>':sid, '<STR_LIT>':hname, '<STR_LIT>':dsid, '<STR_LIT>':dskey}<EOL>for (p,v) in six.iteritems(extras): data[p].append(np.full(len(ii), v))<EOL><DEDENT><DEDENT><DEDENT>data = pimms.itable({k:np.concatenate(v) for (k,v) in six.iteritems(data)})<EOL>if not os.path.isfile(cachefl):<EOL><INDENT>try: pimms.save(cachefl, data)<EOL>except Exception: pass<EOL><DEDENT>return data<EOL>
dataset.v123_table is a pimms ITable object for the BensonWinawer2018Dataset; the table
contains all relevant pRF data for all cortical surface vertices in the 8 subjects included
in the paper Benson and Winawer (2018).