Changeset 317 for trunk/src


Ignore:
Timestamp:
Dec 5, 2011, 7:48:37 PM (13 years ago)
Author:
sommeria
Message:

bug repaired in name2display (names in _000001) and civ.m

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r316 r317  
    2323%TODO: search range
    2424
    25 % Last Modified by GUIDE v2.5 04-Dec-2011 08:42:47
     25% Last Modified by GUIDE v2.5 04-Dec-2011 18:52:13
    2626% Begin initialization code - DO NOT EDIT
    2727gui_Singleton = 1;
     
    43404340civ2.pixcmy='1';
    43414341civ2.convectFlow='n';
     4342
     4343
     4344% --- Executes on button press in TestPatch1.
     4345function TestPatch1_Callback(hObject, eventdata, handles)
     4346set(handles.TestPatch1,'BackgroundColor',[1 1 0])
     4347drawnow
     4348if get(handles.TestPatch1,'Value')
     4349    ref_i=str2double(get(handles.ref_i,'String'));
     4350    if strcmp(get(handles.ref_j,'Visible'),'on')
     4351        ref_j=str2double(get(handles.ref_j,'String'));
     4352    else
     4353        ref_j=1;%default
     4354    end
     4355    [filecell,i1,i21,j1,j2,i1_civ2,i2_civ2,j1_civ2,j2_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=...
     4356        set_civ_filenames(handles,ref_i,ref_j,[0 0 1 0 0 0]);
     4357   
     4358    Data.ListVarName={'ny','nx','A'};
     4359    Data.VarDimName= {'ny','nx',{'ny','nx'}};
     4360
     4361    Param=read_GUI(handles.civ)
     4362    Param.CheckOutputFile=0;
     4363    [Data,errormsg]=civ_matlab(Param,filecell.nc.civ1{1})% get the grid of x, y positions set for PIV
     4364    if ~isempty(errormsg)
     4365        msgbox_uvmat('ERROR',Data.Txt)
     4366        return
     4367    end
     4368    set(handles.TestCiv1,'BackgroundColor',[1 0 0])
     4369else
     4370    corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display
     4371    if ~isempty(corrfig)
     4372        delete(corrfig)
     4373    end
     4374    hview_field=findobj(allchild(0),'tag','view_field');% look for view_field   
     4375    if ~isempty(hview_field)
     4376        delete(hview_field)
     4377    end
     4378end
     4379
  • trunk/src/civ_matlab.m

    r316 r317  
    7979
    8080else
    81     Data=nc2struct(ncfile,'ListGlobalAttribute','absolut_time_T0'); %look for the constant 'absolut_time_T0' to detect old civx data format
     81    Data=nc2struct(ncfile,'ListGlobalAttribute','absolut_time_T0') %look for the constant 'absolut_time_T0' to detect old civx data format
     82    if isfield(Data,'Txt')
     83            errormsg=Data.Txt;
     84        return
     85    end
    8286    if ~isempty(Data.absolut_time_T0')%read civx file
    8387        check_civx=1;% test for old civx data format
     
    9094        end
    9195    end
    92     if isfield(Data,'Txt')
    93         msgbox_uvmat('ERROR',Data.Txt)
    94         return
    95     end
     96
    9697end
    9798
     
    295296
    296297%% write result in a netcdf file if requested
    297 if exist('ncfile','var')
     298if exist('ncfile','var') && ~(isfield(Param,'CheckOuputFile')&&Param.CheckOuputFile)
    298299    errormsg=struct2nc(ncfile,Data);
    299300end
     
    413414
    414415%% compute image correlations: MAINLOOP on velocity vectors
    415 % corrmax=0;
    416 % sum_square=1;% default
     416corrmax=0;
     417sum_square=1;% default
    417418% vector=[0 0];%default
    418419for ivec=1:nbvec
  • trunk/src/name2display.m

    r293 r317  
    184184
    185185%resolve ambigous nomenclature types when the number of 0 is unknown (type %0...):
    186 ind_zero=findstr('0',nom_type);
    187 nb_zero=numel(ind_zero);
    188 if ~isempty(ind_zero)
    189     for itest=0:nb_zero-1
    190         filename=name_generator(fullfile(RootPath,RootFile),1,1,ext,nom_type,1,1,1,subdir);
    191         if exist(filename,'file')
    192             break
    193         else
    194             nom_type(ind_zero(1))=[]; % remove a zero in nom_type
    195         end
    196     end
    197 end
     186% ind_zero=findstr('0',nom_type);
     187% nb_zero=numel(ind_zero);
     188% if ~isempty(ind_zero)
     189%     for itest=0:nb_zero-1
     190%         filename=name_generator(fullfile(RootPath,RootFile),1,1,ext,nom_type,1,1,1,subdir)
     191%         if exist(filename,'file')
     192%             break
     193%         else
     194%             nom_type(ind_zero(1))=[]; % remove a zero in nom_type
     195%         end
     196%     end
     197% end
Note: See TracChangeset for help on using the changeset viewer.