Introduction to the Course
Welcome! I’m glad you’re here.
This is Psychology 9040: Scientific Computing, for FW24, Jan-Apr 2025.
Bring your computer to class! We will be writing code.
Course website: https://www.gribblelab.org/9040
Course Goals
In this one-semester graduate course you will learn skills in scientific computing—tools and techniques that you can use in your own research. You will learn to program using Python, which is a high-level programming language with many libraries that provide a rich ecosystem for scientific computing. If you want to use a different language in the course you are welcome to but I will focus on Python in class. Having said that, as much as I can I will teach concepts in a way that are language-agnostic.
The course is designed to achieve three primary goals:
- You will learn to write code in a high-level language (Python)
- You will learn to think computationally and algorithmically about data analysis
- You will learn some common data analysis techniques, which will give you a foundation from which to learn more complex scientific computing skills to suit your own research goals
Topics
In the first part of the course you will learn how to write code. The topics we will cover are common to any high-level language including Python, MATLAB, R, Javascript, C, Julia, Go, Swift, etc. All high level languages have things like numbers, strings, arrays, loops, if-statements. Languages differ in their syntax, in the names of common functions, and sometimes in some other subtle ways (e.g. passing by reference vs passing by value) but otherwise, all high-level languages basically work in the same way. Learning these fundamental concepts of high-level programming languages using one language will enable you to learn other languages as well in the future.
The other aspect of programming that you will learn is how to think algorithmically about solving problems and completing tasks with computers. In general there are two reasons to use a computer to perform a given task, (1) because the task would take too long by hand (e.g. churning through processing a huge amount of data), and (2) because the computer can do something clever that you cannot do yourself (e.g. applying complex algorithms to a dataset).
In learning the fundamentals of high-level programming languages (data types, loops, conditionals, etc) we will sometimes practice writing code to solve little toy problems. This will start to teach you how to think algorithmically. Think about it like learning to play a musical instrument. You don’t start by learining to play Beethoven. You start learning basic skills by playing scales, arpeggios, different key signatures, etc. Building up basic skills using toy problems is a convenient path towards using coding skills to solve real-world programming problems in the context of your own thesis research.
We will also practice and learn by using code to answer questions about data. Some of the data will be from real experiments and some will be fictitious. The goal will be to answer a series of questions by writing code that performs operations on the data (reorganization, summarising, counting, calculating, processing, plotting, etc) and writing a short summary of your findings. This mimics how you will be using your coding skills in your own research going forward.
Fundamentals of Coding
- digital representation of data
- basic data types, operators, & expressions
- control flow & conditionals
- functions
- complex data types
- file input & output
- graphical displays of data
- object oriented programming (OOP)
Reproducibility & Replicability
- Python venvs (virtual environments)
- Code versioning using Git & GitHub
- organization of code and data
- data analysis workflow
Topics in Data Analysis
- sampling, signal processing, & filtering data
- statistical tests (parametric vs resampling/boostrapping/randomization)
- fitting models to data
By building upon the foundational knowledge and skills you have acquired in this course, you will be able to learn other techniques in programming and in data analysis as your scientific research progresses.