How to download data from the server?#

This notebook shows how you can download data from the server frank, assuming you can do ssh frank.

Data will be stored in data_dir and will be downloaded only if it does not exist there yet.

[1]:
from polpo.preprocessing.ssh import ScpDataLoader
[2]:
SESSION_ID = 1

folder_name = f"ses-{str(SESSION_ID).zfill(2)}"

loader = ScpDataLoader.from_host_name(
    data_dir="~/.herbrain/data/pregnancy/mri",
    host_name="frank",
    remote_path=f"/home/data/pregnancy/folder1/{folder_name}",
    recursive=True,
)

loader.load()
[2]:
'/home/luisfpereira/.herbrain/data/pregnancy/mri/ses-01'

Loading data is usually the starting point of a pipeline. See e.g. How to visualize MRI data? and How to get a mesh from an MRI image?.

Further reading#