Skip to content

Commit f5d6490

Browse files
committed
Dropping the Group Field
issue: #21 Removed unused 'legacy' code
1 parent 6c33fdc commit f5d6490

24 files changed

+700
-352
lines changed

check/user_feedback.m renamed to check/check_user_feedback.m

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,85 @@
11
function user_feedback( sanity_table, switcher )
2-
%USER_FEEDBACK informs the user if his input is correct
2+
%USER_FEEDBACK informs the user if (and where) his input is wrong
33

44
switch switcher
55
case 1
66
%% General Settings
77
% Path Errors
88
if ~sanity_table(1)
9-
errordlg('File not found. Specify a correct file path for Animal Groups','File error');
10-
elseif ~sanity_table(2)
119
errordlg('Folder not found. Specify a correct folder path for Trajectory Data','Path error');
12-
elseif ~sanity_table(3)
10+
elseif ~sanity_table(2)
1311
errordlg('Folder not found. Specify a correct Output Folder path','Path error');
1412
% Files Format Errors
15-
elseif ~sanity_table(4)
13+
elseif ~sanity_table(3)
1614
errordlg('ID Field. Field needs to contain the animal id field name as specified in the csv file','Input Error');
17-
elseif ~sanity_table(5)
18-
errordlg('Group Field. Field needs to contain the animal group field name as specified in the csv file','Input Error');
19-
elseif ~sanity_table(6)
15+
elseif ~sanity_table(4)
2016
errordlg('Rec Time Field. Field needs to contain the recorded time field name as specified in the csv file','Input Error');
21-
elseif ~sanity_table(7)
17+
elseif ~sanity_table(5)
2218
errordlg('X Field. Field needs to contain the X coordinates field name as specified in the csv file','Input Error');
23-
elseif ~sanity_table(8)
19+
elseif ~sanity_table(6)
2420
errordlg('Y Field. Field needs to contain the Y coordinates field name as specified in the csv file','Input Error');
2521
% Experiment Settings Errors
26-
elseif ~sanity_table(9)
22+
elseif ~sanity_table(7)
2723
errordlg('Sessions. Field needs to contain a numerical value','Input Error');
28-
elseif ~sanity_table(10)
24+
elseif ~sanity_table(9)
2925
errordlg('Days. Field needs to contain a numerical value','Input Error');
30-
elseif ~sanity_table(11)
31-
errordlg('Trials per Session. The arguments needs to be numbericals and the number of arguments needs to be equal to the number of Sessions','Input Error');
26+
elseif ~sanity_table(8)
27+
errordlg('Trials per Day. The arguments needs to be numbericals and the number of arguments needs to be equal to the number of Days','Input Error');
3228
% Experiment Properties Errors
33-
elseif ~sanity_table(12)
29+
elseif ~sanity_table(10)
3430
errordlg('Trial timeout. Field needs to contain a numerical value','Input Error');
35-
elseif ~sanity_table(13)
31+
elseif ~sanity_table(11)
3632
errordlg('Centre X. Field needs to contain a numerical value','Input Error');
37-
elseif ~sanity_table(14)
33+
elseif ~sanity_table(12)
3834
errordlg('Centre Y. Field needs to contain a numerical value','Input Error');
39-
elseif ~sanity_table(15)
35+
elseif ~sanity_table(13)
4036
errordlg('Arena radius. Field needs to contain a numerical value','Input Error');
41-
elseif ~sanity_table(16)
37+
elseif ~sanity_table(14)
4238
errordlg('Platform X. Field needs to contain a numerical value','Input Error');
43-
elseif ~sanity_table(17)
39+
elseif ~sanity_table(15)
4440
errordlg('Platform Y. Field needs to contain a numerical value','Input Error');
45-
elseif ~sanity_table(18)
41+
elseif ~sanity_table(16)
4642
errordlg('Platform radius. Field needs to contain a numerical value','Input Error');
4743
end
4844

4945
case 2
50-
%% Segmentation
46+
%% General Settings
5147
% Path Errors
5248
if ~sanity_table(1)
53-
errordlg('File not found. Specify a correct file path for Animal Groups','File error');
54-
elseif ~sanity_table(2)
5549
errordlg('Folder not found. Specify a correct folder path for Trajectory Data','Path error');
56-
elseif ~sanity_table(3)
50+
elseif ~sanity_table(2)
5751
errordlg('Folder not found. Specify a correct Output Folder path','Path error');
5852
% Files Format Errors
59-
elseif ~sanity_table(4)
53+
elseif ~sanity_table(3)
6054
errordlg('ID Field. Field needs to contain the animal id field name as specified in the csv file','Input Error');
61-
elseif ~sanity_table(5)
62-
errordlg('Group Field. Field needs to contain the animal group field name as specified in the csv file','Input Error');
63-
elseif ~sanity_table(6)
55+
elseif ~sanity_table(4)
6456
errordlg('Rec Time Field. Field needs to contain the recorded time field name as specified in the csv file','Input Error');
65-
elseif ~sanity_table(7)
57+
elseif ~sanity_table(5)
6658
errordlg('X Field. Field needs to contain the X coordinates field name as specified in the csv file','Input Error');
67-
elseif ~sanity_table(8)
59+
elseif ~sanity_table(6)
6860
errordlg('Y Field. Field needs to contain the Y coordinates field name as specified in the csv file','Input Error');
6961
% Experiment Settings Errors
70-
elseif ~sanity_table(9)
62+
elseif ~sanity_table(7)
7163
errordlg('Sessions. Field needs to contain a numerical value','Input Error');
72-
elseif ~sanity_table(10)
64+
elseif ~sanity_table(9)
7365
errordlg('Days. Field needs to contain a numerical value','Input Error');
74-
elseif ~sanity_table(11)
75-
errordlg('Trials per Session. The arguments needs to be numbericals and the number of arguments needs to be equal to the number of Sessions','Input Error');
66+
elseif ~sanity_table(8)
67+
errordlg('Trials per Day. The arguments needs to be numbericals and the number of arguments needs to be equal to the number of Days','Input Error');
7668
% Experiment Properties Errors
77-
elseif ~sanity_table(12)
69+
elseif ~sanity_table(10)
7870
errordlg('Trial timeout. Field needs to contain a numerical value','Input Error');
79-
elseif ~sanity_table(13)
71+
elseif ~sanity_table(11)
8072
errordlg('Centre X. Field needs to contain a numerical value','Input Error');
81-
elseif ~sanity_table(14)
73+
elseif ~sanity_table(12)
8274
errordlg('Centre Y. Field needs to contain a numerical value','Input Error');
83-
elseif ~sanity_table(15)
75+
elseif ~sanity_table(13)
8476
errordlg('Arena radius. Field needs to contain a numerical value','Input Error');
85-
elseif ~sanity_table(16)
77+
elseif ~sanity_table(14)
8678
errordlg('Platform X. Field needs to contain a numerical value','Input Error');
87-
elseif ~sanity_table(17)
79+
elseif ~sanity_table(15)
8880
errordlg('Platform Y. Field needs to contain a numerical value','Input Error');
89-
elseif ~sanity_table(18)
90-
errordlg('Platform radius. Field needs to contain a numerical value','Input Error');
81+
elseif ~sanity_table(16)
82+
errordlg('Platform radius. Field needs to contain a numerical value','Input Error');
9183
% Segmentation
9284
elseif ~sanity_table(19)
9385
errordlg('Segment length. Field needs to contain a numerical value','Input Error');

0 commit comments

Comments
 (0)