-
Notifications
You must be signed in to change notification settings - Fork 1
/
gammaModelDownloadData.m
44 lines (35 loc) · 1.05 KB
/
gammaModelDownloadData.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
37
38
39
40
41
42
43
44
function gammaModelDownloadData()
% Download and unzip the data from the Open Science Framework project page
% associated with this paper:
%
% Hermes D, Petridou N, Kay K, Winawer J. 2019 An image-computable model
% for the stimulus selectivity of gamma oscillations. eLife 2019;8:e47035.
% DOI: https://doi.org/10.7554/eLife.47035
%
% Alternatively, the data can be downloaded manually from this site:
% https://osf.io/eqjxb/
%
% The code downloads a single zip file (2.03GB), places it in the root
% directory of the project, and unzips it into the folder named 'data'
url = 'https://osf.io/q4yad/download';
codeDir = gammaModelPath;
dataDir = fullfile(codeDir,'data');
if ~exist(dataDir,'dir')
disp(['making data directory: ' dataDir])
mkdir(dataDir);
end
pth = fullfile(dataDir, 'Hermes2019eLifeData.zip');
% download
if ~exist(pth,'file')
disp('start downloading data from OSF...')
websave(pth, url);
disp('Done!')
end
% unzip
if exist(pth,'file')
disp('unzipping...')
unzip(pth, codeDir)
disp('Done!')
end % if
end
% [EOF]