def save_retinotopy_cache(sdir, sid, hemi, props, alignment='<STR_LIT>', overwrite=False):
h = hemi[:<NUM_LIT:2>]<EOL>htype = hemi.split('<STR_LIT:_>')[<NUM_LIT:1>]<EOL>if _auto_download_options is Noneor '<STR_LIT>' not in _auto_download_optionsor not _auto_download_options['<STR_LIT>']:<EOL><INDENT>return<EOL><DEDENT>files = {k:os.path.join(sdir, '<STR_LIT>', v % (h, alignment))<EOL>for (k,v) in six.iteritems(_retinotopy_cache_tr[htype])}<EOL>for (p,fl) in six.iteritems(files):<EOL><INDENT>if p not in props or (not overwrite and os.path.exists(fl)): continue<EOL>p = np.asarray(props[p])<EOL>if np.issubdtype(p.dtype, np.floating): p = np.asarray(p, np.float32)<EOL>dr = os.path.split(os.path.abspath(fl))[<NUM_LIT:0>]<EOL>if not os.path.isdir(dr): os.makedirs(os.path.abspath(dr), <NUM_LIT>)<EOL>nyio.save(fl, p)<EOL><DEDENT>
Saves the subject's retinotopy cache from the given properties. The first argument is the
subject's directory (not the subjects' directory).