Skip to content
Alexander Holmes edited this page Jul 5, 2023 · 10 revisions

Introduction to Using Python

Start with a simple self-paced course (intro to variables and if statements) ~1 hour. This will give you a very brief introduction to Python and programming.

Alternatively, try this intro to Python for data science course ~4 hours This covers a bit more, including functions, and an intro to stats in python.

Introduction to plotting and data visualisation in Python via Matplotlib Most other plotting tools (including ones listed below) are built upon Matplotlib, so these are important fundamentals

Or this more comprehensive course on Python for neuroscience This course does not include videos It covers basics from variables and loops, to data manipulation and statistics. It might be good to check it out to fill in the gaps in your knowledge

Applications in Neuroimaging

Lesson One: Introduction to MRI in Python

Start here: Introduction to MRI in Python ~1 hour Specifically, you should complete: Section 3: Anatomy of a NIfTI Section 5: Exploring open MRI datasets The other sections can provide a general overview of basic programming and neuroimaging principles, but these two sections provide the best and most direct introduction to basic neuroimaging in Python.

Lesson Two: Modality Specific Tutorials

Next, complete these more detailed lessons as needed depending on what modality you’re working with: sMRI analysis in Python fMRI analysis in Python dMRI analysis in Python

You do not need to complete all of these lessons, only the ones that you'll need to based on your project's requirements. If you don't know what you'll be using in your project, ask your supervisor and they'll be happy to help.

Lesson Three: Plotting and graphs

Familiarise yourself with some general purpose plotting tools in python via nilearn.plotting, including plotting of: Volumetric data Surface data FC matrices fMRI carpet plots

Like the previous lesson, you likely won't need to complete all of these tutorials; only the ones you'll actually use in your specific project.

Optional Lessons

These are some additional lessons that showcase what can be achieved in Python for neuroimaging. If your work needs these speciality tools, this might be helpful. Otherwise, these might be fairly niche.

MRI preprocessing pipelines in Python

  • Warning: more complex than previous resources

Gradient analyses in Python

Machine Learning in Python

  • Semi-introductory course to Python with an emphasis on ML.

Clone this wiki locally