Changeset 911 for trunk/src


Ignore:
Timestamp:
Jun 15, 2015, 10:45:43 PM (9 years ago)
Author:
sommeria
Message:

bug repaired in civ_series (mask problem) and clarification of output for OAR in series

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r908 r911  
    244244
    245245%% put the GUI on the lower right of the sceen
    246 set(hObject,'Unit','pixel')
    247 pos_view_field=get(hObject,'Position');
     246set(hObject,'Unit','pixels')
     247%pos_view_field=get(hObject,'Position');
    248248set(0,'Unit','pixels')
    249249ScreenSize=get(0,'ScreenSize');
     250pos_view_field(3:4)=[955 648];
    250251pos_view_field(1)=ScreenSize(1)+ScreenSize(3)-pos_view_field(3);
    251252pos_view_field(2)=ScreenSize(2);
  • trunk/src/series.m

    r910 r911  
    19161916        %create subdirectory for oar command and log files
    19171917        %DirOARLog=fullfile(OutputDir,'0_LOG');
    1918         %DirOARExe=fullfile(OutputDir,'0_EXE');
    1919 %         if exist(DirOAR,'dir')% delete the content of the dir 0_LOG to allow new input
    1920 %             curdir=pwd;
    1921 %             cd(DirOAR)
    1922 %             delete('*')
    1923 %             cd(curdir)
    1924 %         else
    1925 %             [tild,msg1]=mkdir(DirOAR);
    1926 %             if ~strcmp(msg1,'')
    1927 %                 errormsg=['cannot create ' DirOAR ': ' msg1];%error message for directory creation
    1928 %                 return
    1929 %             end
    1930 %         end
    1931         filename_joblist=fullfile(DirExe,'0_job_list.txt');%create name of the global executable file
     1918        DirOAR=fullfile(OutputDir,'0_OAR');
     1919        if exist(DirOAR,'dir')% delete the content of the dir 0_LOG to allow new input
     1920            curdir=pwd;
     1921            cd(DirOAR)
     1922            delete('*')
     1923            cd(curdir)
     1924        else
     1925            [tild,msg1]=mkdir(DirOAR);
     1926            if ~strcmp(msg1,'')
     1927                errormsg=['cannot create ' DirOAR ': ' msg1];%error message for directory creation
     1928                return
     1929            end
     1930        end
     1931        filename_joblist=fullfile(DirOAR,'0_job_list.txt');%create name of the global executable file
    19321932        filename_log=fullfile(DirLog,'job_list.stdout');%file for output messages of the master oar process
    19331933        filename_errors=fullfile(DirLog,'job_list.stderr');%file for error messages of the master oar process
     
    19631963            '"oar-parexec -s -f ' filename_joblist ' '...
    19641964            '-l ' filename_joblist '.log"\n'];
    1965        
    1966         filename_oarcommand=fullfile(DirExe,'0_oar_command');
     1965        fprintf(oar_command);% display  system command on the Matlab command window
     1966         [status,result]=system(oar_command)% execute system command and show the result (ID number of the launched job) on the Matlab command window
     1967        filename_oarcommand=fullfile(DirOAR,'0_oar_command');% keep track of the command in file '0-OAR/0_oar_command'
    19671968        fid=fopen(filename_oarcommand,'w');
    1968         fprintf(fid,oar_command);
     1969        fprintf(fid,oar_command); % store the command
     1970        fprintf(fid,result);% store the result (job ID number)
    19691971        fclose(fid);
    1970         fprintf(oar_command);% display in command line
    1971         system(oar_command); 
     1972
    19721973        msgbox_uvmat('CONFIRMATION',[ActionName ' launched as  ' num2str(NbProcess) ' processes in cluster: press STATUS to see results'])
    19731974    case 'cluster_pbs' % for LMFA Kepler machine
  • trunk/src/series/civ_series.m

    r910 r911  
    10931093                        xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2)
    10941094                        ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge)
    1095                         iref=round(xtable(ivec));% nearest image index for the middle of the vector
    1096                         jref=round(ytable(ivec));
     1095                        iref=round(xtable(ivec)+0.5);% nearest image index for the middle of the vector
     1096                        jref=round(ytable(ivec)+0.5);
    10971097                        % eliminate vectors located in the mask
    1098                         if checkmask && par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100
     1098                        if  checkmask && (iref<1 || jref<1 ||iref>npx_ima || jref>npy_ima ||( par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100))
    10991099                            utable(ivec)=0;
    11001100                            vtable(ivec)=0;
     
    11291129F=0;
    11301130[npy,npx]=size(result_conv);
    1131 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log)
     1131result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1  (=0 by discretisation, to avoid divergence in the log)
    11321132%the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ᅵ Israel Institute of Technology
    11331133%http://urapiv.wordpress.com
    11341134peaky = y;
    1135 if y <= npy-1 && y > 1
     1135if y < npy && y > 1
    11361136    f0 = log(result_conv(y,x));
    11371137    f1 = log(result_conv(y-1,x));
     
    11421142end
    11431143peakx=x;
    1144 if x <= npx-1 && x > 1
     1144if x < npx-1 && x > 1
    11451145    f0 = log(result_conv(y,x));
    11461146    f1 = log(result_conv(y,x-1));
     
    11621162result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log)
    11631163[npy,npx]=size(result_conv);
    1164 if (x <= npx-1) && (y <= npy-1) && (x >= 1) && (y >= 1)
     1164if (x < npx) && (y < npy) && (x > 1) && (y > 1)
    11651165    F=0;
    11661166    for i=-1:1
  • trunk/src/set_object.m

    r908 r911  
    3838function varargout = set_object(varargin)
    3939
    40 % Last Modified by GUIDE v2.5 16-Jan-2015 11:03:00
     40% Last Modified by GUIDE v2.5 15-Jun-2015 19:51:15
    4141
    4242% Begin initialization code - DO NOT REFRESH
     
    797797    REFRESH_Callback(hObject,eventdata,handles)
    798798end
     799
     800
     801
     802function num_RangeInterp_Callback(hObject, eventdata, handles)
     803% hObject    handle to num_RangeInterp (see GCBO)
     804% eventdata  reserved - to be defined in a future version of MATLAB
     805% handles    structure with handles and user data (see GUIDATA)
     806
     807% Hints: get(hObject,'String') returns contents of num_RangeInterp as text
     808%        str2double(get(hObject,'String')) returns contents of num_RangeInterp as a double
     809
     810
     811% --- Executes during object creation, after setting all properties.
     812function num_RangeInterp_CreateFcn(hObject, eventdata, handles)
     813% hObject    handle to num_RangeInterp (see GCBO)
     814% eventdata  reserved - to be defined in a future version of MATLAB
     815% handles    empty - handles not created until after all CreateFcns called
     816
     817% Hint: edit controls usually have a white background on Windows.
     818%       See ISPC and COMPUTER.
     819if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     820    set(hObject,'BackgroundColor','white');
     821end
Note: See TracChangeset for help on using the changeset viewer.