0001
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
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046 function headinfo(GND_GRP_or_fname)
0047
0048 GRP_var=0;
0049
0050 if ischar(GND_GRP_or_fname),
0051 fprintf('Loading GND or GRP struct from file %s.\n',GND_GRP_or_fname);
0052 load(GND_GRP_or_fname,'-MAT');
0053 if ~exist('GND','var') && ~exist('GRP','var')
0054 error('File %s does not contain a GND or GRP variable.',GND_GRP_or_fname);
0055 end
0056 if exist('GRP','var'),
0057 GND=GRP;
0058 clear GRP;
0059 GRP_var=1;
0060 end
0061 else
0062 GND=GND_GRP_or_fname;
0063 fldnames=fieldnames(GND);
0064 if ismember('group_desc',fldnames),
0065 GRP_var=1;
0066 end
0067 end
0068
0069 n_chans=length(GND.chanlocs);
0070 n_tpts=length(GND.time_pts);
0071 n_bins=length(GND.bin_info);
0072
0073 fprintf('CHANNELS\n');
0074 for c=1:n_chans,
0075 fprintf('%d:%s ',c,GND.chanlocs(c).labels);
0076 if ~mod(c,8)
0077 fprintf('\n');
0078 end
0079 end
0080 if mod(c,8),
0081 fprintf('\n');
0082 end
0083
0084 if GRP_var,
0085 fprintf('\nGROUPS\n');
0086 n_groups=length(GND.group_desc);
0087 for b=1:n_groups,
0088 fprintf('Group %d: %s (%d participants)\n',b,GND.group_desc{b}, ...
0089 length(GND.indiv_fnames{b}));
0090 end
0091 end
0092
0093 fprintf('\nBINS\n');
0094 if n_bins
0095 for b=1:n_bins,
0096 fprintf('Bin %d: %s\n',b,GND.bin_info(b).bindesc);
0097 end
0098 else
0099 fprintf('No bins are yet stored with these data.\n');
0100 end
0101
0102
0103 fprintf('\nt-TESTS\n');
0104 n_ptests=length(GND.t_tests);
0105
0106 for t=1:n_ptests,
0107 fprintf('t-test %d->Bin %d, ',t,GND.t_tests(t).bin);
0108 if isnan(GND.t_tests(t).n_perm)
0109 fprintf('q(method=%s)=%g, ',GND.t_tests(t).mult_comp_method, ...
0110 GND.t_tests(t).desired_alphaORq);
0111 else
0112 if strcmpi(GND.t_tests(t).mult_comp_method,'tmax perm test')
0113 fprintf('Est. Alpha(method=tmax)=%g, ',GND.t_tests(t).estimated_alpha);
0114 else
0115 fprintf('Est. Alpha(method=cluster mass)=%g, ',GND.t_tests(t).estimated_alpha);
0116 end
0117 end
0118 if strcmpi(GND.t_tests(t).mean_wind,'yes'),
0119 fprintf('Mean uV in ');
0120 else
0121 fprintf('Each time point in ');
0122 end
0123 n_wind=size(GND.t_tests(t).time_wind,1);
0124 for w=1:n_wind,
0125 if w==n_wind
0126 fprintf('%d-%d ms, ',GND.t_tests(t).time_wind(w,1), ...
0127 GND.t_tests(t).time_wind(w,2));
0128 else
0129 fprintf('%d-%d, ',GND.t_tests(t).time_wind(w,1), ...
0130 GND.t_tests(t).time_wind(w,2));
0131 end
0132 end
0133 ex_ids=setdiff(1:length(GND.chanlocs),GND.t_tests(t).used_chan_ids);
0134 if isempty(ex_ids),
0135 fprintf('All channels included\n');
0136 else
0137 fprintf('Excluding channels:');
0138 for c=ex_ids,
0139 fprintf(' %s',GND.chanlocs(c).labels);
0140 end
0141 fprintf('\n');
0142 end
0143 end
0144 if ~n_ptests,
0145 fprintf('No t-test results have been stored with these data.\n');
0146 end