Giter Club home page Giter Club logo

psyc161's Introduction

Introduction to Programming for Psychologists & Neuroscientists

Course Objectives

Neuroimaging, computational neuroscience and other fields of brain research directions are becoming more and more data driven and employing sophisticated computational methods and paradigms, such as distributed and cloud computing. That is why it becomes critical for new researchers to develop at least basic skills in programming, software engineering, code and data management. This course intends to provide wide in scope and introductory in depth coverage of many important topics in programming, software engineering and some data structures and algorithms to streamline students current and future research projects. It will be practice and interaction oriented in its format: lectures will be interleaved within practice hands-on sessions. Although some topics and home exercises will involve using established data analysis frameworks, primary accent will be made on getting a good grasp of good coding and software developing practices: collaboration, testing, code review, etc. Thus, this course is intended to serve as a prerequisite to possible follow-up course(s) which would concentrate on in-depth learning of specific neuroimaging (and/or computational neuroscience) frameworks (from stimuli delivery to advanced analysis pipelines).

HOWTOs

Git

This is a git repository which contains only course materials. Homework assignment repositories were originally "linked" to this repository as git submodules but that was proven to be more distracting that useful.

Therefore, for the peace of our minds, I now recommend to clone/work with homework repositories outside of this repository. Just go to the parent directory and checkout those repositories one by one. Alternatively, there is now a script which you can run in a terminal and it will clone for you all present homework repositories, and would not touch existing ones:

 ./clone-homeworks

IPython notebooks

To interact with lecture notebooks run following commands in the terminal

cd classes
ipython notebook

Resources

Software

Neuroimaging could be considered a somewhat exemplar field of science since nearly all scientific software for fMRI and EEG/MEG data analysis was developed as a free and open source software (FOSS). Moreover, with recent developments of stimuli delivery toolboxes (e.g., psychtoolbox-3, PsychoPy, OpenSesame) it became possible to provide a complete free and open toolbelt for carrying out research in this domain. Therefore, in this course we will use/cover available FOSS tools (e.g., bash, git), programming languages (Python) and then overview computation environments (Matlab/Octave, R). To establish efficient hands-on sessions and code development in Python, we will use and recommend you to use in your research/coding practice:

  • IPython notebooks . Available for all platforms. Stock Debian/Ubuntu distributions: ipython-notebook package
  • PyCharm community edition. NeuroDebian (-devel) provides now pycharm-community-sloppy package

Python, IPython, Octave, R etc are available for any major operating system (Linux, OS X, MS Windows). But students are encouraged to use a turnkey platform for neuroscience -- NeuroDebian -- where all (but Matlab) aforementioned (and thousands of other) tools are conveniently available. In the class we will use a prepared NeuroDebian VirtualBox appliance which has already necessary software pre-installed. If you decide to use identical environment on your home laptop/desktop, just

  1. Install VirtualBox on your system

  2. Download appliance used in the class (1.5GB)

  3. Import appliance in the VirtualBox, Run it

  4. provide necessary customizations to your git-config

  5. (recommended) update list of available packages and upgrade them all. Open terminal and run

     sudo apt-get update
     sudo apt-get upgrade
    

    Default password is neurodebian.

  6. (recommended) install flake8 checked for Python:

     sudo apt-get install python-flake8
    

    in case you want to use the same code checker as Travis CI for you when you submit a pull request with your homework.

Data

We might possibly use some publicly available dataset as an example for hands-on sessions. For your project(s), you are welcome to use any publicly available dataset.

Format

This course is planned as a graduate level seminar course for the Spring 2015 semester -- Apr 2nd to June 2nd -- so we will have roughly 9 weeks. Each week we will have either one 3h (2:00-5:00pm) or two 1h:30m (3:30pm-5:00pm) classes, which would be a mix of small lectures and practice sessions. Practice sessions would include “pair programming” and “code review” sessions. Homeworks will be submitted via Git (further instructions TODO). Students will learn how to use Git/GitHub and will be encouraged to contribute to existing free and open-source projects.

Literature

The two main sources for lesson materials are:

Both books are available online (free and open), and you can fetch PDF directly using git-annex (git annex get books/).

In addition, we will make use of a number of other online resources, including documentation and user manuals for the various libraries and packages that you will be learning to use.

Master plan

This is a preliminary plan, which can (and probably will) change depending on our progress and students' preferences

  • Weeks 1-3: Get to know the tools (environments, VCS, QA) and Python language fundamentals (from variables to modules and classes)

  • Weeks 4-5: Fundamentals of the scientific Python core (NumPy, SciPy, matplotlib)

  • Week 6: Overview of the extended scientific core (pandas, statsmodels, seaborn, PyMVPA)

  • Week 7: Stimuli delivery with Python (PsychoPy)

  • Weeks 8-9: Tour into R and Matlab and their offerings

Schedule

Date Times Lecture Reading HW
T 4/02 2:00-5:00 Intro/Python Concepts (Variables,..,Functions,QA) THP(1-6), PSL(1.2.1-1.2.5), git bootcamp materials HW1
T 4/07 2:00-5:00 Rehearsal, Python Concepts (Conditionals, Loops, Lists) THP(5-8,10), PSL(1.2.1-1.2.5) HW2
T 4/14 3:30-5:00 Python Concepts (Tuples, Dicts) THP(11, 12) -
Th 4/16 3:30-5:00 Python Concepts (Classes, Modules) THP(15-18) TBA
T 4/21 3:30-5:00 TBA TBA -
Th 4/23 3:30-5:00 TBA TBA TBA
T 4/28 2:00-5:00 TBA TBA -
Th 4/30 3:30-5:00 TBA TBA TBA
T 5/05 2:00-5:00 TBA TBA -
Th 5/07 3:30-5:00 TBA TBA TBA
Th 5/14 3:30-5:00 TBA TBA PRJ
Th 5/21 3:30-5:00 TBA TBA PRJ
T 5/26 3:30-5:00 TBA TBA PRJ
Th 5/28 3:30-5:00 TBA TBA PRJ
T 6/02 3:30-5:00 TBA TBA PRJ

Student Evaluation

Students will be evaluated on the basis of:

  • Lesson exercises / class participation. Every week there will be a set of small exercises to be submitted for the first class in the upcoming week

  • Final project, given 3-4 final weeks to work on.

Final project

Students will choose a project of their liking

  • It must be a new development (i.e. not something you did before this course), although you can choose to improve upon your prior code

  • Ideally should be something you or someone would end up re-using later on

  • Contributions to existing scientific projects will be strongly encouraged (benefit from established QA, feedback, distribution channels, etc)

  • Possible projects will be suggested and discussed in the class on 4-5th week and possible domains would be

    • Data structures/algorithms implementation
    • Stimuli/experiment
    • Data Analysis
    • Establishing/improving quality assurance (tests, etc) of an existing scientific FOSS project
  • Team work is encouraged (but contribution ratio will be assessed)

Code of conduct

In non-official words: you must not re-use/cut-paste complete solutions found online. You are strongly encouraged to do your best to try figuring out the solution yourself. If you are stuck on some technical detail, it is perfectly fine to consult documentation, even "ask google", and/or email me for a hint/help. But if you are fully stuck ad researched/found a complete solution online and saw/read it (aren't you a fast reader of Python code by now) -- it is not the end of the world -- close that page and try recreating that solution yourself without looking up there again.

License/Attributions

Creative Commons Share-Alike License
This work and other related to the course materials under https://github.com/dartmouth-pbs are licensed under a Creative Commons Attribution Share-Alike 4.0 International License.

Some portions are materials borrowed from other sources distributed under compatible terms from

psyc161's People

Contributors

yarikoptic avatar mvdoc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.