|
@@ -0,0 +1,219 @@
|
|
|
+function [Rat, Type, Day, TetrodeNumber, ClusterNumber, Session, Sessiontype, Index1] = GetSessionInfo(name)
|
|
|
+a=strfind(name,'-');
|
|
|
+b=strfind(name,'Main');
|
|
|
+c=strfind(name,'.');
|
|
|
+if ~isempty(b)
|
|
|
+ Rat=name(a(1)+1:a(2)-1);
|
|
|
+ Type='Main';
|
|
|
+ Day=name(a(2)+5:a(3)-1);
|
|
|
+ TetrodeNumber=name(a(3)+3:a(4)-1);
|
|
|
+ ClusterNumber=name(a(4)+2:c(1)-1);
|
|
|
+else
|
|
|
+ Rat=name(a(1)+1:a(2)-1);
|
|
|
+ Type='Pilot';
|
|
|
+ Day=name(a(2)+6:a(3)-1);
|
|
|
+ TetrodeNumber=name(a(3)+3:a(4)-1);
|
|
|
+ ClusterNumber=name(a(4)+2:c(1)-1);
|
|
|
+end
|
|
|
+
|
|
|
+if str2num(Rat)==448 || str2num(Rat) == 459 || str2num(Rat) == 463
|
|
|
+ if str2num(Day)==3
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SS';
|
|
|
+ Index1=1;
|
|
|
+ elseif str2num(Day)==4
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSCH1';
|
|
|
+ Index1=2;
|
|
|
+ elseif str2num(Day)==5
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSCH2';
|
|
|
+ Index1=3;
|
|
|
+ elseif str2num(Day)==6
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='FRCH1';
|
|
|
+ Index1=4;
|
|
|
+ elseif str2num(Day)==7
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='FRCH2';
|
|
|
+ Index1=5;
|
|
|
+ elseif str2num(Day)==8
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFR1';
|
|
|
+ Index1=6;
|
|
|
+ elseif str2num(Day)==9
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFR2';
|
|
|
+ Index1=7;
|
|
|
+ elseif str2num(Day)==10
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-SSCH1';
|
|
|
+ Index1=14;
|
|
|
+ elseif str2num(Day)==11
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-SSCH2';
|
|
|
+ Index1=15;
|
|
|
+ elseif str2num(Day)==12
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-Quantity1';
|
|
|
+ Index1=16;
|
|
|
+ elseif str2num(Day)==13
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-Quantity2';
|
|
|
+ Index1=17;
|
|
|
+ elseif str2num(Day)==14
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Quantity1';
|
|
|
+ Index1=8;
|
|
|
+ elseif str2num(Day)==15
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Quantity2';
|
|
|
+ Index1=9;
|
|
|
+ end
|
|
|
+ elseif str2num(Rat)==473 || str2num(Rat) == 488
|
|
|
+ if str2num(Day)==1
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SS';
|
|
|
+ Index1=1;
|
|
|
+ elseif str2num(Day)==2
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSCH1';
|
|
|
+ Index1=2;
|
|
|
+ elseif str2num(Day)==3
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSCH2';
|
|
|
+ Index1=3;
|
|
|
+ elseif str2num(Day)==4
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='FRCH1';
|
|
|
+ Index1=4;
|
|
|
+ elseif str2num(Day)==5
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='FRCH2';
|
|
|
+ Index1=5;
|
|
|
+ elseif str2num(Day)==6
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFR1';
|
|
|
+ Index1=6;
|
|
|
+ elseif str2num(Day)==7
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFR2';
|
|
|
+ Index1=7;
|
|
|
+ elseif str2num(Day)==8
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-SSCH1';
|
|
|
+ Index1=14;
|
|
|
+ elseif str2num(Day)==9
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-SSCH2';
|
|
|
+ Index1=15;
|
|
|
+ elseif str2num(Day)==10
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-Quantity1';
|
|
|
+ Index1=16;
|
|
|
+ elseif str2num(Day)==11
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-Quantity2';
|
|
|
+ Index1=17;
|
|
|
+ elseif str2num(Day)==12
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Quantity1';
|
|
|
+ Index1=8;
|
|
|
+ elseif str2num(Day)==13
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Quantity2';
|
|
|
+ Index1=9;
|
|
|
+ elseif str2num(Day)==14
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFRCH1';
|
|
|
+ Index1=10;
|
|
|
+ elseif str2num(Day)==15
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFRCH2';
|
|
|
+ Index1=11;
|
|
|
+ elseif str2num(Day)==16
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Object1';
|
|
|
+ Index1=12;
|
|
|
+ elseif str2num(Day)==17
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Object2';
|
|
|
+ Index1=13;
|
|
|
+ end
|
|
|
+ elseif str2num(Rat)==509
|
|
|
+ if isequal(Type,'Pilot')
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SS';
|
|
|
+ Index1=1;
|
|
|
+ else
|
|
|
+ if str2num(Day)==1
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SS';
|
|
|
+ Index1=1;
|
|
|
+ elseif str2num(Day)==2
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSCH1';
|
|
|
+ Index1=2;
|
|
|
+ elseif str2num(Day)==3
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSCH2';
|
|
|
+ Index1=3;
|
|
|
+ elseif str2num(Day)==4
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='FRCH1';
|
|
|
+ Index1=4;
|
|
|
+ elseif str2num(Day)==5
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='FRCH2';
|
|
|
+ Index1=5;
|
|
|
+ elseif str2num(Day)==6
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFR1';
|
|
|
+ Index1=6;
|
|
|
+ elseif str2num(Day)==7
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFR2';
|
|
|
+ Index1=7;
|
|
|
+ elseif str2num(Day)==8
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-SSCH1';
|
|
|
+ Index1=14;
|
|
|
+ elseif str2num(Day)==9
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-SSCH2';
|
|
|
+ Index1=15;
|
|
|
+ elseif str2num(Day)==10
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-Quantity1';
|
|
|
+ Index1=16;
|
|
|
+ elseif str2num(Day)==11
|
|
|
+ Session='Tmaze';
|
|
|
+ Sessiontype='T-Quantity2';
|
|
|
+ Index1=17;
|
|
|
+ elseif str2num(Day)==12
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Quantity1';
|
|
|
+ Index1=8;
|
|
|
+ elseif str2num(Day)==13
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Quantity2';
|
|
|
+ Index1=9;
|
|
|
+ elseif str2num(Day)==14
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFRCH1';
|
|
|
+ Index1=10;
|
|
|
+ elseif str2num(Day)==15
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='SSFRCH2';
|
|
|
+ Index1=11;
|
|
|
+ elseif str2num(Day)==16
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Object1';
|
|
|
+ Index1=12;
|
|
|
+ elseif str2num(Day)==17
|
|
|
+ Session='Alternation';
|
|
|
+ Sessiontype='Object2';
|
|
|
+ Index1=13;
|
|
|
+ end
|
|
|
+ end
|
|
|
+end
|