User Tools

Site Tools


analysis:course-w16:week4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
analysis:course-w16:week4 [2016/01/21 14:25]
mvdm
analysis:course-w16:week4 [2016/02/01 11:11]
mvdm [Subsampling (decimating) time series data]
Line 91: Line 91:
 ==== Subsampling (decimating) time series data ==== ==== Subsampling (decimating) time series data ====
  
-In the real world, the frequency at which we can acquire data will be limited the properties of your experimental equipment. For instance, the maximum sampling rate on a typical Neuralynx system is 32 kHz. Thus, the highest-frequency signal we can detect is 16 kHz (the Nyquist frequency). Crucially, however, we cannot rule out the possibility that frequencies above 16 kHz are present in the signal we are sampling from! Thus, we risk **aliasing**:​ generating "​phantom"​ frequencies in our sampled data that don't exist in the true signal. What to do?+In the real world, the frequency at which we can acquire data will be limited ​by the properties of your experimental equipment. For instance, the maximum sampling rate on a typical Neuralynx system is 32 kHz. Thus, the highest-frequency signal we can detect is 16 kHz (the Nyquist frequency). Crucially, however, we cannot rule out the possibility that frequencies above 16 kHz are present in the signal we are sampling from! Thus, we risk **aliasing**:​ generating "​phantom"​ frequencies in our sampled data that don't exist in the true signal. What to do?
  
 The general solution is to apply an //​anti-aliasing filter// to the data before sampling. To illustrate this, let's generate a signal consisting of two frequencies:​ The general solution is to apply an //​anti-aliasing filter// to the data before sampling. To illustrate this, let's generate a signal consisting of two frequencies:​
Line 123: Line 123:
 <code matlab> <code matlab>
 % sample at 12 Hz with different method % sample at 12 Hz with different method
 +tvec1d = decimate(tvec1,​ dt);
 signal2d = decimate(signal1,​dt);​ signal2d = decimate(signal1,​dt);​
  
Line 182: Line 183:
 <code matlab> <code matlab>
 xl = [1 1.04]; xl = [1 1.04];
-linkaxes('​x'​,'​ax1',​ax2);+linkaxes([ax1, ax2], '​x'​);​
 set(ax1,'​XLim',​xl);​ % see what I did there?) set(ax1,'​XLim',​xl);​ % see what I did there?)
 </​code>​ </​code>​
Line 360: Line 361:
  
 โ˜… If you implemented your own file loader(s) back in Module 2, implement checks for missing samples and possible sampling frequency misalignments. โ˜… If you implemented your own file loader(s) back in Module 2, implement checks for missing samples and possible sampling frequency misalignments.
 +
 +โ˜… Important! If you have your own idea of something you'd like to accomplish in this course, even if is isn't listed as an official challenge, ask me and we can make it count as one. What you do in this course should be as relevant as possible to your work!
analysis/course-w16/week4.txt ยท Last modified: 2018/07/07 10:19 (external edit)