0001 function [pick, Qpick, w] = sensor_pos_neuromag(MEGid,U)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 if ischar(MEGid),
0033 switch MEGid
0034 case {'VV_PLANAR_T1','VV_PLANAR_T2','VV_PLANER_T3'}
0035
0036
0037
0038
0039
0040
0041 x1 = [ 8.4 , 0.0 , 0.3]*0.001;
0042 x2 = [ -8.4 , 0.0 , 0.3]*0.001;
0043 z = [ 0.0 , 0.0 , 1.0];
0044
0045 w = [ 1/16.8 , -1/16.8]*1000;
0046 pick = [x1, 1; x2, 1] * U(:,1:3);
0047 Qpick = [z; z] * U(1:3,1:3);
0048
0049 case {'VV_MAG_T1','VV_MAG_T2'}
0050
0051
0052
0053
0054
0055
0056 x1 = [ 6.45 , 6.45 , 0.3]*0.001;
0057 x2 = [ 6.45 ,-6.45 , 0.3]*0.001;
0058 x3 = [ -6.45 , 6.45 , 0.3]*0.001;
0059 x4 = [ -6.45 ,-6.45 , 0.3]*0.001;
0060 z = [ 0.0 , 0.0 , 1.0];
0061
0062 w = [ 1/4 ,1/4 ,1/4 ,1/4 ];
0063 pick = [x1, 1; x2, 1; x3, 1; x4, 1] * U(:,1:3);
0064 Qpick = [z; z; z; z] * U(1:3,1:3);
0065
0066 case {'VV_MAG_T3'}
0067
0068
0069
0070
0071
0072 x1 = [ 5.25 , 5.25 , 0.3]*0.001;
0073 x2 = [ 5.25 ,-5.25 , 0.3]*0.001;
0074 x3 = [ -5.25 , 5.25 , 0.3]*0.001;
0075 x4 = [ -5.25 ,-5.25 , 0.3]*0.001;
0076 z = [ 0.0 , 0.0 , 1.0];
0077
0078 w = [ 1/4 ,1/4 ,1/4 ,1/4 ];
0079 pick = [x1, 1; x2, 1; x3, 1; x4, 1] * U(:,1:3);
0080 Qpick = [z; z; z; z] * U(1:3,1:3);
0081
0082 case {'Neuromag_122'}
0083
0084
0085
0086
0087
0088
0089 x1 = [ 8.1 , 0.0 , 0.0]*0.001;
0090 x2 = [ -8.1 , 0.0 , 0.0]*0.001;
0091 z = [ 0.0 , 0.0 , 1.0];
0092
0093 w = [ 1/16.2 , -1/16.2]*1000;
0094 pick = [x1, 1; x2, 1] * U(:,1:3);
0095 Qpick = [z; z] * U(1:3,1:3);
0096
0097 otherwise
0098 w = [];
0099 pick = [];
0100 Qpick = [];
0101
0102 end
0103 else
0104 switch MEGid
0105 case {3012,3013,3014}
0106
0107
0108
0109
0110
0111
0112
0113 x1 = [ 8.4 , 0.0 , 0.3]*0.001;
0114 x2 = [ -8.4 , 0.0 , 0.3]*0.001;
0115 z = [ 0.0 , 0.0 , 1.0];
0116
0117 w = [ 1/16.8 , -1/16.8]*1000;
0118 pick = [x1, 1; x2, 1] * U(:,1:3);
0119 Qpick = [z; z] * U(1:3,1:3);
0120
0121 case {3022,3023}
0122
0123
0124
0125
0126
0127
0128 x1 = [ 6.45 , 6.45 , 0.3]*0.001;
0129 x2 = [ 6.45 ,-6.45 , 0.3]*0.001;
0130 x3 = [ -6.45 , 6.45 , 0.3]*0.001;
0131 x4 = [ -6.45 ,-6.45 , 0.3]*0.001;
0132 z = [ 0.0 , 0.0 , 1.0];
0133
0134 w = [ 1/4 ,1/4 ,1/4 ,1/4 ];
0135 pick = [x1, 1; x2, 1; x3, 1; x4, 1] * U(:,1:3);
0136 Qpick = [z; z; z; z] * U(1:3,1:3);
0137
0138 case {3024}
0139
0140
0141
0142
0143
0144 x1 = [ 5.25 , 5.25 , 0.3]*0.001;
0145 x2 = [ 5.25 ,-5.25 , 0.3]*0.001;
0146 x3 = [ -5.25 , 5.25 , 0.3]*0.001;
0147 x4 = [ -5.25 ,-5.25 , 0.3]*0.001;
0148 z = [ 0.0 , 0.0 , 1.0];
0149
0150 w = [ 1/4 ,1/4 ,1/4 ,1/4 ];
0151 pick = [x1, 1; x2, 1; x3, 1; x4, 1] * U(:,1:3);
0152 Qpick = [z; z; z; z] * U(1:3,1:3);
0153
0154 case {2}
0155
0156
0157
0158
0159
0160
0161 x1 = [ 8.1 , 0.0 , 0.0]*0.001;
0162 x2 = [ -8.1 , 0.0 , 0.0]*0.001;
0163 z = [ 0.0 , 0.0 , 1.0];
0164
0165 w = [ 1/16.2 , -1/16.2]*1000;
0166 pick = [x1, 1; x2, 1] * U(:,1:3);
0167 Qpick = [z; z] * U(1:3,1:3);
0168 otherwise
0169 w = [];
0170 pick = [];
0171 Qpick = [];
0172
0173 end
0174 end