Skip to content

Mixed use of pycortex_subject and cx_subject to refer to the same thing in freesurfer import functions #725

Description

@libertyh

In https://github.com/gallantlab/pycortex/blob/main/cortex/freesurfer.py , the import_subj function currently uses pycortex_subject if you want to rename the subject ID from the original freesurfer subject directory. However, in other subsequent functions, cx_subject is used for the same thing. For example, we have:

def import_subj(
    freesurfer_subject: str,
    pycortex_subject: Optional[str]=None,
    freesurfer_subject_dir: Optional[str]=None,
    whitematter_surf: str="smoothwm",
) -> None:
def import_flat(fs_subject: str, patch: str, hemis: list[Literal['lh', 'rh']]=['lh', 'rh'], cx_subject: Optional[str]=None,
                flat_type: Literal['freesurfer', 'slim', 'blender']='freesurfer', auto_overwrite: bool=False,
                freesurfer_subject_dir: Optional[str]=None, clean: bool=True) -> None:
def get_label(cx_subject: str, ...
def _parse_labels(label_files: Union[str, list[str]], cx_subject: str) -> tuple[npt.NDArray, npt.NDArray]:
def get_label(cx_subject: str, label: str, fs_subject: Optional[str]=None, fs_dir: Optional[str]=None, src_subject: str='fsaverage', hemisphere: Sequence[Literal['lh', 'rh']]=('lh', 'rh'), **kwargs) -> tuple[npt.NDArray[np.integer], npt.NDArray]:

Similarly, looks like freesurfer_subject is sometimes called fs_subject. Would be nice to harmonize all these but I don't know how widespread this is.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions