This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
analysis:nsb2014:week8 [2014/08/01 11:12] mvdm [Options and parameters for FieldTrip spectrograms] |
analysis:nsb2014:week8 [2014/08/01 13:07] mvdm [Assignment] |
||
---|---|---|---|
Line 505: | Line 505: | ||
This shows the baseline-corrected, event-aligned spectrograms for all 16 channels in this session. There is also an average shown (the subplot on the lower right). Note that a subset of the channels, presumably located in the ventral striatum, show a very similar time-frequency pattern, whereas another subset do not show this at all. The channels that do not show this same pattern are likely located in the hippocampus. | This shows the baseline-corrected, event-aligned spectrograms for all 16 channels in this session. There is also an average shown (the subplot on the lower right). Note that a subset of the channels, presumably located in the ventral striatum, show a very similar time-frequency pattern, whereas another subset do not show this at all. The channels that do not show this same pattern are likely located in the hippocampus. | ||
- | ==== Assignment ==== | + | ==== Exercise ==== |
Because the event-triggered spectrograms above show an average over trials, it is possible to lose touch with the properties of the raw data that generated it. For instance, the average may arise from a distribution of very similar looking individual trials, or it may be dominated by one atypical but extreme trial. For this reason it is important to compare the spectrogram to the raw data. | Because the event-triggered spectrograms above show an average over trials, it is possible to lose touch with the properties of the raw data that generated it. For instance, the average may arise from a distribution of very similar looking individual trials, or it may be dominated by one atypical but extreme trial. For this reason it is important to compare the spectrogram to the raw data. | ||
Line 511: | Line 511: | ||
An example of a study where this was done well is [[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3463873/ | Leventhal et al]]. Neuron 2012. [[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3463873/figure/F3/ | Figure 3]] in this paper shows a number of event-triggered LFP traces, one for each trial. | An example of a study where this was done well is [[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3463873/ | Leventhal et al]]. Neuron 2012. [[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3463873/figure/F3/ | Figure 3]] in this paper shows a number of event-triggered LFP traces, one for each trial. | ||
- | ☛ Implement a function eventLFPplot(csc,event_times,varargin) to make such a plot, as follows: | + | ☛ Implement a function eventLFPplot(cfg,csc) to make such a plot. The ''cfg'' variable should contain an ''eventTimes'' field which is required, and optionally accept a ''window'' field to override the default window of [-1 3] seconds relative to the event times. |
- | + | ||
- | <code matlab> | + | |
- | % function eventLFPplot(csc,event_times,varargin) | + | |
- | % | + | |
- | % INPUTS | + | |
- | % | + | |
- | % csc: [1 x 1] mytsd, LFP signal to be plotted | + | |
- | % event_times: [nEvents x 1] double with event times to align LFP on | + | |
- | % | + | |
- | % varargins (with defaults): | + | |
- | % | + | |
- | % t_window: [2 x 1] double indicating time window to use, e.g. [-1 3] for 1 second before to 3 seconds after event times | + | |
- | + | ||
- | </code> | + | |
You can use a skeleton like the following: | You can use a skeleton like the following: |