Introduction

Welcome to the course!

This is Psychology 9040: Scientific Computing, for Jan-Apr 2023.

We meet in WIRB 1110: - Mondays 11:30 am - 1:00 pm and - Tuesdays 12:00 pm - 1:30 pm

đź’» Bring your computer to class! We will be writing code. đź’»

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 provides a rich ecosystem for scientific computing. Python is free, open-source, and is available for many platforms inclduding MacOS, Windows, and GNU/Linux.

The course is designed to achieve three primary goals:

  1. You will learn to write code in a high-level language
  2. You will learn to think computationally and algorithmically about data analysis
  3. 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 be learning to write code to solve little toy problems. This will start to teach you how to think algorithmically about writing code. 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.

Fundamentals

  • digital representation of data
  • basic data types, operators, & expressions
  • control flow & conditionals
  • functions
  • complex data types
  • file input & output
  • graphical displays of data

In the second part of the course we will learn about concepts involved in signal acquisition (sampling) and signal processing, which are very common features of research in just about any scientific discipline, especially neuroscience. We will then learn (or re-learn, depending upon your background), about the logic of inferential statistics, we will learn how to implement some common statistical tests using Python, and we will (re)learn some fundamental principles of how to fit models to data—again, a very common approach in just about any scientific discipline.

Topics in Data Analysis

  • sampling, signal processing, & filtering data
  • logic of frequentist statistics
  • a few common statistical tests
  • fitting models to data

By building upon the foundational knowledge and skills you have acquired in this course, you will be able to learn more complex techniques in programming and in data analysis as your scientific research progresses.