Changeset 1199 for trunk/src


Ignore:
Timestamp:
Mar 18, 2026, 12:44:56 PM (5 hours ago)
Author:
sommeria
Message:

bugs repaired

Location:
trunk/src
Files:
1 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r1198 r1199  
    6767shiftx=par_civ.SearchBoxShift(:,1);%use the input shift estimate, rounded to the next integer value
    6868shifty=par_civ.SearchBoxShift(:,2);%
    69 if numel(shiftx)==1% case of a unique shift for the whole field( civ1)
     69if isscalar(shiftx)% case of a unique shift for the whole field( civ1)
    7070    shiftx=shiftx*ones(nbvec,1);
    7171    shifty=shifty*ones(nbvec,1);
     
    106106%  100>=mask> 20: velocity not calculated, impermeable (no flux through mask boundaries)
    107107%  20>=mask: velocity=0
    108 checkmask=0;
     108checkmask=false;
     109check_undefined=zeros(npy_ima, npx_ima);
    109110MinA=min(min(par_civ.ImageA));
    110111if isfield(par_civ,'Mask') && ~isempty(par_civ.Mask)
    111     checkmask=1;
     112    checkmask=true;
    112113    if ~isequal(size(par_civ.Mask),[npy_ima npx_ima])
    113114        errormsg='mask must be an image with the same size as the images';
     
    125126    par_civ.CorrSmooth=2;% use SUBPIX2DGAUSS (take into account more points near the max)
    126127end
    127 
     128SearchRange_1=par_civ.SearchRange(1);
     129SearchRange_2=par_civ.SearchRange(2);
    128130if par_civ.CorrSmooth~=0 % par_civ.CorrSmooth=0 implies no civ computation (just input image and grid points given)
    129131    parfor ivec=1:nbvec
     
    136138        ibx2=floor(CorrBoxSizeX(ivec)/2);
    137139        iby2=floor(CorrBoxSizeY(ivec)/2);
    138         isx2=ibx2+ceil(par_civ.SearchRange(1));
    139         isy2=iby2+ceil(par_civ.SearchRange(2));
     140        isx2=ibx2+ceil(SearchRange_1);
     141        isy2=iby2+ceil(SearchRange_2);
    140142        subrange1_x=iref-ibx2:iref+ibx2;% x indices defining the first subimage
    141143        subrange1_y=jref-iby2:jref+iby2;% y indices defining the first subimage
  • trunk/src/get_file_info.m

    r1196 r1199  
    261261                    if error_nc
    262262                        try
    263                             if exist('mmreader.m','file')% Matlab 2009a
     263                            % if exist('mmreader.m','file')% OBSOLETE Matlab 2009a
    264264                                INFO=mmfileinfo (fileinput);
    265265                                if  ~isempty(INFO.Video.Format)
    266                                     VideoObject=mmreader(fileinput);
     266                                    VideoObject=VideoReader(fileinput);
    267267                                    FileInfo=get(VideoObject);
    268                                     FileInfo.FileType='mmreader';
    269                                 end
    270                             end
     268                                    FileInfo.FileType='video';
     269                                end
     270                            % end
    271271                            FileInfo.BitDepth=FileInfo.BitsPerPixel/3;
    272272                            FileInfo.ColorType='truecolor';
     
    274274                            FileInfo.FileName=fileinput;
    275275                            nbfield=numel(fieldnames(FileInfo));
    276                             FileInfo=orderfields(FileInfo,[nbfield nbfield-4 nbfield-3 nbfield-1 nbfield-2 (1:nbfield-5)]); %reorder the fields of fileInfo for clarity
     276                            %FileInfo=orderfields(FileInfo,[nbfield nbfield-4 nbfield-3 nbfield-1 nbfield-2 (1:nbfield-5)]); %reorder the fields of fileInfo for clarity
    277277                            if ~isfield(FileInfo,'NumberOfFrames')
    278278                                FileInfo.NumberOfFrames=floor(FileInfo.Duration*FileInfo.FrameRate);
     
    287287FileInfo.FieldType=FileInfo.FileType;%default
    288288switch FileInfo.FileType
    289     case {'image','multimage','video','mmreader','rdvision','image_DaVis','cine_phantom','telopsIR'}
     289    case {'image','multimage','video','rdvision','image_DaVis','cine_phantom','telopsIR'}
    290290        FileInfo.FieldType='image';
    291291    case {'civdata','civdata_compress','pivdata_fluidimage'}
  • trunk/src/imadoc2struct.m

    r1184 r1199  
    4343    [s,Heading,errormsg]=xml2struct(ImaDoc,varargin{1});% convert the xml file in a structure s, keeping only the subtree defined in input
    4444else % case of two subtrees, TODO: deal with more than two subtrees?
    45     [s,Heading,errormsg]=xml2struct(ImaDoc,varargin{1},varargin{2});% convert the xml file in a structure s, keeping only the subtree defined in input
     45    [s,Heading,errormsg]=xml2struct(ImaDoc,varargin{1},varargin{2});% convert the xml file in a structure s, keeping only the two subtrees defined in input
    4646end
    4747if ~isempty(errormsg)
  • trunk/src/mouse_down.m

    r1173 r1199  
    126126                            if NbDim(icell)==2 % select 2D field
    127127                                if  isfield(Field,'CoordMesh') && ~isempty(Field.CoordMesh)&&...
    128                                         ~isempty(CellInfo{icell}.VarIndex_coord_x) && ~isempty(CellInfo{icell}.VarIndex_coord_y)%case of unstructured data
    129                                     X=Field.(Field.ListVarName{CellInfo{icell}.VarIndex_coord_x});
    130                                     Y=Field.(Field.ListVarName{CellInfo{icell}.VarIndex_coord_y});
     128                                        ~isempty(CellInfo{icell}.XName) && ~isempty(CellInfo{icell}.YName)%case of unstructured data
     129                                    X=Field.(CellInfo{icell}.XName);
     130                                    Y=Field.(CellInfo{icell}.YName);
    131131                                    flag_vec=(X<(xy(1,1)+Field.CoordMesh/4) & X>(xy(1,1)-Field.CoordMesh/4)) & ...%flagx=1 for the vectors with x position selected by the mouse
    132132                                        (Y<(xy(1,2)+Field.CoordMesh/4) & Y>(xy(1,2)-Field.CoordMesh/4));%f
  • trunk/src/read_image.m

    r1180 r1199  
    5353switch FileType
    5454    case 'video'
    55         if strcmp(class(VideoObject),'VideoReader')
     55        if isa(VideoObject,'VideoReader')
    5656            A=read(VideoObject,num);
    5757        else
     
    5959            A=read(ObjectOut,num);
    6060        end
    61     case 'mmreader'
    62         if strcmp(class(VideoObject),'mmreader')
    63             A=read(VideoObject,num);
    64         else
    65             ObjectOut=mmreader(FileName);
    66             A=read(ObjectOut,num);
    67         end
     61    % case 'mmreader'
     62    %     if strcmp(class(VideoObject),'mmreader')
     63    %         A=read(VideoObject,num);
     64    %     else
     65    %         ObjectOut=mmreader(FileName);
     66    %         A=read(ObjectOut,num);
     67    %     end
    6868    case 'cine_phantom'
    6969        A = read_cine_phantom(FileName,num );
     
    7474    case 'image_DaVis'
    7575                Input=readimx(FileName);
    76                 if numel(Input.Frames)==1
     76                if isscalar(Input.Frames)
    7777                    A=Input.Frames{1}.Components{1}.Planes{1}';
    7878                else
  • trunk/src/series.m

    r1197 r1199  
    10681068
    10691069    %% get index range in case of relabeling
    1070     if isfield(Param,'XmlData') && ~isempty(Param.XmlData.Time)
     1070    if isfield(Param,'XmlData') && isfield(Param.XmlData,'Time')&& ~isempty(Param.XmlData.Time)
    10711071        Time=Param.XmlData.Time;
    10721072        MinIndex_i=1;
  • trunk/src/series/civ_input.m

    r1196 r1199  
    395395 
    396396%% set the GUI to modal: wait for OK to close
    397 set(handles.civ_input,'WindowStyle','modal')% Make the GUI modal
     397%set(handles.civ_input,'WindowStyle','modal')% Make the GUI modal
    398398drawnow
    399399uiwait(handles.civ_input);% wait for OK action to end the function
  • trunk/src/series/civ_series.m

    r1198 r1199  
    103103hseries=findobj(allchild(0),'Tag','series');
    104104RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
    105 WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
     105% WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
    106106MaxIndex_i=Param.IndexRange.MaxIndex_i;
    107107MinIndex_i=Param.IndexRange.MinIndex_i;
     
    332332        par_civ1=Param.ActionInput.Civ1;% parameters for civ1
    333333        %if CheckInputFile % read input images (except in mode Test where it is introduced directly in Param.ActionInput.Civ1.ImageNameA and B)
    334         try
     334        % try
    335335            if strcmp(Param.ActionInput.ListCompareMode,'displacement')
    336336                ImageName_A=Param.ActionInput.RefFile;
     
    351351                    [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A);
    352352                    FileType_A=FileInfo_A.FileType;
    353                     if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video inputFrameIndex_A
     353                    if isempty(Time) && ismember(FileType_A,{'video','cine_phantom','telopsIR'})% case of video inputFrameIndex_A
    354354                        Time=zeros(FileInfo_A.NumberOfFrames+1,2);
    355355                        Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
    356                         if ~isempty(j1_series_Civ1) && j1_series_Civ1~=1
     356                        if ~isempty(j1_series_Civ1) & j1_series_Civ1~=1
    357357                            Time=Time';
    358358                        end
     
    392392            [par_civ1.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B);
    393393           
    394         catch ME % display errors in reading input images
    395             if ~isempty(ME.message)
    396                 disp_uvmat('ERROR', ['error reading input image: ' ME.message],checkrun)
    397                 continue
    398             end
    399         end
     394        % catch ME % display errors in reading input images
     395        %     if ~isempty(ME.message)
     396        %         disp_uvmat('ERROR', ['error reading input image: ' ME.message],checkrun)
     397        %         continue
     398        %     end
     399        % end
    400400       
    401401        % case of background image to subtract
     
    10091009    if exist('time_input','var')
    10101010        disp(['time image reading ' num2str(time_input,2) ' s'])
    1011         disp(['time other ' num2str((time_total-time_input-time_civ1-time_patch1-time_civ2-time_patch2),2) ' s'])
     1011        disp(['time other ' num2str((time_total-time_civ1-time_patch1-time_civ2-time_patch2),2) ' s'])
    10121012    end
    10131013end
  • trunk/src/uvmat.m

    r1196 r1199  
    253253        for ilist=1:length(h.export_fct)
    254254            if exist(h.export_fct{ilist},'file')==2
    255                 [path,file]=fileparts(h.export_fct{ilist});
     255                [~,file]=fileparts(h.export_fct{ilist});
    256256                export_menu=[export_menu; {file}];
    257257            end
     
    265265set(handles.TransformPath,'UserData',[])
    266266export_menu=[export_menu;{'more...'}];%append the option more.. to the menu
    267 %set(handles.TransformName,'String',transform_menu)% display the menu of transform fcts
    268267
    269268%% case of an input argument for uvmat
    270 %testinputfield=0;
    271269inputfile=[];
    272 %Field=[];
    273270if exist('input','var')
    274271    if ishandle(handles.UVMAT_title)
     
    356353
    357354%------------------------------------------------------------------------
    358 %--- activated when resizing the GUI view_field
     355%--- activated when resizing the GUI uvmat
    359356 function ResizeFcn(gcbo,eventdata,handles)
    360357%------------------------------------------------------------------------
    361358set(handles.uvmat,'Units','pixels')
    362359size_fig=get(handles.uvmat,'Position');
    363 ColumnWidth=max(150,0.18*size_fig(3));
    364 ColumnWidth=min(ColumnWidth,250); % width of the right side display column, between 150 and 250, depending on the fig width
     360ColumnWidth=max(150,0.18*size_fig(3)); %width of the right side display column equal to 0.18 *uvmat_GUI, in the range between 150 px and 250 px
     361ColumnWidth=min(ColumnWidth,250);
    365362
    366363%% position of panel InputFile
    367364set(handles.InputFile,'Units','pixels')
    368 pos_InputFile=get(handles.InputFile,'Position');% [lower x lower y width height] for text_display
    369 pos_InputFile(1)=0;
    370 pos_InputFile(2)=size_fig(4)-pos_InputFile(4);             % set frame InputFile to the top of the fig
    371 pos_InputFile(3)=size_fig(3);
    372 set(handles.InputFile,'Position',pos_InputFile);% [lower x lower y width height] for text_display
     365%pos_InputFile=get(handles.InputFile,'Position')% [lower x lower y width height] for text_display
     366pos_InputFile(1)=0;            % set frame InputFile to the left of uvmat GUI
     367pos_InputFile(2)=size_fig(4)-60;             % set frame InputFile to the top of uvmat GUI
     368pos_InputFile(3)=size_fig(3);     %width of the GUI uvmat
     369pos_InputFile(4)=60; %set the height of the panel to 60 px
     370set(handles.InputFile,'Position',pos_InputFile);% [lower x lower y width height]
    373371
    374372%% reset position of text_display and TableDisplay
     
    376374set(handles.TableDisplay,'Units','pixels')
    377375pos_1=get(handles.text_display,'Position');% [lower x lower y width height] for text_display
    378     pos_1(3)=1.2*ColumnWidth;
     376pos_1(3)=1.2*ColumnWidth;
    379377pos_1(1)=size_fig(3)-pos_1(3);             % set text display to the right of the fig
    380378pos_1(2)=size_fig(4)-pos_InputFile(4)-pos_1(4);             % set text display to the top of the fig
     
    396394%% reset position of Coordinates panel
    397395set(handles.Coordinates,'Units','pixels')
    398 pos_2=get(handles.Coordinates,'Position');% [lower x lower y width height] for frame 'Coordinates'
     396%pos_2=get(handles.Coordinates,'Position')% [lower x lower y width height] for frame 'Coordinates'
     397pos_2(1)=size_fig(3)-ColumnWidth;       % set 'Coordinates' to the right of the fig
     398pos_2(2)=pos_1(2)-80;          % set 'Coordinates' to the lower edge of text display
    399399pos_2(3)=ColumnWidth;
    400 pos_2(1)=size_fig(3)-pos_2(3);       % set 'Coordinates' to the right of the fig
    401 pos_2(2)=pos_1(2)-pos_2(4);          % set 'Coordinates' to the lower edge of text display, allowing a margin for CheckHold
     400pos_2(4)=80;%keep height to 80 px
    402401set(handles.Coordinates,'Position',pos_2)
    403402
    404403%% reset position of Axes panel
    405404set(handles.Axes,'Units','pixels')
    406 pos_3=get(handles.Axes,'Position');% [lower x lower y width height] for frame 'Coordinates'
     405%pos_3=get(handles.Axes,'Position')% [lower x lower y width height] for frame 'Coordinates'
     406pos_3(1)=size_fig(3)-ColumnWidth;       % set 'Coordinates' to the right of the fig
     407pos_3(2)=pos_2(2)-140;   
    407408pos_3(3)=ColumnWidth;
    408 pos_3(1)=size_fig(3)-pos_3(3);       % set 'Coordinates' to the right of the fig
    409 pos_3(2)=pos_2(2)-pos_3(4);          % set 'Coordinates' to the lower edge of text display, allowing a margin for CheckHold
     409pos_3(4)=140;%keep height to 140 px
    410410set(handles.Axes,'Position',pos_3)
    411411
    412412%% reset position of  Scalar
    413413set(handles.Scalar,'Units','pixels')
    414 pos_4=get(handles.Scalar,'Position'); % [lower x lower y width height] for frame 'Scalar'
     414%pos_4=get(handles.Scalar,'Position') % [lower x lower y width height] for frame 'Scalar'
     415pos_4(1)=size_fig(3)-ColumnWidth;         % set 'Scalar' to the right of the fig
     416if strcmp(get(handles.Scalar,'Visible'),'on')
     417    pos_4(2)=pos_3(2)-140; % set 'Scalar' to the lower edge of frame 'Coordinates' if visible
     418else
     419    pos_4(2)=pos_3(2);% set 'Scalar' to the lower edge of frame 'text display' if  unvisible
     420end
    415421pos_4(3)=ColumnWidth;
    416 pos_4(1)=size_fig(3)-pos_4(3);         % set 'Scalar' to the right of the fig
    417 if strcmp(get(handles.Scalar,'Visible'),'on')
    418     pos_4(2)=pos_3(2)-pos_4(4); % set 'Scalar' to the lower edge of frame 'Coordinates' if visible
    419 else
    420     pos_4(2)=pos_3(2);% set 'Scalar' to the lower edge of frame 'text display' if  unvisible
    421 end
     422pos_4(4)=140;
    422423set(handles.Scalar,'Position',pos_4)
    423424
    424425%% reset position of  Vectors
    425426set(handles.Vectors,'Units','pixels')
    426 pos_5=get(handles.Vectors,'Position');
     427%pos_5=get(handles.Vectors,'Position')
     428pos_5(1)=size_fig(3)-ColumnWidth;
     429if strcmp(get(handles.Vectors,'visible'),'on')
     430    pos_5(2)=pos_4(2)-240;
     431else
     432    pos_5(2)=pos_4(2);
     433end
    427434pos_5(3)=ColumnWidth;
    428 pos_5(1)=size_fig(3)-pos_5(3);
    429 if strcmp(get(handles.Vectors,'visible'),'on')
    430     pos_5(2)=pos_4(2)-pos_5(4);
    431 else
    432     pos_5(2)=pos_4(2);
    433 end
     435pos_5(4)=240;
    434436set(handles.Vectors,'Position',pos_5)
    435437
     
    459461% search the files, recognize their type according to their name and fill the rootfile input windows
    460462function MenuBrowse_Callback(hObject, eventdata, handles)
     463% --------------------------------------------------------------------
    461464[RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles);
    462465if isempty(regexp(RootPath,'^http://'))%usual files
     
    484487% --------------------------------------------------------------------
    485488function MenuBrowseOpendap_Callback(hObject, eventdata, handles)
     489% --------------------------------------------------------------------
    486490oldfile=get(hObject,'Label');
    487491fileinput=uigetfile_uvmat('pick an input file',oldfile);
     
    776780
    777781%% create movie
    778 % duration = 2*FrameNumber/60;
    779 % [~,name,~] = fileparts(MovieName);
    780 % ffmpegcmd = ['ffmpeg -i ' ' ' MovieName ' ' '-filter:v "setpts=(',...
    781 %      num2str(fps/duration),')*PTS"' ' ' strcat(MovieDir,...
    782 %      strcat('/',name,'.mkv'))];
    783 % [ffmpeg_err,~] = system(ffmpegcmd);
    784 % if ffmpeg_err
    785 %     disp_uvmat('ERROR',['ERROR: Errors in conversion to mkv, close MATLAB and run "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab" in terminal'],1 )
    786 %     return
    787 % end
    788 % msgbox_uvmat('CONFIRMATION',{['movie ' MovieName ' created '];['with ' num2str(FrameNumber) ' frames']})
    789 
    790 
    791 %
    792782aviobj = VideoWriter(MovieName,'Motion JPEG AVI');
    793783open(aviobj)
     
    826816% --------------------------------------------------------------------
    827817function MenuExportCustom_Callback(hObject, eventdata, handles)
    828 export_fct_name=get(handles.MenuExportCustom,'label');
    829 if strcmp(export_fct_name,'user export fct.')
     818%------------------------------------------------------------------------
     819if strcmp(get(handles.MenuExportCustom,'label'),'user export fct.')
    830820    MenuExportMore_Callback(hObject, eventdata, handles)
    831821else
    832822    current_dir=pwd;%current working dir
    833823    cd(fullfile(fileparts(which('uvmat')),'export_fct'))
    834     export_handle=str2func(export_fct_name);
    835     cd(current_dir)
     824    export_handle=str2func(export_fct_name);% pick the relevant export fct in the folder UVMAT/export_fct
     825    cd(current_dir) %come back to the current working dir
    836826    export_handle(handles)
    837827end
     
    839829% --------------------------------------------------------------------
    840830function MenuExportMore_Callback(hObject, eventdata, handles)
    841 
     831%------------------------------------------------------------------------
    842832prev_path=fullfile(fileparts(which('uvmat')),'export_fct');
    843833transform_fct_chosen=uigetfile_uvmat('Pick the export function',prev_path,'.m');
    844834if ~isempty(transform_fct_chosen)
    845     [PathName,transform_name]=fileparts(transform_fct_chosen);
     835    [~,transform_name]=fileparts(transform_fct_chosen);
    846836    set(handles.MenuExportCustom,'label',transform_name)
    847     set(handles.MenuExportCustom,'checked','on')
    848837    MenuExportCustom_Callback(hObject, eventdata, handles)
    849838end
     
    953942data.ProjMode='interp_lin';%default
    954943data.ProjModeMenu={};
    955 % set(handles.create,'Visible','on')
    956 % set(handles.create,'Value',1)
    957 % VOLUME_Callback(hObject,eventdata,handles)data.ProjModeMenu={};
    958944create_object(data,handles)
    959945
     
    21332119function MenuHelp_Callback(hObject, eventdata, handles)
    21342120% --------------------------------------------------------------------
    2135 web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp')
     2121web('https://gricad-gitlab.univ-grenoble-alpes.fr/legi/soft/uvmat-doc/-/blob/master/help/README.md')
    21362122
    21372123
     
    29232909        set(handles.RootFile,'String',RootFile)
    29242910    else
    2925         [tild,tild,tild,i1,i2,j1,j2]=fileparts_uvmat(index_string);% the index_string for the second series taken from FileIndex
     2911        [~,~,~,i1,i2,j1,j2]=fileparts_uvmat(index_string);% the index_string for the second series taken from FileIndex
    29262912        switch index_rank
    29272913            case 1
     
    40734059else
    40744060    if  isempty(TimeUnit)
    4075         set(handles.Dt_txt,'String',['Dt=' num2str(1000*dt,3) '  10^(-3)'] )
     4061        set(handles.Dt_txt,'String',['Dt=' num2str(1000*dt,3) '  ms'] )
    40764062    else
    40774063        set(handles.Dt_txt,'String',['Dt=' num2str(1000*dt,3) '  m' TimeUnit] )
     
    47094695%-----------------------------------------------------------------------
    47104696% --- desactivate display used for a second file series
     4697function desable_subfield(handles)
    47114698%-----------------------------------------------------------------------
    4712 function desable_subfield(handles)
    47134699
    47144700set(handles.RootPath_1,'String','')
     
    47904776    NomType_1=get(handles.NomType,'String');%read FileExt by default
    47914777end
     4778
    47924779%------------------------------------------------------------------------
    47934780% --- Executes on menu selection FieldName
    4794 
    4795     function FieldName_Callback(hObject, eventdata, handles)
    4796 %------------------------------------------------------------------------
    4797 
     4781function FieldName_Callback(hObject, eventdata, handles)
     4782%------------------------------------------------------------------------
    47984783%% read data from uvmat
    47994784UvData=get(handles.uvmat,'UserData');
     
    48024787field= list_fields{index_fields(1)}; % selected string
    48034788[RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles);
    4804 if isempty(regexp(RootPath,'^http://'))
     4789if isempty(regexp(RootPath,'^http://', 'once'))
    48054790    FileName=[fullfile(RootPath,SubDir,RootFile) FileIndices FileExt];
    48064791else
    48074792    FileName=[RootPath '/' SubDir '/' RootFile FileIndices FileExt];
    48084793end
    4809 [tild,tild,tild,i1,i2,j1,j2,tild,NomType]=fileparts_uvmat(['xxx' get(handles.FileIndex,'String') FileExt]);
     4794[~,~,~,i1,~,j1,~,~,NomType]=fileparts_uvmat(['xxx' get(handles.FileIndex,'String') FileExt]);
    48104795
    48114796switch field
     
    48974882                set(handles.uvmat,'ToolBar','figure')
    48984883                set(handles.Coord_y,'Max',2)
    4899                 %set(huvmat,
    49004884            case 'civdata...'%reinitiate input, return to automatic civ data readingget_field
    49014885                UvData.FileInfo{1}.FieldType='netcdf';
     
    49244908                    set(handles.MaxIndex_i,'String',MaxIndex_i)%TODO: record time unit
    49254909                    UvData.TimeUnit=GetFieldData.Time.TimeUnit;
    4926 % %                     set(handles.uvmat,'UserData',UvData);
    49274910                    set(handles.FileIndex,'String','')
    49284911                    ParamIn.TimeVarName=GetFieldData.Time.TimeName;
     
    50054988[RootPath_1,SubDir_1,RootFile_1,FileIndex_1,FileExt_1]=read_file_boxes_1(handles);
    50064989FileName_1=[fullfile(RootPath_1,SubDir_1,RootFile_1) FileIndex_1 FileExt_1];
    5007 [tild,tild,tild,i1,i2,j1,j2]=fileparts_uvmat(get(handles.FileIndex,'String'));
     4990[~,~,~,i1,~,j1,~]=fileparts_uvmat(get(handles.FileIndex,'String'));
    50084991switch field_1
    50094992    case 'get_field...'
     
    51065089            end
    51075090            set(handles.Coord_x,'String',XName)
    5108 %             if ischar(YName)
    5109 %                 YName={YName};
    5110 %             end
    51115091            set(handles.Coord_y,'String',YName)
    51125092            set(handles.FieldName_1,'Value',1)
     
    53705350                end
    53715351            end
    5372             if isfield(ObjectData,'Coord')& isfield(ObjectData,'Style')
     5352            if isfield(ObjectData,'Coord')&& isfield(ObjectData,'Style')
    53735353                if isequal(ObjectData.Type,'polygon')
    53745354                    X=ObjectData.Coord(:,1);
     
    54355415
    54365416%------------------------------------------------------------------------
     5417
    54375418%------------------------------------------------------------------------
    54385419% --- Executes on selection change in TransformName.
    5439 
    54405420function TransformName_Callback(hObject, eventdata, handles)
    54415421%------------------------------------------------------------------------
     
    55125492    set(handles.TransformName,'ToolTipString','transform_fct:choose a transform function')
    55135493else
    5514     try
    5515         [fid,errormsg] =fopen([fullfile(list_path{ichoice},transform_name) '.m']);
    5516         InputText=textscan(fid,'%s',1,'delimiter','\n');
    5517         fclose(fid);
    5518         set(handles.TransformName,'ToolTipString',['transform_fct: ' InputText{1}{1}])% put the first line of the selected function as tooltip help
    5519     end
     5494    [fid,errormsg] =fopen([fullfile(list_path{ichoice},transform_name) '.m']);
     5495    if ~isempty(errormsg)
     5496        msgbox_uvmat('ERROR',errormsg)
     5497        return
     5498    end
     5499    InputText=textscan(fid,'%s',1,'delimiter','\n');
     5500    fclose(fid);
     5501    set(handles.TransformName,'ToolTipString',['transform_fct: ' InputText{1}{1}])% put the first line of the selected function as tooltip help
    55205502end
    55215503
     
    56475629%------------------------------------------------------------------------
    56485630set(handles.CheckFixScalar,'Value',1) %suppress auto mode
    5649 % set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
    56505631MinA=str2double(get(handles.num_MinA,'String'));
    56515632MaxA=str2double(get(handles.num_MaxA,'String'));
     
    56995680% Vector representation
    57005681%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    5701 % % %-------------------------------------------------------------------
    5702 % % function CheckHideWarning_Callback(hObject, eventdata, handles)
    5703 % % %-------------------------------------------------------------------
    5704 % % update_plot(handles);
    57055682
    57065683%-------------------------------------------------------------------
     
    59465923end
    59475924PlotParam=read_GUI(handles.uvmat);
    5948 [tild,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam);
     5925[~,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam);
    59495926errormsg=fill_GUI(PlotParamOut,handles.uvmat);
    59505927if isempty(errormsg)
     
    60065983%  desactivate the edit object mode
    60075984set(handles.CheckEditObject,'Value',0)
    6008 % set(handles.CheckEditObject,'BackgroundColor',[0.7,0.7,0.7])
    60095985
    60105986%------------------------------------------------------------------------
     
    61446120end
    61456121
    6146 
    61476122%------------------------------------------------------------------------
    61486123% --- Executes on button press in CheckViewObject.
     
    61516126check_view=get(handles.CheckViewObject,'Value');
    61526127hset_object=findobj(allchild(0),'tag','set_object');
    6153 % if ~isempty(hset_object)
    6154 %     delete(hset_object)% delete existing version of set_object
    6155 % end
    61566128if check_view %activate set_object
    61576129    IndexObj=get(handles.ListObject,'Value');
     
    61946166end
    61956167
    6196 
    61976168%------------------------------------------------------------------------
    61986169% --- Executes on button press in CheckViewField.
     
    62316202    end
    62326203    hhview_field=guidata(hview_field);
    6233     [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the GUI view_field);
     6204    [~,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the GUI view_field);
    62346205    errormsg=fill_GUI(PlotParam,hview_field);
    62356206    for list={'Scalar','Vectors'}
     
    62546225end
    62556226
    6256 
    62576227%------------------------------------------------------------------------
    62586228% --- Executes on button press in DeleteObject.
    6259 %------------------------------------------------------------------------
    62606229function DeleteObject_Callback(hObject, eventdata, handles)
    6261 
     6230%------------------------------------------------------------------------
    62626231IndexObj=get(handles.ListObject,'Value');%projection object selected for view_field
    62636232IndexObj_1=get(handles.ListObject_1,'Value');%projection object selected for uvmat plot
     
    62666235end
    62676236
    6268 %'DeleteObject': delete a projection object, defined by its index in the Uvmat list or by its graphic handle
    6269 %------------------------------------------------------------------------
    6270 % function DeleteObject(hObject)
    6271 %
    6272 % INPUT:
    6273 % hObject: object index (if integer) or handle of the graphic object. If
    6274 %          hObject is a subobject, the parent object is detected and deleted.
    6275 
     6237% --------------------------------------------------------------------
     6238% --- Delete a projection object, defined by its index in the Uvmat list or by its graphic handle
    62766239function delete_object(IndexObj)
    6277 
     6240%------------------------------------------------------------------------
    62786241huvmat=findobj('tag','uvmat');%handles of the uvmat interface
    62796242UvData=get(huvmat,'UserData');
     
    63336296end
    63346297
    6335 
    6336 
    6337 
    6338 
     6298% --------------------------------------------------------------------
    63396299% --- Executes on selection change in LogLinHisto.
     6300% --------------------------------------------------------------------
    63406301function LogLinHisto_Callback(hObject, eventdata, handles)
    6341     HistoMenu_Callback(hObject, eventdata, handles)
    6342 % hObject    handle to LogLinHisto (see GCBO)
    6343 % eventdata  reserved - to be defined in a future version of MATLAB
    6344 % handles    structure with handles and user data (see GUIDATA)
    6345 
    6346 % Hints: contents = cellstr(get(hObject,'String')) returns LogLinHisto contents as cell array
    6347 %        contents{get(hObject,'Value')} returns selected item from LogLinHisto
     6302HistoMenu_Callback(hObject, eventdata, handles)
  • trunk/src/xml_schemas/ImaDoc_ancillary.xml

    r1178 r1199  
    2222    <BurstTiming>
    2323          <Time unit="TimeUnit" >0</Time> <!--temps de la premiere image (par rapport à l'origine des temps definie pour l'experience (un trigger)-->
    24       <Dtj unit="TimeUnit">1</Dtj> <!--interval élémentaire dans le burst (volume) -->
    25       <NbDtj>49</NbDtj>   <!--Nbe d'intervals Dtj dans un burst (nre de frames-1) dans le volume-->
    2624      <Dti unit="frame">70 200</Dti><!--interval dans la paire de volumes interval entre paires-->
    2725      <NbDti>50</NbDti> <!--Nbe d'intervals Dti (nre de paires de volumes -1)-->
     26      <Dtj unit="TimeUnit">1</Dtj> <!--interval élémentaire dans le burst (volume) -->
     27      <NbDtj>49</NbDtj>   <!--Nbe d'intervals Dtj dans un burst (nre de frames-1) dans le volume-->     
    2828    </BurstTiming>
    2929    <TimeOrigin>2010-06-17T16:44:28.93</TimeOrigin><!--date-temps absolu pour l'origine des temps definie pour l'experience-->
    3030  </Camera>
    31     <Oscillator><!--propriete du miroir oscillant, a discuter comment entrer ces donneee-->
     31    <Oscillator><!--properties of oscillating mirrors-->
    3232    <Frequency>3194.454905803945093</Frequency>
    3333    <Amplitude unit="volt">2547.234905803945093</Amplitude>
  • trunk/src/xml_schemas/ImaDoc_template_burst.xml

    r1178 r1199  
    33    <TimeUnit>s</TimeUnit><!--default =s (second) if not indicated-->
    44    <BurstTiming>
    5       <Dtj unit="TimeUnit"> 0.1 0.3 0.2 </Dtj> <!--intervals in a  burst (here 4 images, just one interval for pairs), expressed in time units-->
     5     
    66      <Time unit="TimeUnit" > 0 </Time> <!--time of the first image (defined for a trigger), = 0 by default-->
    77      <Dti unit="TimeUnit"> 15 </Dti><!--interval between bursts-->
    88      <NbDti>50</NbDti> <!-- total nbre of intervals Dti (nre of bursts-1)-->
     9      <Dtj unit="TimeUnit"> 0.1 0.3 0.2 </Dtj> <!--intervals in a  burst (here 4 images, just one interval for pairs), expressed in time units-->
    910      </BurstTiming>
    1011  </Camera>
  • trunk/src/xml_schemas/ImaDoc_template_pairs.xml

    r1178 r1199  
    44    <TimeUnit>s</TimeUnit>
    55    <BurstTiming>
    6       <FrameFrequency unit="1/TimeUnit">10000</FrameFrequency>
    7       <Dtj unit="frame">0.1</Dtj> <!--intervals inside the burst, here one interval (2 images a b in a burst)-->
    86      <Time unit="TimeUnit" >0</Time> <!--time of the first image -->
     7      <FrameFrequency unit="1/TimeUnit">10000</FrameFrequency> 
    98      <Dti unit="frame">2</Dti><!--interval between bursts-->
    109      <NbDti>99</NbDti> <!--Nbe d'intervals Dti (nre of bursts-1)-->
     10      <Dtj unit="frame">0.1</Dtj> <!--intervals inside the burst, here one interval (2 images a b in a burst)-->   
    1111    </BurstTiming>
    1212</Camera>
  • trunk/src/xml_schemas/ImaDoc_template_volume.xml

    r1178 r1199  
    55    <BurstTiming>
    66          <Time unit="TimeUnit" > 0 </Time>  <!--time of the first image, =0 by default-->
    7       <Dtj unit="TimeUnit"> 0.01 </Dtj> <!-- elementaire time interval in a burst (volume) -->
    8       <NbDtj> 49 </NbDtj>   <!--Nbe of intervals Dtj in a burst or volume (nre de frames-1) -->
    97      <Dti unit="TimeUnit"> 0.8 </Dti>  <!-- time interval between two succesive bursts (volumes)-->
    108      <NbDti> 1 </NbDti> <!--Nbe of intervals Dti (nre of volumes -1)-->
     9  <Dtj unit="TimeUnit"> 0.01 </Dtj> <!-- elementaire time interval in a burst (volume) -->
     10      <NbDtj> 49 </NbDtj>   <!--Nbe of intervals Dtj in a burst or volume (nre de frames-1) -->
    1111      <Dtk unit="TimeUnit"> 10 </Dtk> <!-- time interval between two volume pairs , equivalent to <Dti>1 10</Dti> and <NbDti> 199 </NbDti> with no Dtk-->
    1212      <NbDtk> 199 </NbDtk> <!-- nbre of volume pairs-->   
Note: See TracChangeset for help on using the changeset viewer.