Changeset 596


Ignore:
Timestamp:
Mar 30, 2013, 11:34:27 AM (8 years ago)
Author:
sommeria
Message:

corrections done in civ

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r595 r596  
    44484448        ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)...
    44494449        ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).FieldSmooth)...
    4450         ' -nopt ' num2str(Param.(patchname).SubdomainSize) ...
     4450        ' -nopt ' num2str(Param.(patchname).SubDomainSize) ...
    44514451        '  > ' regexprep(filename,'(.+)/(.+$)','$1/0_LOG/$2.')  lower(patchname) '.log 2>&1']; % redirect standard output to the log file
    44524452else
     
    44544454        '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)...
    44554455        ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).FieldSmooth)...
    4456         ' -nopt ' num2str(Param.(patchname).SubdomainSize)...
     4456        ' -nopt ' num2str(Param.(patchname).SubDomainSize)...
    44574457        '  > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file
    44584458    cmd=regexprep(cmd,'\\','\\\\');
  • trunk/src/civ_matlab.m

    r594 r596  
    55%   filter_tps: make interpolation-smoothing
    66%------------------------------------------------------------------------
    7 % function [Data,errormsg,result_conv]= civ_uvmat(Param,ncfile)
     7% function [Data,errormsg,result_conv]= civ_matlab(Param,ncfile)
    88%
    99%OUTPUT
     
    584584    iref=round(par_civ.Grid(ivec,1)+0.5);% xindex on the image A for the middle of the correlation box
    585585    jref=round(par_civ.ImageHeight-par_civ.Grid(ivec,2)+0.5);% yindex on the image B for the middle of the correlation box
    586     if ~(checkmask && par_civ.Mask(jref,iref)<=20) %velocity not set to zero by the black mask
    587 %         if jref-iby2<1 || jref+iby2>par_civ.ImageHeight|| iref-ibx2<1 || iref+ibx2>par_civ.ImageWidth||...
    588 %               jref+shifty(ivec)-isy2<1||jref+shifty(ivec)+isy2>par_civ.ImageHeight|| iref+shiftx(ivec)-isx2<1 || iref+shiftx(ivec)+isx2>par_civ.ImageWidth  % we are outside the image
    589 %             F(ivec)=3;
    590 %         else
    591             F(ivec)=0;
    592             subrange1_x=iref-ibx2:iref+ibx2;% x indices defining the first subimage
    593             subrange1_y=jref-iby2:jref+iby2;% y indices defining the first subimage
    594             subrange2_x=iref+shiftx(ivec)-isx2:iref+shiftx(ivec)+isx2;%x indices defining the second subimage
    595             subrange2_y=jref+shifty(ivec)-isy2:jref+shifty(ivec)+isy2;%y indices defining the second subimage
    596             image1_crop=MinA*ones(numel(subrange1_y),numel(subrange1_x));% default value=min of image A
    597             image2_crop=MinA*ones(numel(subrange2_y),numel(subrange2_x));% default value=min of image A
    598             check1_x=subrange1_x>=1 & subrange1_x<=par_civ.ImageWidth;% check which points in the subimage 1 are contained in the initial image 1
    599             check1_y=subrange1_y>=1 & subrange1_y<=par_civ.ImageHeight;
    600             check2_x=subrange2_x>=1 & subrange2_x<=par_civ.ImageWidth;% check which points in the subimage 2 are contained in the initial image 2
    601             check2_y=subrange2_y>=1 & subrange2_y<=par_civ.ImageHeight;
    602             image1_crop(check1_y,check1_x)=par_civ.ImageA(subrange1_y(check1_y),subrange1_x(check1_x));%extract a subimage (correlation box) from image A
    603             image2_crop(check2_y,check2_x)=par_civ.ImageB(subrange2_y(check2_y),subrange2_x(check2_x));%extract a larger subimage (search box) from image B
    604             image1_mean=mean(mean(image1_crop));
    605             image2_mean=mean(mean(image2_crop));
    606             %threshold on image minimum
    607             if check_MinIma && (image1_mean < par_civ.MinIma || image2_mean < par_civ.MinIma)
     586    %if ~(checkmask && par_civ.Mask(jref,iref)<=20) %velocity not set to zero by the black mask
     587    %         if jref-iby2<1 || jref+iby2>par_civ.ImageHeight|| iref-ibx2<1 || iref+ibx2>par_civ.ImageWidth||...
     588    %               jref+shifty(ivec)-isy2<1||jref+shifty(ivec)+isy2>par_civ.ImageHeight|| iref+shiftx(ivec)-isx2<1 || iref+shiftx(ivec)+isx2>par_civ.ImageWidth  % we are outside the image
     589    %             F(ivec)=3;
     590    %         else
     591    F(ivec)=0;
     592    subrange1_x=iref-ibx2:iref+ibx2;% x indices defining the first subimage
     593    subrange1_y=jref-iby2:jref+iby2;% y indices defining the first subimage
     594    subrange2_x=iref+shiftx(ivec)-isx2:iref+shiftx(ivec)+isx2;%x indices defining the second subimage
     595    subrange2_y=jref+shifty(ivec)-isy2:jref+shifty(ivec)+isy2;%y indices defining the second subimage
     596    image1_crop=MinA*ones(numel(subrange1_y),numel(subrange1_x));% default value=min of image A
     597    image2_crop=MinA*ones(numel(subrange2_y),numel(subrange2_x));% default value=min of image A
     598    check1_x=subrange1_x>=1 & subrange1_x<=par_civ.ImageWidth;% check which points in the subimage 1 are contained in the initial image 1
     599    check1_y=subrange1_y>=1 & subrange1_y<=par_civ.ImageHeight;
     600    check2_x=subrange2_x>=1 & subrange2_x<=par_civ.ImageWidth;% check which points in the subimage 2 are contained in the initial image 2
     601    check2_y=subrange2_y>=1 & subrange2_y<=par_civ.ImageHeight;
     602   
     603    image1_crop(check1_y,check1_x)=par_civ.ImageA(subrange1_y(check1_y),subrange1_x(check1_x));%extract a subimage (correlation box) from image A
     604    image2_crop(check2_y,check2_x)=par_civ.ImageB(subrange2_y(check2_y),subrange2_x(check2_x));%extract a larger subimage (search box) from image B
     605    image1_mean=mean(mean(image1_crop));
     606    image2_mean=mean(mean(image2_crop));
     607    %threshold on image minimum
     608    if check_MinIma && (image1_mean < par_civ.MinIma || image2_mean < par_civ.MinIma)
     609        F(ivec)=3;
     610    end
     611    %threshold on image maximum
     612    if check_MaxIma && (image1_mean > par_civ.MaxIma || image2_mean > par_civ.MaxIma)
     613        F(ivec)=3;
     614    end
     615    %         end
     616    if F(ivec)~=3
     617        image1_crop=image1_crop-image1_mean;%substract the mean
     618        image2_crop=image2_crop-image2_mean;
     619        if CheckDecimal
     620            xi=(1:mesh:size(image1_crop,2));
     621            yi=(1:mesh:size(image1_crop,1))';
     622            if CheckDeformation
     623                [XI,YI]=meshgrid(xi-ceil(size(image1_crop,2)/2),yi-ceil(size(image1_crop,1)/2));
     624                XIant=XI-par_civ.DUDX(ivec)*XI-par_civ.DUDY(ivec)*YI+ceil(size(image1_crop,2)/2);
     625                YIant=YI-par_civ.DVDX(ivec)*XI-par_civ.DVDY(ivec)*YI+ceil(size(image1_crop,1)/2);
     626                image1_crop=interp2(image1_crop,XIant,YIant);
     627            else
     628                image1_crop=interp2(image1_crop,xi,yi);
     629            end
     630            xi=(1:mesh:size(image2_crop,2));
     631            yi=(1:mesh:size(image2_crop,1))';
     632            image2_crop=interp2(image2_crop,xi,yi);
     633        end
     634        sum_square=sum(sum(image1_crop.*image1_crop));
     635        %reference: Oliver Pust, PIV: Direct Cross-Correlation
     636        result_conv= conv2(image2_crop,flipdim(flipdim(image1_crop,2),1),'valid');
     637        corrmax= max(max(result_conv));
     638        result_conv=(result_conv/corrmax)*255; %normalize, peak=always 255
     639        %Find the correlation max, at 255
     640        [y,x] = find(result_conv==255,1);
     641        if ~isempty(y) && ~isempty(x)
     642            try
     643                if par_civ.CorrSmooth==1
     644                    [vector,F(ivec)] = SUBPIXGAUSS (result_conv,x,y);
     645                elseif par_civ.CorrSmooth==2
     646                    [vector,F(ivec)] = SUBPIX2DGAUSS (result_conv,x,y);
     647                end
     648                utable(ivec)=vector(1)*mesh+shiftx(ivec);
     649                vtable(ivec)=vector(2)*mesh+shifty(ivec);
     650                xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2)
     651                ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge)
     652                iref=round(xtable(ivec));% image index for the middle of the vector
     653                jref=round(ytable(ivec));
     654                if checkmask && par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100
     655                    utable(ivec)=0;
     656                    vtable(ivec)=0;
     657                    F(ivec)=3;
     658                end
     659                ctable(ivec)=corrmax/sum_square;% correlation value
     660            catch ME
    608661                F(ivec)=3;
    609662            end
    610             %threshold on image maximum
    611             if check_MaxIma && (image1_mean > par_civ.MaxIma || image2_mean > par_civ.MaxIma)
    612                 F(ivec)=3;
    613             end
    614 %         end     
    615         if F(ivec)~=3
    616             image1_crop=image1_crop-image1_mean;%substract the mean
    617             image2_crop=image2_crop-image2_mean;
    618             if CheckDecimal
    619                 xi=(1:mesh:size(image1_crop,2));
    620                 yi=(1:mesh:size(image1_crop,1))';
    621                 if CheckDeformation
    622                     [XI,YI]=meshgrid(xi-ceil(size(image1_crop,2)/2),yi-ceil(size(image1_crop,1)/2));
    623                     XIant=XI-par_civ.DUDX(ivec)*XI-par_civ.DUDY(ivec)*YI+ceil(size(image1_crop,2)/2);
    624                     YIant=YI-par_civ.DVDX(ivec)*XI-par_civ.DVDY(ivec)*YI+ceil(size(image1_crop,1)/2);
    625                     image1_crop=interp2(image1_crop,XIant,YIant);
    626                 else
    627                     image1_crop=interp2(image1_crop,xi,yi);
    628                 end
    629                 xi=(1:mesh:size(image2_crop,2));
    630                 yi=(1:mesh:size(image2_crop,1))';
    631                 image2_crop=interp2(image2_crop,xi,yi);
    632             end
    633             sum_square=sum(sum(image1_crop.*image1_crop));
    634             %reference: Oliver Pust, PIV: Direct Cross-Correlation
    635             result_conv= conv2(image2_crop,flipdim(flipdim(image1_crop,2),1),'valid');
    636             corrmax= max(max(result_conv));
    637             result_conv=(result_conv/corrmax)*255; %normalize, peak=always 255
    638             %Find the correlation max, at 255
    639             [y,x] = find(result_conv==255,1);
    640             if ~isempty(y) && ~isempty(x)
    641                 try
    642                     if par_civ.CorrSmooth==1
    643                         [vector,F(ivec)] = SUBPIXGAUSS (result_conv,x,y);
    644                     elseif par_civ.CorrSmooth==2
    645                         [vector,F(ivec)] = SUBPIX2DGAUSS (result_conv,x,y);
    646                     end
    647                     utable(ivec)=vector(1)*mesh+shiftx(ivec);
    648                     vtable(ivec)=vector(2)*mesh+shifty(ivec);                 
    649                     xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2)
    650                     ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge)
    651                     iref=round(xtable(ivec));% image index for the middle of the vector
    652                     jref=round(ytable(ivec));
    653                     if checkmask && par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100
    654                         utable(ivec)=0;
    655                         vtable(ivec)=0;
    656                         F(ivec)=3;
    657                     end
    658                     ctable(ivec)=corrmax/sum_square;% correlation value
    659                 catch ME
    660                     F(ivec)=3;
    661                 end
    662             else
    663                 F(ivec)=3;
    664             end
    665         end
    666     end
    667    
    668     %Create the vector matrix x, y, u, v
     663        else
     664            F(ivec)=3;
     665        end
     666    end
    669667end
    670668result_conv=result_conv*corrmax/(255*sum_square);% keep the last correlation matrix for output
  • trunk/src/get_field.m

    r591 r596  
    10421042delete(handles.get_field)
    10431043
    1044 
    1045 
    1046 % %------------------------------------------------------------------------
    1047 % function mouse_up_gui(ggg,eventdata,handles)
    1048 % %------------------------------------------------------------------------
    1049 % if isequal(get(ggg,'SelectionType'),'alt')
    1050 %     message=''; 
    1051 %     global CurData
    1052 %     inputfield=get(handles.inputfile,'String');
    1053 %     if exist(inputfield,'file')
    1054 %         CurData=nc2struct(inputfield);
    1055 %     else
    1056 %         CurData=get(ggg,'UserData');% get_field opened from a input field, not a file
    1057 %     end
    1058 %   %%%% TODO: put the matalb command window in front
    1059 %     evalin('base','global CurData')%make CurData global in the workspace
    1060 %     evalin('base','CurData') %display CurData in the workspace
    1061 % end
    1062 
    1063 %------------------------------------------------------------------------
    1064 % --- Executes on selection change in ACTION.
    1065 %------------------------------------------------------------------------
    1066 function ACTION_Callback(hObject, eventdata, handles)
    1067 global nb_builtin
    1068 list_ACTION=get(handles.ACTION,'String');% list menu fields
    1069 index_ACTION=get(handles.ACTION,'Value');% selected string index
    1070 ACTION= list_ACTION{index_ACTION}; % selected string
    1071 list_func_handles=get(handles.ACTION,'UserData');% get list of function handles (full address of the function, including name and path)
    1072 ff=functions(list_func_handles{end});
    1073 % add a new function to the menu
    1074 if isequal(ACTION,'more...')
    1075     [FileName, PathName] = uigetfile( ...
    1076        {'*.m', ' (*.m)';
    1077         '*.m',  '.m files '; ...
    1078         '*.*', 'All Files (*.*)'}, ...
    1079         'Pick a file',ff.file);
    1080     if length(FileName)<2
    1081         return
    1082     end
    1083     [pp,ACTION,ext_fct]=fileparts(FileName);
    1084     if ~isequal(ext_fct,'.m')
    1085         msgbox_uvmat('ERROR','a Matlab function .m must be introduced');
    1086         return
    1087     end
    1088 
    1089     % insert the choice in the action menu
    1090    menu_str=update_menu(handles.ACTION,ACTION);%new action menu in which the new item has been appended if needed
    1091    index_ACTION=get(handles.ACTION,'Value');% currently selected index in the list
    1092    addpath(PathName)
    1093    list_func_handles{index_ACTION}=str2func(ACTION);% create the function handle corresponding to the newly seleced function
    1094    set(handles.ACTION,'UserData',list_func_handles)
    1095    set(handles.path_action,'enable','inactive')% indicate that the current path is accessible (not 'off')
    1096    %list_path{index_ACTION}=PathName;
    1097    if length(menu_str)>nb_builtin+5;
    1098        nbremove=length(menu_str)-nb_builtin-5;
    1099        menu_str(nb_builtin+1:end-5)=[];
    1100        list_func_handles(nb_builtin+1:end-4)=[];
    1101        index_ACTION=index_ACTION-nbremove;
    1102        set(handles.ACTION,'Value',index_ACTION)
    1103        set(handles.ACTION,'String',menu_str)
    1104    end   
    1105    %record the current menu in personal file profil_perso
    1106    dir_perso=prefdir;
    1107    profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    1108    get_field_fct={};
    1109    for ilist=nb_builtin+1:length(menu_str)-1
    1110        ff=functions(list_func_handles{ilist});
    1111        get_field_fct{ilist-nb_builtin}=ff.file;
    1112    end
    1113    if exist(profil_perso,'file')
    1114         save(profil_perso,'get_field_fct','-append')
    1115    else
    1116      txt=ver('MATLAB');
    1117     Release=txt.Release;
    1118        relnumb=str2num(Release(3:4));
    1119         if relnumb >= 14
    1120             save(profil_perso,'get_field_fct','-V6')
    1121         else
    1122             save(profil_perso, 'get_field_fct')
    1123         end
    1124    end
    1125 end
    1126 
    1127 %check the current path to the selected function
    1128 h_fun=list_func_handles{index_ACTION};
    1129 if isa(h_fun,'function_handle')
    1130     func=functions(h_fun);
    1131     set(handles.path_action,'String',fileparts(func.file)); %show the path to the senlected function
    1132     GUI_input=h_fun();%handles.figure1 =handles of the GUI get_field
    1133 else
    1134     set(handles.path_action,'String','')
    1135     msgbox_uvmat('ERROR','unknown path to ACTION function, reload it')
    1136     return
    1137 end
    1138 
    1139 %prepare the GUI options for the selected ACTION
    1140 test_1Dplot=0;
    1141 test_scalar=0;
    1142 test_vector=0;
    1143 if iscell(GUI_input)
    1144     for ilist=1:size(GUI_input,1)
    1145         switch GUI_input{ilist,1}
    1146                            %RootFile always visible
    1147             case 'CheckPlot1D'   
    1148                  test_1Dplot=isequal(GUI_input{ilist,2},'on');
    1149             case 'CheckScalar'
    1150                  test_scalar=isequal(GUI_input{ilist,2},'on');   
    1151             case 'CheckVector'   
    1152                  test_vector=isequal(GUI_input{ilist,2},'on');
    1153         end
    1154     end
    1155 end
    1156 set(handles.CheckPlot1D,'Value',test_1Dplot);
    1157 set(handles.CheckScalar,'Value',test_scalar);
    1158 set(handles.CheckVector,'Value',test_vector);
    1159 CheckPlot1D_Callback(hObject, eventdata, handles)
    1160 CheckScalar_Callback(hObject, eventdata, handles)
    1161 CheckVector_Callback(hObject, eventdata, handles)
    1162 
    1163 
    1164 %-----------------------------------------------------
    1165 % --- browse existing figures
    1166 %-----------------------------------------------------
    1167 function browse_fig(menu_handle)
    1168 hh=findobj(allchild(0),'Type','figure');
    1169 ilist=0;
    1170 list={};
    1171 for ifig=1:length(hh)  %look for all existing figures
    1172     name=get(hh(ifig),'Name');
    1173      if ~strcmp(name,'uvmat')&& ~strcmp(name,'view_field') %case of uvmat GUI
    1174         hchild=get(hh(ifig),'children');% look for axes contained in each figure
    1175         nbaxe=0;
    1176         for ichild=1:length(hchild)           
    1177             Type=get(hchild(ichild),'Type');
    1178             Tag=get(hchild(ichild),'Tag');
    1179             if isequal(Type,'axes')
    1180                 if ~isequal(Tag,'Colorbar')& ~isequal(Tag,'legend')% don't select colorbars for plotting
    1181                      nbaxe=nbaxe+1;%count the existing axis
    1182                 end
    1183             end
    1184         end   
    1185         if nbaxe==1
    1186              ilist=ilist+1;%add a line in the list of axis
    1187             list{ilist,1}=num2str(hh(ifig));
    1188         elseif nbaxe>1
    1189             for iaxe=1:nbaxe
    1190                ilist=ilist+1;%add a line in the list of axis
    1191                list{ilist,1}=[num2str(hh(ifig)) '_' num2str(iaxe)];
    1192             end
    1193         end
    1194      end
    1195 end
    1196 list=['uvmat';list];
    1197 set(menu_handle,'Value',1)
    1198 set(menu_handle,'String',list)
    1199 
    1200 
    1201 %-----------------------------------------------------
    1202 function list_fig_Callback(hObject, eventdata, handles)
    1203 %-----------------------------------------------------
    1204 list_fig=get(handles.list_fig,'String');
    1205 fig_val=get(handles.list_fig,'Value');
    1206 plot_fig=list_fig{fig_val};
    1207 if strcmp(plot_fig,'view_field')
    1208 %     huvmat=findobj(allchild(0),'name','uvmat');
    1209 %     if ~isempty(huvmat)
    1210 %         uistack(huvmat,'top')
    1211 %     end   
    1212 else%if ~isequal(plot_fig,'new fig...') & ~isequal(plot_fig,'uvmat')
    1213     sep=regexp(plot_fig,'_');
    1214     if ~isempty(sep)
    1215         plot_fig=plot_fig([1:sep-1]);
    1216     end
    1217     if ishandle(str2num(plot_fig))
    1218         figure(str2num(plot_fig))% display existing figure
    1219     else
    1220         browse_fig(handles.list_fig); %reset the current list of figures
    1221     end
    1222 end
    12231044
    12241045
  • trunk/src/series.m

    r595 r596  
    873873switch FileType
    874874    case {'civx','civdata'}
    875         [FieldList,ColorList]=calc_field;
     875        [FieldList,ColorList]=set_field_list('U','V','C');
    876876        set(handles.FieldName,'String',[{'image'};FieldList;{'get_field...'}]);%standard menu for civx data
    877877        set(handles.FieldName,'Value',2) % set menu to 'velocity
     
    22972297function MenuExportConfig_Callback(hObject, eventdata, handles)
    22982298global Series
    2299 [tild,Series,errormsg]=prepare_jobs(handles);
    2300 % Series=read_GUI(handles.series);
     2299[Series,errormsg]=prepare_jobs(handles);
    23012300
    23022301evalin('base','global Series')%make CurData global in the workspace
  • trunk/src/series/aver_stat.m

    r595 r596  
    55%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
    66%
    7 % This function is used in four modes by the GUI series:
    8 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    9 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    10 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    11 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    12 %
    13 % This function is used in four modes by the GUI series:
    14 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    15 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    16 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    17 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    18 %
    197%OUTPUT
    20 % GUI_input=list of options in the GUI series.fig needed for the function
     8% ParamOut: sets options in the GUI series.fig needed for the function
    219%
    2210%INPUT:
    2311% In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series.
    2412% In batch mode, Param is the name of the corresponding xml file containing the same information
    25 % In the absence of input (as activated when the current Action is selected
    26 % in series), the function ouput GUI_input set the activation of the needed GUI elements
     13% when Param.Action.RUN=0 (as activated when the current Action is selected
     14% in series), the function ouput paramOut set the activation of the needed GUI elements
    2715%
    28 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param)
     16% Param contains the elements:(use the menu bar command 'export/GUI config' in series to
     17% see the current structure Param)
    2918%    .InputTable: cell of input file names, (several lines for multiple input)
    3019%                      each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension}
     
    3322%    .Action: .ActionName: name of the current activated function
    3423%             .ActionPath:   path of the current activated function
     24%             .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled   Matlab fct
     25%             .RUN =0 for GUI input, =1 for function activation
     26%             .RunMode='local','background', 'cluster': type of function  use
     27%             
    3528%    .IndexRange: set the file or frame indices on which the action must be performed
    3629%    .FieldTransform: .TransformName: name of the selected transform function
    3730%                     .TransformPath:   path  of the selected transform function
    38 %                     .TransformHandle: corresponding function handle
    3931%    .InputFields: sub structure describing the input fields withfields
    40 %              .FieldName: name of the field
     32%              .FieldName: name(s) of the field
    4133%              .VelType: velocity type
    4234%              .FieldName_1: name of the second field in case of two input series
    4335%              .VelType_1: velocity type of the second field in case of two input series
     36%              .Coord_y: name of y coordinate variable
     37%              .Coord_x: name of x coordinate variable
    4438%    .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object)
    4539%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • trunk/src/series/merge_proj.m

    r595 r596  
    33% function ParamOut=merge_proj(Param)
    44%------------------------------------------------------------------------
    5 
    65%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
    76%
    8 % This function is used in four modes by the GUI series:
    9 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    10 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    11 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    12 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    13 %
    14 % This function is used in four modes by the GUI series:
    15 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    16 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    17 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    18 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    19 %
    207%OUTPUT
    21 % GUI_input=list of options in the GUI series.fig needed for the function
     8% ParamOut: sets options in the GUI series.fig needed for the function
    229%
    2310%INPUT:
    2411% In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series.
    2512% In batch mode, Param is the name of the corresponding xml file containing the same information
    26 % In the absence of input (as activated when the current Action is selected
    27 % in series), the function ouput GUI_input set the activation of the needed GUI elements
     13% when Param.Action.RUN=0 (as activated when the current Action is selected
     14% in series), the function ouput paramOut set the activation of the needed GUI elements
    2815%
    29 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param)
     16% Param contains the elements:(use the menu bar command 'export/GUI config' in series to
     17% see the current structure Param)
    3018%    .InputTable: cell of input file names, (several lines for multiple input)
    3119%                      each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension}
     
    3422%    .Action: .ActionName: name of the current activated function
    3523%             .ActionPath:   path of the current activated function
     24%             .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled   Matlab fct
     25%             .RUN =0 for GUI input, =1 for function activation
     26%             .RunMode='local','background', 'cluster': type of function  use
     27%             
    3628%    .IndexRange: set the file or frame indices on which the action must be performed
    3729%    .FieldTransform: .TransformName: name of the selected transform function
    3830%                     .TransformPath:   path  of the selected transform function
    39 %                     .TransformHandle: corresponding function handle
    4031%    .InputFields: sub structure describing the input fields withfields
    41 %              .FieldName: name of the field
     32%              .FieldName: name(s) of the field
    4233%              .VelType: velocity type
    4334%              .FieldName_1: name of the second field in case of two input series
    4435%              .VelType_1: velocity type of the second field in case of two input series
     36%              .Coord_y: name of y coordinate variable
     37%              .Coord_x: name of x coordinate variable
    4538%    .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object)
    4639%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • trunk/src/series/sub_background.m

    r592 r596  
    1818%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
    1919%
    20 % This function is used in four modes by the GUI series:
    21 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    22 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    23 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    24 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    25 %
    2620%OUTPUT
    27 % GUI_series_config=list of options in the GUI series.fig needed for the function
     21% ParamOut: sets options in the GUI series.fig needed for the function
    2822%
    2923%INPUT:
    3024% In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series.
    3125% In batch mode, Param is the name of the corresponding xml file containing the same information
    32 % In the absence of input (as activated when the current Action is selected
    33 % in series), the function ouput GUI_series_config set the activation of the needed GUI elements
     26% when Param.Action.RUN=0 (as activated when the current Action is selected
     27% in series), the function ouput paramOut set the activation of the needed GUI elements
    3428%
    35 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param)
     29% Param contains the elements:(use the menu bar command 'export/GUI config' in series to
     30% see the current structure Param)
    3631%    .InputTable: cell of input file names, (several lines for multiple input)
    3732%                      each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension}
    3833%    .OutputSubDir: name of the subdirectory for data outputs
    39 %    .OutputDirExt: extension for the directory for data outputs
     34%    .OutputDirExt: directory extension for data outputs
    4035%    .Action: .ActionName: name of the current activated function
    4136%             .ActionPath:   path of the current activated function
     37%             .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled   Matlab fct
     38%             .RUN =0 for GUI input, =1 for function activation
     39%             .RunMode='local','background', 'cluster': type of function  use
     40%             
    4241%    .IndexRange: set the file or frame indices on which the action must be performed
    4342%    .FieldTransform: .TransformName: name of the selected transform function
    4443%                     .TransformPath:   path  of the selected transform function
    45 %                     .TransformHandle: corresponding function handle
    4644%    .InputFields: sub structure describing the input fields withfields
    47 %              .FieldName: name of the field
     45%              .FieldName: name(s) of the field
    4846%              .VelType: velocity type
    4947%              .FieldName_1: name of the second field in case of two input series
    5048%              .VelType_1: velocity type of the second field in case of two input series
     49%              .Coord_y: name of y coordinate variable
     50%              .Coord_x: name of x coordinate variable
    5151%    .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object)
    5252%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    53 
    54    
     53   
    5554function ParamOut=sub_background (Param)
    5655
  • trunk/src/series/time_series.m

    r592 r596  
    66%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
    77%
    8 % This function is used in four modes by the GUI series:
    9 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    10 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    11 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    12 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    13 %
    14 % This function is used in four modes by the GUI series:
    15 %           1) config GUI: with no input argument, the function determine the suitable GUI configuration
    16 %           2) interactive input: the function is used to interactively introduce input parameters, and then stops
    17 %           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
    18 %           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
    19 %
    208%OUTPUT
    21 % GUI_input=list of options in the GUI series.fig needed for the function
     9% ParamOut: sets options in the GUI series.fig needed for the function
    2210%
    2311%INPUT:
    2412% In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series.
    2513% In batch mode, Param is the name of the corresponding xml file containing the same information
    26 % In the absence of input (as activated when the current Action is selected
    27 % in series), the function ouput GUI_input set the activation of the needed GUI elements
     14% when Param.Action.RUN=0 (as activated when the current Action is selected
     15% in series), the function ouput paramOut set the activation of the needed GUI elements
    2816%
    29 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param)
     17% Param contains the elements:(use the menu bar command 'export/GUI config' in series to
     18% see the current structure Param)
    3019%    .InputTable: cell of input file names, (several lines for multiple input)
    3120%                      each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension}
     
    3423%    .Action: .ActionName: name of the current activated function
    3524%             .ActionPath:   path of the current activated function
     25%             .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled   Matlab fct
     26%             .RUN =0 for GUI input, =1 for function activation
     27%             .RunMode='local','background', 'cluster': type of function  use
     28%             
    3629%    .IndexRange: set the file or frame indices on which the action must be performed
    3730%    .FieldTransform: .TransformName: name of the selected transform function
    3831%                     .TransformPath:   path  of the selected transform function
    39 %                     .TransformHandle: corresponding function handle
    4032%    .InputFields: sub structure describing the input fields withfields
    41 %              .FieldName: name of the field
     33%              .FieldName: name(s) of the field
    4234%              .VelType: velocity type
    4335%              .FieldName_1: name of the second field in case of two input series
    4436%              .VelType_1: velocity type of the second field in case of two input series
     37%              .Coord_y: name of y coordinate variable
     38%              .Coord_x: name of x coordinate variable
    4539%    .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object)
    4640%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    47 %
     41
    4842function ParamOut=time_series(Param)
    4943
  • trunk/src/uvmat.m

    r595 r596  
    26022602    set(handles.ListObject_1,'Visible','off')
    26032603    [PlotType,PlotParamOut]=plot_field(UvData.Field,handles.PlotAxes,read_GUI(handles.uvmat));
    2604     errormsg=fill_GUI(PlotParamOut,handles.uvmat);
    2605     %write_plot_param(handles,PlotParamOut) %update the auto plot parameters
     2604    %errormsg=fill_GUI(PlotParamOut,handles.uvmat);
     2605    write_plot_param(handles,PlotParamOut) %update the auto plot parameters
    26062606   
    26072607%% 2D or 3D fieldname are generally projected
     
    27132713                errormsg=fill_GUI(PlotParamOut,handles.uvmat);
    27142714                else
    2715                     errormsg=fill_GUI(PlotParamOut,hview_field);
     2715                    errormsg=fill_GUI(PlotParamOut,view_field_handle);
    27162716                end
    27172717                %write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters
Note: See TracChangeset for help on using the changeset viewer.