Changeset 275 for trunk


Ignore:
Timestamp:
Nov 18, 2011, 1:18:08 AM (13 years ago)
Author:
sommeria
Message:

further cleaning after new GUI civ

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r274 r275  
    246246end
    247247
    248 
    249 %TESTS
    250 
    251 
    252 struct=read_panel(handles.panel_Patch2)
    253 
    254248%------------------------------------------------------------------------
    255249% --- Outputs from this function are returned to the command line.
     
    737731    end
    738732    first_i=max(field_i,1);
    739     nom_type_search
    740733    if numel(regexp(nom_type_search,'\D'))>=1%two indices i and j
    741734        field_i=browse.num_i1;
     
    10261019set(gcf,'Pointer','watch')
    10271020%nomenclature types
    1028 'TESTpair'
    10291021filebase=get(handles.RootName,'String');
    10301022[filepath,Nme,ext_dir]=fileparts(filebase);
     
    11081100    % case of no displayed pair
    11091101    if isequal(select,zeros(size(1:nbpair)))
    1110         'TESTzero'
    1111         browse
    11121102        if isfield(browse,'incr_pair') && ~isequal(browse.incr_pair,[0 0])
    11131103            num_i1=ref_i-floor(browse.incr_pair(1)/2);
     
    12141204    mode='displacement';
    12151205else
    1216     mode_list=get(handles.CivMode,'String')
     1206    mode_list=get(handles.CivMode,'String');
    12171207    if isempty(mode_list)
    12181208        msgbox_uvmat('ERROR','please enter an input image or netcdf file')
    12191209        return
    12201210    end
    1221     mode_value=get(handles.CivMode,'Value')
     1211    mode_value=get(handles.CivMode,'Value');
    12221212    mode=mode_list{mode_value};
    12231213end
     
    16771667%% get fix1 parameters
    16781668if box_test(2)
    1679     param.fix1=read_param_fix1(handles,filecell)
     1669    param.fix1=read_param_fix1(handles,filecell);
    16801670end
    16811671
     
    17101700if box_test(6)==1
    17111701    param.Patch2=read_panel(handles.panel_Patch1);
    1712 %     rho_patch2=str2double(get(handles.num_SmoothParam,'String'));
    1713 %     if isnan(rho_patch2)
    1714 %         rho_patch2='1000';
    1715 %         set(handles.num_SmoothParam,'String','1')
    1716 %     else
    1717 %         rho_patch2=num2str(1000*rho_patch2);
    1718 %     end
    1719 %     nx_patch2=get(handles.num_Nx,'String');
    1720 %     ny_patch2=get(handles.num_Ny,'String');
    1721 %     if isnan(str2double(nx_patch2))
    1722 %         nx_patch2='50' ;%default
    1723 %         set(handles.num_Nx,'String','50');
    1724 %     end
    1725 %     if isnan(str2double(ny_patch2))
    1726 %         ny_patch2='50' ;%default
    1727 %         set(handles.num_Ny,'String','50');
    1728 %     end
    1729 %     subdomain_patch2=get(handles.num_SubdomainSize,'String');
    1730 %     thresh_patch2=get(handles.num_MaxDiff,'String');
    17311702end
    17321703
     
    19811952            switch CivMode
    19821953                case 'CivX'
    1983                     cmd_CIV2=CIV2_CMD(filecell.nc.civ2{ifile,j},[],param);%creates the cmx file [fullfile(Rootbat,Filebat) '.civ2.cmx]
     1954                    cmd_CIV2=CIV2_CMD(filecell.nc.civ2{ifile,j},param);%creates the cmx file [fullfile(Rootbat,Filebat) '.civ2.cmx]
    19841955                    cmd=[cmd cmd_CIV2 '\n'];
    19851956                case 'CivAll'
     
    20472018            switch CivMode
    20482019                case 'CivX'
    2049                     cmd_PATCH=cmd_path(filecell.nc.civ2{ifile,j},param);
     2020                    cmd_PATCH=cmd_patch(filecell.nc.civ2{ifile,j},param.Patch2,param.global.PatchBin);
    20502021                    cmd=[cmd cmd_PATCH '\n'];
    20512022                case 'CivAll'
     
    28682839                        end
    28692840                    elseif box_test(3)==0; %check the existence of patch if it is not calculated
    2870                         Data=nc2struct(filename,'ListGlobalAttribute','CivStage','patch')
     2841                        Data=nc2struct(filename,'ListGlobalAttribute','CivStage','patch');
    28712842                        if ~isempty(Data.CivStage)
    28722843                            if Data.CivStage<3 %test for civ files
     
    32233194        ' -n ' num2str(Param.Ny) ' -ro ' num2str(Param.SmoothingParam)...
    32243195        ' -nopt ' num2str(Param.SubdomainSize) ...
    3225         '  > ' namelog ' 2>&1'] % redirect standard output to the log file
     3196        '  > ' namelog ' 2>&1']; % redirect standard output to the log file
    32263197    else
    32273198      cmd=['"' param.global.PatchBin...
     
    34503421function get_mask_civ1_Callback(hObject, eventdata, handles)
    34513422%------------------------------------------------------------------------
    3452 maskval=get(handles.get_mask_civ1,'Value')
     3423maskval=get(handles.get_mask_civ1,'Value');
    34533424if isequal(maskval,0)
    34543425    set(handles.mask_civ1,'String','')
     
    43994370%changes : filename_cmx -> filename ( no extension )
    44004371
    4401 filename=regexprep(filename,'.nc','')
     4372filename=regexprep(filename,'.nc','');
    44024373
    44034374if isequal(param.civ1.Dt,'0')
     
    45054476%pixels per cm and matrix of the image times, read from the .civ file by uvmat
    45064477%global CivBin%name of the executable for civ1 calculation
     4478
    45074479filename=regexprep(filename,'.nc','');
    45084480
     
    45584530%pixels per cm and matrix of the image times, read from the .civ file by uvmat
    45594531% global civ2Bin sge%name of the executable for civ1 calculation
    4560 if isequal(par.Dt,'0')
     4532filename=regexprep(filename,'.nc','');
     4533if isequal(param.civ2.Dt,'0')
    45614534    param.civ2.Dt='1' ;%case of 'displacement' mode
    45624535end
     
    47224695    sizf=size(fileinput);
    47234696    if (~ischar(fileinput)||~isequal(sizf(1),1)),return;end %stop if fileinput not a character string
    4724     [path,name,ext]=fileparts(fileinput)
     4697    [path,name,ext]=fileparts(fileinput);
    47254698    [path1]=fileparts(filebase);
    47264699    if isunix
     
    53345307    end
    53355308    if check_input
    5336         key
    53375309        eval(['struct.' key '=input;'])
    53385310    end
Note: See TracChangeset for help on using the changeset viewer.