-
Notifications
You must be signed in to change notification settings - Fork 2
/
tde_prfrun.m
36 lines (27 loc) · 1.02 KB
/
tde_prfrun.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEMO script: extract and preprocess the ECoG PRF data and fit pRF model. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 1: Load the ECoG PRF data and stimulus description
% Load and epoch the data
recomputeFlag = false;
tasks = {'prf'};
epochTime = [0 0.85];
saveStr = 'prfdata';
sampleRate = 512;
[data] = tde_getData(recomputeFlag, [], [], tasks, epochTime, sampleRate, [], saveStr);
% Compute the PRF timecourses
doPlots = false;
[data] = tde_computePRFtimecourses(data, [], [], doPlots);
% Load the stimulus apertures
stimName = fullfile(tdeRootPath, 'prf_apertures', 'bar_apertures.mat');
load(stimName, 'bar_apertures');
%% 2: Model fitting
% Fit the PRF time courses with analyzePRF
tr = 1;
opt.hrf = 1;
opt.maxpolydeg = 0;
opt.xvalmode = 0;
opt.forcebounds = 1;
opt.display = 'off';
doPlots = true;
[results] = tde_fitPRFs(data, bar_apertures, opt, doPlots);