gallantlab / pycortex

Pycortex is a python-based toolkit for surface visualization of fMRI data
https://gallantlab.github.io/pycortex
BSD 2-Clause "Simplified" License
581 stars 137 forks source link

Fail to get a mapper #468

Closed mingxue1204 closed 1 year ago

mingxue1204 commented 1 year ago

Recently came across pycortex and decided to give it a try. But when I try to get a mapper for a subject( following the 'Map from Volume to Vertex Data'), I encounter the following error:

_**/home/mingxue/.conda/envs/cvae/bin/python /run/user/1003/gvfs/smb-share:server=172.22.124.104,share=mingxue/Project/Semantic_common_space/code/make_mapper.py Traceback (most recent call last): File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/mapper/init.py", line 38, in get_mapper raise Exception Exception

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/database.py", line 524, in get_surf fnm = str(os.path.splitext(files[type][hemi])[0]) KeyError: 'pia'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/run/user/1003/gvfs/smb-share:server=172.22.124.104,share=mingxue/Project/Semantic_common_space/code/make_mapper.py", line 15, in mapper = cortex.get_mapper(subject, xfm, 'line_nearest', recache=True) File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/utils.py", line 33, in call return self._load()(args, kwargs) File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/mapper/init.py", line 40, in get_mapper return Map._cache(cachefile, subject, xfmname, kwargs) File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/mapper/line.py", line 13, in _cache pia = db.get_surf(subject, "pia", merge=False, nudge=False) File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/database.py", line 30, in memofn self._memocache[h] = fn(self, args, *kwargs) File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/database.py", line 499, in get_surf left, right = [ self.get_surf(subject, type, hemisphere=h) for h in ["lh", "rh"]] File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/database.py", line 499, in left, right = [ self.get_surf(subject, type, hemisphere=h) for h in ["lh", "rh"]] File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/database.py", line 30, in memofn self._memocache[h] = fn(self, args, **kwargs) File "/home/mingxue/.local/lib/python3.8/site-packages/cortex/database.py", line 527, in get_surf raise IOError OSError

Process finished with exit code 1**_

before this, I 've used the segmentation and align module in the following way to get the segmentation and transform file:

segmen t . i n i t s u b j e c t ( " S1 " , " T 1 a n a t omi c al . n i i . gz " ) a l i g n . a u t om a t i c ( " S1 " , " t e s t a l i g n m e n t " , " r e f e r e n c e e p i . n i i . gz " )

I can't figure out which part was wrong. Can any one help me with this? Any suggestions would be welcome.