-
Notifications
You must be signed in to change notification settings - Fork 5
/
addPaths.m
71 lines (59 loc) · 2.74 KB
/
addPaths.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
% Add the paths needed for RAT to the current Matlab session.
% This must be run from the base RAT directory.
% RAT (will soon) allow use of the Paramonte library for Bayesian
% inference.
% For this to work it assumes that Paramonte is installed on your system as
% described here https://uk.mathworks.com/matlabcentral/fileexchange/78946-paramonte
% The installation should permanently add the Paramonte paths to your
% Matlab install (you can check by typing 'pathtool' at the Matlab command
% prompt - the Paramonte directories should be present). If not, you will
% need to add them to this file. Please see the Paramonte Docs for more
% details.
root = pwd; % Returns base RAT directory
eventCompilePath = fullfile(root,'compile','events');
paths = {
fullfile(root,'API');
fullfile(root,'API','enums');
fullfile(root,'API','events');
fullfile(root,'API','projectClass');
eventCompilePath;
fullfile(root,'compile');
fullfile(root,'compile','customWrapper');
fullfile(root,'compile','fullCompile');
fullfile(root,'compile','reflectivityCalculation');
fullfile(root,'minimisers','DE');
fullfile(root,'minimisers','DREAM');
fullfile(root,'minimisers','DREAM','diagnostics');
fullfile(root,'minimisers','DREAM','functions');
fullfile(root,'minimisers','DREAM','postprocessing');
fullfile(root,'minimisers','generalUtils');
fullfile(root,'minimisers','generalUtils','bayesStats');
fullfile(root,'minimisers','NS');
fullfile(root,'minimisers','simplex');
fullfile(root,'targetFunctions' );
fullfile(root,'targetFunctions','common');
fullfile(root,'targetFunctions','common','callReflectivity');
fullfile(root,'targetFunctions','common','costFunctions');
fullfile(root,'targetFunctions','common','customModelFunctions');
fullfile(root,'targetFunctions','common','groupLayers');
fullfile(root,'targetFunctions','common','makeSLDProfiles');
fullfile(root,'targetFunctions','common','reflectivityCalculations','abeles');
fullfile(root,'targetFunctions','common','resampleLayers');
fullfile(root,'targetFunctions','common','resolutionFunctions','simpleGaussian');
fullfile(root,'utilities');
fullfile(root,'utilities','misc');
fullfile(root,'utilities','plotting');
fullfile(root,'3rdParty','paramonte');
};
for i = 1:length(paths)
addpath(paths{i});
end
addpath(root);
setappdata(0, 'root', root);
includedir = {fullfile(root, 'compile', 'customWrapper'), eventCompilePath};
setappdata(0, 'includeDirs', includedir);
% Add the folder with the eventManager dynamic library to the system path so
% it can be found without copying the library file to every folder
if exist(eventCompilePath, 'dir')
setenv("RAT_PATH", [eventCompilePath filesep]);
end