Changeset 609 for trunk/src/series/aver_stat.m
- Timestamp:
- Apr 9, 2013, 8:20:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r605 r609 73 73 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 74 74 75 %% root input file(s) and type75 %% root input file(s) name, type and index series 76 76 RootPath=Param.InputTable(:,1); 77 77 RootFile=Param.InputTable(:,3); … … 88 88 % i1_series(iview,fileindex) expresses the same indices as a 1D array in file indices 89 89 %%%%%%%%%%%% 90 % NbSlice=1;%default91 % if isfield(Param.IndexRange,'NbSlice')&&~isempty(Param.IndexRange.NbSlice)92 % NbSlice=Param.IndexRange.NbSlice;93 % end94 90 nbview=numel(i1_series);%number of input file series (lines in InputTable) 95 91 nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices) 96 92 nbfield_i=size(i1_series{1},2); %nb of fields for the i index 97 93 nbfield=nbfield_j*nbfield_i; %total number of fields 98 %nbfield_i=floor(nbfield/NbSlice);%total number of indexes in a slice (adjusted to an integer number of slices) 99 %nbfield=nbfield_i*NbSlice; %total number of fields after adjustement 100 101 % determine the file type on each line from the first input file94 [first_i,tild,last_i,first_j,tild,last_j,errormsg]=get_index_range(Param.IndexRange); 95 if ~isempty(errormsg),display(errormsg),return,end 96 97 %% determine the file type on each line from the first input file 102 98 ImageTypeOptions={'image','multimage','mmreader','video'}; 103 99 NcTypeOptions={'netcdf','civx','civdata'}; … … 150 146 return 151 147 end 152 NomTypeOut='_1-2_1';% output file index will indicate the first and last ref index in the series153 148 %NomTypeOut='_1-2_1';% output file index will indicate the first and last ref index in the series 149 NomTypeOut=nomtype2pair(NomType{1});% determine the index nomenclature type for the output file 154 150 155 151 %% Set field names and velocity types … … 272 268 %%%%%%%%%%%% END MAIN RUNNING OPERATIONS %%%%%%%%%%%% 273 269 else 274 disp lay(errormsg)270 disp(errormsg) 275 271 end 276 272 end … … 303 299 end 304 300 305 % writting the result file306 OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},FileExtOut,NomTypeOut, i1_series{1}(1),i1_series{1}(end),j1_series{1}(1),j1_series{1}(end));301 %% writing the result file 302 OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},FileExtOut,NomTypeOut,first_i,last_i,first_j,last_j); 307 303 if CheckImage{1} %case of images 308 304 if isequal(FileInfo{1}.BitDepth,16)||(numel(FileInfo)==2 &&isequal(FileInfo{2}.BitDepth,16)) … … 313 309 imwrite(DataOut.A,OutputFile,'BitDepth',8); % case of 16 bit images 314 310 end 315 disp lay([OutputFile ' written']);311 disp([OutputFile ' written']); 316 312 else %case of netcdf input file , determine global attributes 317 313 errormsg=struct2nc(OutputFile,DataOut); %save result file 318 314 if isempty(errormsg) 319 display([OutputFile ' written']); 320 else 321 msgbox_uvmat('ERROR',['error in writting result file: ' errormsg]) 322 display(errormsg) 315 disp([OutputFile ' written']); 316 else 317 disp(['error in writting result file: ' errormsg]) 323 318 end 324 319 end % end averaging loop
Note: See TracChangeset
for help on using the changeset viewer.