Changeset 109 for trunk/src/series


Ignore:
Timestamp:
Oct 4, 2010, 10:39:11 PM (14 years ago)
Author:
sommeria
Message:

merge_proj.m, proj_field.m: bugs repaired merging of images
plot_field.m: minor cleaning
imadoc2struct: introduce the possibility of readying the calibration point coordinates
sub_field.m:bugs repaired
geometry_calib, create_grid: introduction of new calibration methods, improvement of detect_grid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/merge_proj.m

    r106 r109  
    5959nbview=length(Series.RootFile);%number of views (file series to merge)
    6060nbfield=size(num_i1{1},1)*size(num_i1{1},2);%number of fields in the time series
    61 transform=Series.CoordType; %  field transform function
     61% transform=Series.CoordType; %  field transform function
    6262hhh=which('mmreader');
    6363for iview=1:nbview
     
    7272
    7373%Calibration data and timing: read the ImaDoc files
    74 mode=''; %default
     74% mode=''; %default
    7575timecell={};
    7676itime=0;
     
    152152
    153153% Field and velocity type (the same for all views)
     154FieldName='';
     155if strcmp(get(hseries.FieldMenu,'Visible'),'on')
    154156Field_str=get(hseries.FieldMenu,'String');
    155157val=get(hseries.FieldMenu,'Value');
     
    163165    hget_field=findobj(allchild(0),'Name','get_field');%find the get_field... GUI
    164166    SubField=get_field('read_get_field',hObject,eventdata,hget_field); %read the names of the variables to plot in the get_field GUI
     167end
    165168end
    166169%detect whether all the files are 'images' or 'netcdf'
     
    238241    if isequal(stopstate,'queue')% enable STOP command from the 'series' interface
    239242         update_waitbar(hseries.waitbar,WaitbarPos,ifile/nbfield)
    240          Amerge=0;
     243%          Amerge=0;
    241244         
    242245         %----------LOOP ON VIEWS----------------------
     
    258261                end % TODO: introduce ListVarName
    259262                npxy=size(Field{iview}.A);
     263                Field{iview}.ListVarName={'AX','AY','A'};
     264                Field{iview}.VarDimName={'AX','AY',{'AY','AX'}};
    260265                Field{iview}.AX=[0.5 npxy(2)-0.5]; % coordinates of the first and last pixel centers
    261266                Field{iview}.AY=[npxy(1)-0.5 0.5];
    262267                Field{iview}.CoordType='px';
    263268                Field{iview}.AName='image';
     269                timeread(iview)=0;
    264270            else
    265271                if testcivx
     
    287293            end
    288294            if testcivx
    289                     Field{iview}=calc_field(FieldName,Field{iview});
     295                Field{iview}=calc_field(FieldName,Field{iview});
    290296            end
    291297
     
    393399    return
    394400end
    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%
    411414%group the variables (fields of 'FieldData') in cells of variables with the same dimensions
    412415[CellVarIndex,NbDim,VarTypeCell]=find_field_indices(Data{1});
     
    414417% CellVarIndex=cells of variable index arrays
    415418ivar_new=0; % index of the current variable in the projected field
    416 icoord=0;
    417419for icell=1:length(CellVarIndex)
    418420    if NbDim(icell)==1
Note: See TracChangeset for help on using the changeset viewer.