Skip to content

2. Data input and output in Python

Kaihua Chen edited this page Oct 2, 2022 · 14 revisions

Procedures to read fMRI data in Python

Example data are at:

  1. Perspective-taking fMRI: /space_lin2/fhlin/perspective

  2. Human connectome project: /space_lin1/hcp

0. Python environment

The path of our current available Anaconda folder is: /space_lin2/kaihua/anaconda3

Activating our python environment is simple. First, "source" the relevant profile, after which you can check if the "conda" command is available by checking its version, as shown below:

source /space_lin2/kaihua/.bashrc
conda --version

Later, you can choose which virtual environment you want to utilise. Currently, there are mainly two environments: (base) and (py36), and you can activate one of them by entering "conda activate" command, as shown below:

conda activate base conda activate py36

Different environments would contain different packages of different versions, which will meet the requirements of different tasks. You can check the details of these packages by entering:

conda list

1. Read in-house fMRI data

1.1 NII format

1.2 STC format

2. Read Human Connectome Project data

Clone this wiki locally