gsr_data_analysis
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gsr_data_analysis [2010/06/18 21:15] – altered the syntax for resampling (now as a xff method!) jochen | gsr_data_analysis [2010/06/18 23:22] (current) – changed onsets to be in ms jochen | ||
|---|---|---|---|
| Line 69: | Line 69: | ||
| ===== (Pre-) Filtering data ===== | ===== (Pre-) Filtering data ===== | ||
| - | While a lot of the very high-frequency noise is (naturally) gone after the resampling, there is still a lot of signal variation that is (very likely) unrelated to any task/ | + | While a lot of the very high-frequency noise is (naturally) gone after the resampling, there is still a lot of signal variation that is (very likely) unrelated to any task/ |
| - | <code matlab GSR_prefilter.m> | + | <code matlab GSR_prefilter.m> |
| - | fdata = prefilter(rdata); | + | gsr.Filter(1); |
| % plotting same time index with stronger line | % plotting same time index with stronger line | ||
| - | set(plot(fdata(50400: | + | data = gsr.ChannelData(1); |
| + | set(plot(data(50400: | ||
| {{: | {{: | ||
| Line 88: | Line 89: | ||
| <code matlab GSR_acq_stimonsets.m> | <code matlab GSR_acq_stimonsets.m> | ||
| % first value in diff rather codes the second sample in the data! | % first value in diff rather codes the second sample in the data! | ||
| - | all_onsets = 1 + find(diff(gsr.RawData(8, :)') > 0); | + | all_onsets = 1 + find(diff(gsr.ChannelData(8)) > 0); |
| % now split into three conditions | % now split into three conditions | ||
| - | neu = all_onsets(gsr.RawData(2, all_onsets) > 0); | + | neu = 0.01 * all_onsets(gsr.ChannelData(2, all_onsets) > 0); |
| - | neg = all_onsets(gsr.RawData(3, all_onsets) > 0); | + | neg = 0.01 * all_onsets(gsr.ChannelData(3, all_onsets) > 0); |
| - | rea = all_onsets(gsr.RawData(4, all_onsets) > 0); | + | rea = 0.01 * all_onsets(gsr.ChannelData(4, all_onsets) > 0);</ |
| - | + | ||
| - | % cope for resampling from 500Hz -> 100Hz !! | + | |
| - | neu = round(0.2 .* neu); | + | |
| - | neg = round(0.2 .* neg); | + | |
| - | rea = round(0.2 .* rea);</ | + | |
| As window length for the inspection of the GSR data, we choose 15 seconds, so in the resolution of the resampled data that means 1,500 samples. | As window length for the inspection of the GSR data, we choose 15 seconds, so in the resolution of the resampled data that means 1,500 samples. | ||
| Line 140: | Line 136: | ||
| reacurves = cell(numel(rea), | reacurves = cell(numel(rea), | ||
| for sc = 1: | for sc = 1: | ||
| - | neucurves{sc, | + | neucurves{sc, |
| - | neucurves{sc, | + | neucurves{sc, |
| end | end | ||
| for sc = 1: | for sc = 1: | ||
| - | negcurves{sc, | + | negcurves{sc, |
| - | negcurves{sc, | + | negcurves{sc, |
| end | end | ||
| for sc = 1: | for sc = 1: | ||
| - | reacurves{sc, | + | reacurves{sc, |
| - | reacurves{sc, | + | reacurves{sc, |
| end | end | ||
gsr_data_analysis.1276895722.txt.gz · Last modified: 2010/06/18 21:15 by jochen
