-
Notifications
You must be signed in to change notification settings - Fork 3
/
SetIntegrationParameters.m
109 lines (94 loc) · 3.47 KB
/
SetIntegrationParameters.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
%% Set integration parameters for a specified model
%
% ARGUMENTS:
% options -- BrainNetwrorkModels options structure, where at
% least the options.Dynamics.WhichModel field has been
% filled.
%
% OUTPUT:
% options -- An updated BrainNetwrorkModels options structure,
% with new Integration parameter fields filled.
%
% REQUIRES:
% MergeStructures() --
%
% USAGE:
%{
options.Dynamics.WhichModel = 'FHN';
options = SetIntegrationParameters(options);
%}
%
% MODIFICATION HISTORY:
% SAK(<dd-mm-yyyy>) -- Original.
% SAK(Nov 2013) -- Move to git, future modification history is
% there...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function options = SetIntegrationParameters(options)
%Set integration defaults
defaults.verbosity = 0;
%
if isfield(options,'Other'),
options.Other = MergeStructures(options.Other, defaults);
else
options.Other = MergeStructures(defaults);
end
%
switch options.Dynamics.WhichModel
case {'BRRWtess'}
%128 milliseconds @ 8e3Hz
options.Integration.dt = 2^-3;
options.Integration.iters = 2^10;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'AFRtess'}
%64 milliseconds @ 16e3Hz
options.Integration.dt = 2^-4;
options.Integration.iters = 2^10;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'BRRW'}
%1024 milliseconds @ 64e3Hz
options.Integration.dt = 2^-5;
options.Integration.iters = 2^15;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'AFR'}
%4 seconds @ 4096Hz
options.Integration.dt = 2^-12;
options.Integration.iters = 2^14;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'SNX'}
%256 milliseconds @ 64e3 Hz
options.Integration.dt = 2^-6;
options.Integration.iters = 2^14;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'FHN'}
%256 milliseconds @ 256e3 Hz
options.Integration.dt = 2^-8;
options.Integration.iters = 2^16;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'FHNtess'}
%16 milliseconds @ 64e3Hz
options.Integration.dt = 2^-6;
options.Integration.iters = 2^10;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'ReducedFHN'}
%256 milliseconds @ 64e3 Hz
options.Integration.dt = 2^-6;
options.Integration.iters = 2^14;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'ReducedFHNtess'}
%16 milliseconds @ 64e3Hz
options.Integration.dt = 2^-6;
options.Integration.iters = 2^10;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'ReducedHMR'}
%256 milliseconds @ 64e3 Hz
options.Integration.dt = 2^-6;
options.Integration.iters = 2^14;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'ReducedHMRtess'}
%16 milliseconds @ 64e3Hz
options.Integration.dt = 2^-6;
options.Integration.iters = 2^10;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
otherwise
end
end %function SetIntegrationParameters()