Home > eeg > egis > egis_file_utils > sesfhdr2avetspecs.m

sesfhdr2avetspecs

PURPOSE ^

function [ave_chdr] = sesfhdr2avetspecs(ses_fhdr, ave_chdr)

SYNOPSIS ^

function [ave_chdr] = sesfhdr2avetspecs(ses_fhdr, ave_chdr)

DESCRIPTION ^

function [ave_chdr] = sesfhdr2avetspecs(ses_fhdr, ave_chdr)

Copies run info, etc to tspecs in ave file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ave_chdr] = sesfhdr2avetspecs(ses_fhdr, ave_chdr)
0002 %function [ave_chdr] = sesfhdr2avetspecs(ses_fhdr, ave_chdr)
0003 %
0004 %Copies run info, etc to tspecs in ave file
0005 %
0006 
0007 % Modification history
0008 % 7/20/95 -- PJ     Created routine
0009 % 7/22/95 -- PJ        added tests for size of TSpec in average chdr
0010 %            and value in LSpec
0011 %            The LSpec must be at least 28 in order for wt_ave_hdr_v to succeed
0012 
0013 ses_hdr_offsets_v; ave_hdr_offsets_v;
0014 
0015 if size(ave_chdr,2) < 19 
0016   ave_chdr = ave_chdr + zeros(size(ave_chdr,1), 19 - size(ave_chdr,2));
0017 end
0018 
0019 if any(ave_chdr(:,LSpec) < 28)
0020   ave_chdr(:,LSpec) = ones(size(ave_chdr,1),1) * 28;
0021 end
0022 nrows = size(ave_chdr,1);
0023 ave_chdr(:,RunDateMo_Ave) = ones(nrows,1)*ses_fhdr(RunDateMo);
0024 ave_chdr(:,RunDateDay_Ave) = ones(nrows,1)*ses_fhdr(RunDateDay);
0025 ave_chdr(:,RunDateYr_Ave) = ones(nrows,1)*ses_fhdr(RunDateYr);
0026 ave_chdr(:,RunTimeHr_Ave) = ones(nrows,1)*ses_fhdr(RunTimeHr);
0027 ave_chdr(:,RunTimeMin_Ave) = ones(nrows,1)*ses_fhdr(RunTimeMin);
0028 ave_chdr(:,RunTimeSec_Ave) = ones(nrows,1)*ses_fhdr(RunTimeSec);
0029 ave_chdr(:,SubjID_Ave) = ones(nrows,1)*ses_fhdr(SubjID);
0030 ave_chdr(:,Handed_Ave) = ones(nrows,1)*ses_fhdr(Handed);
0031 ave_chdr(:,Sex_Ave) = ones(nrows,1)*ses_fhdr(Sex);
0032 ave_chdr(:,Age_Ave) = ones(nrows,1)*ses_fhdr(Age);
0033 ave_chdr(:,ExperID_Ave) = ones(nrows,1)*ses_fhdr(ExperID);
0034 ave_chdr(:,EdVer_Ave) = ones(nrows,1)*ses_fhdr(EdVer);
0035 ave_chdr(:,CalFlag_Ave) = ones(nrows,1)*ses_fhdr(CalFlag);

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003