| Domain | Typical Use‑Cases | |--------|-------------------| | | Pre‑processing, statistical modelling, and visualisation of MRI, fMRI, and diffusion data. | | Computational Neuroscience | Large‑scale network simulations, dynamic causal modelling, and brain‑computer‑interface prototyping. | | Data‑Science & Machine Learning | Pipelines for feature extraction, classification, and clustering of high‑dimensional neuro‑datasets. | | Education & Training | Interactive notebooks, tutorials, and teaching modules for graduate‑level courses in brain science. |
# ------------------------------------------------- # 2. Preprocess functional runs # ------------------------------------------------- preproc = tpre.Pipeline() preproc.add_step('realign', reference='mean') preproc.add_step('slice_time_correction', method='interleaved') preproc.add_step('denoise', method='ica_aroma') func_clean = preproc.apply(dataset.func)
The name Lausanne reflects both the geographic origin and the project’s commitment to the . 3. Core Architecture 3.1. Modules | Module | Description | Key Dependencies | |--------|-------------|-------------------| | twk.io | Unified I/O handling (BIDS, NIfTI, DICOM, HDF5). | nibabel, pydicom | | twk.preproc | Pre‑processing pipelines (realignment, slice‑timing, denoising). | Nilearn, scikit‑image | | twk.stats | Classical (GLM) and Bayesian statistical tools. | statsmodels, pymc3 | | twk.ml | Machine‑learning wrappers (feature selection, model evaluation). | scikit‑learn, torch, tensorflow | | twk.vis | Interactive visualisation (3‑D brain surfaces, connectomes). | plotly, pyvista | | twk.sim | Neural‑network simulation (spiking, rate‑based). | Brian2, NEST | | twk.dashboard | Web‑based GUI built on Dash for workflow orchestration. | dash, flask | twk lausanne download
dti = DTI(gpu=True) dti.fit(dataset.dwi, bvals=dataset.bval, bvecs=dataset.bvec) fa_map = dti.fa() tvis.plot_volume(fa_map, cmap='viridis') TWK Lausanne ships a Ray‑based distributed executor . Example for scaling across a Kubernetes cluster:
# Activate the environment conda activate twk-lausanne | | Education & Training | Interactive notebooks,
python -m pip install "twk-lausanne[cuda]" Pre‑built images are published on Docker Hub:
# ------------------------------------------------- # 3. Fit a GLM (event‑related design) # ------------------------------------------------- design = tio.load_events(bids_root, task='nback') glm = tstat.GLM() glm.fit(func_clean, design) flask | dti = DTI(gpu=True) dti.fit(dataset.dwi
singularity pull docker://epfl/twk-lausanne:2.0 singularity exec twk-lausanne_2.0.sif twk-dashboard These containers embed all optional dependencies (CUDA, neuroimaging libraries, JupyterLab) and are . 4.4. Source Code (Git) If you prefer to develop on the bleeding edge:
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.