====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
analysis:rhythms [2016/03/29 17:58] mvdm [Contents] |
analysis:rhythms [2018/04/17 15:20] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ | ||
- | Welcome! This is the home page for the optional hands-on (heads-on) 2016 edition of the "Rhythmic Brain" course. | + | Welcome! This is the home page for the optional hands-on (heads-on) 2017 edition of the "Rhythmic Brain" course. |
==== Contents ==== | ==== Contents ==== | ||
- | === Installing MATLAB === | + | * [[analysis:rhythms:step1|Module 1: Setting up, loading and plotting Emotiv data]] |
- | + | * [[analysis:rhythms:step3|Module 2: Signal processing, basics of sampling (aliasing, Nyquist)]] | |
- | Make sure you are on a Dartmouth network, such as Dartmouth Secure. Not KAF, Starbucks or eduroam. Then go [[https://caligari.dartmouth.edu/downloads/matlab/ | here]], click "Site License Downloads" and keep clicking the link at the bottom of the page until you get to the page for "R2014a": this is the version you want. Follow the instructions in the PDF. | + | * [[analysis:rhythms:step2|Module 3: Signal processing, Fourier analysis and power spectra]] |
- | + | ||
- | When the installation is done, see if you can run MATLAB. You should be faced with a screen containing a bunch of windows, including one called "Command Prompt" containing ''>>''. | + | |
- | + | ||
- | If your MATLAB runs, great! Now decide if you'd rather: | + | |
- | - Familiarize yourself with MATLAB first. Go [[http://ctnsrv.uwaterloo.ca/vandermeerlab/doku.php?id=analysis:rhythms#getting_started_with_matlab | here]]. | + | |
- | - Dive right in, working with Emotiv data. Read on. | + | |
- | + | ||
- | === Obtaining some sample Emotiv data === | + | |
- | + | ||
- | Click [[https://drive.google.com/file/d/0BzgbmK-cayRETEs2LVlwU0tHQzg/view?usp=sharing | here]]. Move this file to a location that shows you are careful with how you handle data. Something like ''\Documents\PSYC50\Data\TestData'' is a good choice, because it is clearly named and anticipates that you may have other data in the future beyond the file you grabbed just now. Something like ''\Downloads'' or ''\Desktop'' is bad because it'll get mixed in with lots of other files and maybe get deleted accidentally. | + | |
- | + | ||
- | Notice that this file has the extension ''.edf''. File extensions typically tell you about what **type** of file you are dealing with. In this case, our filetype is "EDF" (meaning it contains data arranged according the rules laid out in the [[http://www.edfplus.info/ | European Data Format specification]], which you can be happily ignorant about). All this means for you is that you need a file loader that can accept files of the EDF format, such as the one introduced in the next section. | + | |
- | + | ||
- | === Obtaining the code you need to load the Emotiv data === | + | |
- | + | ||
- | Pick one: the quick way, or the future-proof way. | + | |
- | + | ||
- | The quick way: download the MATLAB loader (from [[https://raw.githubusercontent.com/mvdm/PSYC50Rhythms/master/emotiv-loading/edfread.m | here]]), and place it in a sensible location like ''\Documents\PSYC50\Code\Loading''. This will work for now. However, if you ever want to access an updated version of this file, or other code that I put up for use in the course, you'll have to do more downloading. The future-proof way, below, addresses this. | + | |
- | + | ||
- | The future-proof way: I have added the code you'll need for loading EDF data, as well as for doing some other things, on a "GitHub repository". ''Git'' is a system for "distributed version control": put simply, a way to collaborate on a set of files that makes it easy to share and receive updates to those files. ''GitHub'' is a website that hosts those files in a convenient place so that the ''Git'' software can do its job. | + | |
- | + | ||
- | Let's make sure you have Git on your computer. If you are a Mac user, you should already have git installed. Open up a Terminal, and type ''git'' to verify that your computer recognizes it. If you are on Windows, I recommend you download the [[https://desktop.github.com/ | GitHub desktop]]. Then, open a "Git shell" (you should have an icon and start menu item) and type ''git'' to check this command is recognized. | + | |
- | + | ||
- | In your terminal/shell, navigate to a good place to put your %%GitHub%% code. | + | |
- | + | ||
- | === First steps: loading, plotting === | + | |
+ | (more advanced modules follow below) | ||
=== Getting started with MATLAB === | === Getting started with MATLAB === | ||
Line 40: | Line 15: | ||
Depending on your background and programming experience you might find the following resources helpful: | Depending on your background and programming experience you might find the following resources helpful: | ||
- | * Textbook: {{:analysis:wallisch_matlabforneuro.pdf|Wallisch, MATLAB for Neuroscientists}} | + | * Textbook chapter: {{:analysis:wallisch_ch2.pdf|Wallisch, "MATLAB for Neuroscientists"}} |
* [[http://www.mathworks.com/help/matlab/getting-started-with-matlab.html?s_cid=learn_doc|"Getting Started with MATLAB" Primer]]. | * [[http://www.mathworks.com/help/matlab/getting-started-with-matlab.html?s_cid=learn_doc|"Getting Started with MATLAB" Primer]]. | ||
* [[http://www.mathworks.com/matlabcentral/about/cody/ | Cody]], a continually expanding set of problems with solutions to work through, with a points system to track your progress | * [[http://www.mathworks.com/matlabcentral/about/cody/ | Cody]], a continually expanding set of problems with solutions to work through, with a points system to track your progress | ||
- | If you are unsure, take a look at the table of contents of the MATLAB Primer in the link above. If there are things you don't recognize, use the Primer itself, or Chapter 2 of the MATLAB for Neuroscientists book to get up to speed. If you've never used MATLAB, definitely start with the steps in the Primer. | + | If you are unsure, take a look at the table of contents of the MATLAB Primer in the link above. If there are things you don't recognize, use the Tutorials in the Primer itself, and/or Chapter 2 of the MATLAB for Neuroscientists book to get up to speed. If you've never used MATLAB, I recommend you start with the Tutorials in the Primer, and refer to the book chapter if you'd like a change of pace or a different way of explaining the same things. |
Regardless of your MATLAB abilities, some great ways to keep learning are: | Regardless of your MATLAB abilities, some great ways to keep learning are: | ||
Line 51: | Line 26: | ||
* [[http://stackoverflow.com/questions/tagged/matlab | MATLAB questions on StackOverflow]], a Q&A site where you can browse previous questions and add new ones | * [[http://stackoverflow.com/questions/tagged/matlab | MATLAB questions on StackOverflow]], a Q&A site where you can browse previous questions and add new ones | ||
- | If you have no formal training in computer programming (i.e. you have never taken a "Intro to Computer Science" or "Introductory Programming" type course) a great introduction to the "Zen of programming" is to do the pen-and-paper exercises in this [[http://sites.tufts.edu/rodrego/files/2011/03/Secrets-of-Computer-Power-Revealed-2008.pdf | short chapter]] by Daniel Dennett ("The Secrets of Computer Power Revealed") before you embark on the MATLAB primer linked to above. Most people find it frustrating at first, but rewarding if they stick with it for a few hours. | + | If you have no training or experience in computer programming (i.e. you have never taken a "Intro to Computer Science" or "Introductory Programming" type course) a great introduction to the "Zen of programming" is to do the pen-and-paper exercises in this [[http://sites.tufts.edu/rodrego/files/2011/03/Secrets-of-Computer-Power-Revealed-2008.pdf | short chapter]] by Daniel Dennett ("The Secrets of Computer Power Revealed") before you embark on the MATLAB primer linked to above. Most people find it frustrating at first, but rewarding if they stick with it for a few hours. |
=== Resources === | === Resources === | ||
+ | |||
+ | Emotiv documentation: | ||
+ | |||
+ | * {{:analysis:quickstartguide2014.pdf|Quick Start Guide}} | ||
+ | * {{:analysis:emotiv_epoc_specifications_2014.pdf|Specification Sheet}} | ||
+ | * {{:analysis:epocusermanual2014.pdf|Manual}} | ||
+ | * {{:analysis:testbench_manual.pdf|TestBench (Emotiv software) manual}} | ||
+ | * [[https://emotiv.com/forum/forum4/topic2081/messages/|Cleaning instructions]] | ||
The following textbooks provide more in-depth treatment of some of the topics we touch on in the course: | The following textbooks provide more in-depth treatment of some of the topics we touch on in the course: | ||
- | * Textbook: {{:analysis:leis_dspusingmatlab.pdf|Leis, Digital Signal Processing using MATLAB for Students and Researchers}} | + | * Textbook: Leis, Digital Signal Processing using MATLAB for Students and Researchers |
- | * Textbook: {{:analysis:johnstonwu.pdf|Johnston and Wu, Foundations of Cellular Neurophysiology}} | + | * Textbook: Johnston and Wu, Foundations of Cellular Neurophysiology |
- | * Textbook: {{:analysis:dayanabbott_theoneuro.pdf|Dayan & Abbott, Theoretical Neuroscience}} | + | * Textbook: Dayan & Abbott, Theoretical Neuroscience |
These are selected modules from a graduate course I teach on neural data analysis: | These are selected modules from a graduate course I teach on neural data analysis: | ||
* [[analysis:nsb2015:week0|Principles of (neural) data analysis]] | * [[analysis:nsb2015:week0|Principles of (neural) data analysis]] | ||
- | * [[analysis:course-w16:week1|Module 1: Setting up (MATLAB, paths, GitHub, accessing data; Week 1)]] | + | * [[analysis:course-w16:week1|Module 1: Setting up (MATLAB, paths, GitHub, accessing data)]] |
- | * [[analysis:course-w16:week2|Module 2: Introduction to neural data formats and preprocessing (Week 2)]] | + | * [[analysis:course-w16:week2|Module 2: Introduction to neural data formats and preprocessing]] |
- | * [[analysis:course-w16:week3long|Module 3: Visualizing raw neural data in MATLAB (Week 3)]] | + | * [[analysis:course-w16:week3long|Module 3: Visualizing raw neural data in MATLAB]] |
- | * [[analysis:course-w16:week4|Module 4: Anatomy of time series data, sampling theory (Week 4)]] | + | * [[analysis:course-w16:week4|Module 4: Anatomy of time series data, sampling theory]] |
- | * [[analysis:course-w16:week5|Module 5: Fourier series, transforms, power spectra (Week 4)]] | + | * [[analysis:course-w16:week5|Module 5: Fourier series, transforms, power spectra]] |
- | * [[analysis:course-w16:week6|Module 6: Filtering: filter design, use, caveats (Week 5)]] | + | * [[analysis:course-w16:week6|Module 6: Filtering: filter design, use, caveats]] |
- | * [[analysis:course-w16:week7|Module 7: Time-frequency analysis: spectrograms (Week 5)]] | + | * [[analysis:course-w16:week7|Module 7: Time-frequency analysis: spectrograms]] |
- | * [[analysis:course-w16:week11|Module 11: Interactions between multiple signals: coherence, Granger causality, and phase-slope index (Week 8)]] | + | * [[analysis:course-w16:week11|Module 11: Interactions between multiple signals: coherence, Granger causality, and phase-slope index]] |
- | * [[analysis:course-w16:week12|Module 12: Time-frequency analysis II: cross-frequency coupling (Week 9)]] | + | * [[analysis:course-w16:week12|Module 12: Time-frequency analysis II: cross-frequency coupling]] |
- | * [[analysis:course-w16:week13|Module 13: Spike-field relationships: spike-triggered average, phase locking, phase precession (Week 10)]] | + | * [[analysis:course-w16:week13|Module 13: Spike-field relationships: spike-triggered average, phase locking, phase precession]] |
=== Note for Linux users === | === Note for Linux users === | ||
- | The lab codebase is set up for machines running 64-bit Windows 7 or Mac %%OS%% X. If you want to use Linux or some other %%OS%% you will probably need to compile some of the low-level loading functions yourself. Some pointers for this are provided in subsequent modules when loading is introduced. | + | The tutorials provided here are set up for machines running 64-bit Windows 7 or Mac %%OS%% X. If you want to use Linux or some other %%OS%% you will probably need to compile some of the low-level loading functions yourself. Some pointers for this are provided in subsequent modules when loading is introduced. |