forked from dzhvansky/pepato
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_pepato
executable file
·35 lines (29 loc) · 1.45 KB
/
run_pepato
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
#!/usr/bin/octave -qf
printf ('current directory: %s\n', pwd())
[pepato_path, ~, ~] = fileparts(mfilename('fullpath'));
addpath(fullfile(pepato_path, 'src'));
arg_list = argv ();
if nargin < 6
printf ('ERROR: There should be more then 5 args. Side of the body, NMF stop criteria, name of the database from pepato/db directory, experiment data files (*emg.csv + *gaitEvents.yaml for each speed) and the dir where the results will be stored\n');
printf ('Usage:\n');
printf ('\t./run_pepato body_side nnmf_stop_criteria db_name data_speed2kmh_emg.csv data_speed2kmh_gaitEvents.yaml ... result_dir\n\n');
exit(127);
end
printf ('body side: %s\n', arg_list{1});
printf ('NMF stop criteria: %s\n', arg_list{2});
printf ('database name: %s\n', arg_list{3});
printf('file list: [');
printf ('%s, ', arg_list{4:end-1});
printf(']\n');
printf ('result dir: %s\n', arg_list{end});
for package_name = {'signal', 'statistics'}
pkg('load', package_name{:});
end
% config = {high_pass, low_pass, norm_points, n_module_max, nnmf_replicates, nnmf_stop_criterion}
% nnmf_stop_criterion must be from the list ['BLF', 'N=4', 'R2=0.90']
config = {30, 400, 200, 8, 50, arg_list{2}};
db_path = fullfile(pepato_path, 'db', arg_list{3});
muscle_list = {'BiFe', 'SeTe', 'VaMe', 'VaLa', 'ReFe', 'TiAn', 'GaMe', 'Sol'};
PepatoBasic()...
.init(arg_list(4:end-1), 'standard', arg_list{end}, arg_list{1}, config, db_path, muscle_list)...
.pipeline({'speed2kmh', 'speed4kmh', 'speed6kmh'}, 4);