Changeset 109 for trunk/src/series
- Timestamp:
- Oct 4, 2010, 10:39:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/merge_proj.m
r106 r109 59 59 nbview=length(Series.RootFile);%number of views (file series to merge) 60 60 nbfield=size(num_i1{1},1)*size(num_i1{1},2);%number of fields in the time series 61 transform=Series.CoordType; % field transform function61 % transform=Series.CoordType; % field transform function 62 62 hhh=which('mmreader'); 63 63 for iview=1:nbview … … 72 72 73 73 %Calibration data and timing: read the ImaDoc files 74 mode=''; %default74 % mode=''; %default 75 75 timecell={}; 76 76 itime=0; … … 152 152 153 153 % Field and velocity type (the same for all views) 154 FieldName=''; 155 if strcmp(get(hseries.FieldMenu,'Visible'),'on') 154 156 Field_str=get(hseries.FieldMenu,'String'); 155 157 val=get(hseries.FieldMenu,'Value'); … … 163 165 hget_field=findobj(allchild(0),'Name','get_field');%find the get_field... GUI 164 166 SubField=get_field('read_get_field',hObject,eventdata,hget_field); %read the names of the variables to plot in the get_field GUI 167 end 165 168 end 166 169 %detect whether all the files are 'images' or 'netcdf' … … 238 241 if isequal(stopstate,'queue')% enable STOP command from the 'series' interface 239 242 update_waitbar(hseries.waitbar,WaitbarPos,ifile/nbfield) 240 Amerge=0;243 % Amerge=0; 241 244 242 245 %----------LOOP ON VIEWS---------------------- … … 258 261 end % TODO: introduce ListVarName 259 262 npxy=size(Field{iview}.A); 263 Field{iview}.ListVarName={'AX','AY','A'}; 264 Field{iview}.VarDimName={'AX','AY',{'AY','AX'}}; 260 265 Field{iview}.AX=[0.5 npxy(2)-0.5]; % coordinates of the first and last pixel centers 261 266 Field{iview}.AY=[npxy(1)-0.5 0.5]; 262 267 Field{iview}.CoordType='px'; 263 268 Field{iview}.AName='image'; 269 timeread(iview)=0; 264 270 else 265 271 if testcivx … … 287 293 end 288 294 if testcivx 289 295 Field{iview}=calc_field(FieldName,Field{iview}); 290 296 end 291 297 … … 393 399 return 394 400 end 395 for iview=1:nbview 396 if ~isequal(MergeData.ListDimName,Data{iview}.ListDimName) 397 error=1; 398 end 399 if ~isequal(MergeData.ListVarName,Data{iview}.ListVarName) 400 error=1; 401 end 402 end 403 if error 404 MergeData.Txt='ERROR: attempt at merging fields of incompatible type'; 405 return 406 end 407 408 409 410 401 % for iview=1:nbview 402 % if ~isequal(MergeData.ListDimName,Data{iview}.ListDimName) 403 % error=1; 404 % end 405 % if ~isequal(MergeData.ListVarName,Data{iview}.ListVarName) 406 % error=1; 407 % end 408 % end 409 % if error 410 % MergeData.Txt='ERROR: attempt at merging fields of incompatible type'; 411 % return 412 % end 413 % 411 414 %group the variables (fields of 'FieldData') in cells of variables with the same dimensions 412 415 [CellVarIndex,NbDim,VarTypeCell]=find_field_indices(Data{1}); … … 414 417 % CellVarIndex=cells of variable index arrays 415 418 ivar_new=0; % index of the current variable in the projected field 416 icoord=0;417 419 for icell=1:length(CellVarIndex) 418 420 if NbDim(icell)==1
Note: See TracChangeset
for help on using the changeset viewer.