Changeset 1090 for trunk


Ignore:
Timestamp:
Jan 21, 2021, 3:59:54 PM (3 years ago)
Author:
sommeria
Message:

system of mirror output path introduced, and series/sliding_average added

Location:
trunk/src
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/browse_data.m

    r1076 r1090  
    153153set(handles.SourceDir,'BackgroundColor',[1 1 0])% indicate action of button by yellow color
    154154drawnow
    155 SourceDir=get(handles.SourceDir,'String');
    156 [SourcePath,ProjectName]=fileparts(SourceDir);
     155SourcePath=get(handles.SourceDir,'String');
     156if ~isempty(regexp(SourcePath,'^http'))
     157    SourcePath=pwd;
     158    SourcePath=regexprep(SourcePath,'^\/.fsnet','/fsnet');
     159end
     160
     161
     162ProjectList=get(handles.ListExperiments,'String');
     163ProjectName=ProjectList{get(handles.ListExperiments,'Value')};
     164ProjectName=regexprep(ProjectName,'^\+/','');
    157165if strcmp(get(handles.MirrorDir,'Visible'),'on')
    158 MirrorDir=get(handles.MirrorDir,'String');% name of the mirror folder
     166    MirrorDir=get(handles.MirrorDir,'String');% name of the mirror folder
    159167else% create the mirror folder if it does not exist
    160 MirrorRoot=uigetfile_uvmat('select the folder which must contain the mirror directory:',SourcePath,'uigetdir');
    161 if isempty(MirrorRoot)
    162 return
    163 elseif strcmp(MirrorRoot,SourcePath)
    164 msgbox_uvmat('ERROR','The mirror folder must be different from the source')
    165 return
    166 else
    167 MirrorDir=fullfile(MirrorRoot,ProjectName);
    168 end
    169 if exist(MirrorDir,'dir')
    170 msgbox_uvmat('ERROR',['The folder ' MirrorDir ' chosen as new mirror campaign already exists'])
    171 return
    172 else
    173 [s,errormsg]=mkdir(MirrorDir)% create the mirror dir
    174 if s~=1
    175 msgbox_uvmat('ERROR',['error in creating ' MirrorDir ': ' errormsg])
    176 return
    177 end
    178 end
    179 MirrorDoc.SourceDir=SourceDir;
    180 t=struct2xml(MirrorDoc);
    181 set(t,1,'name','DataTree');
    182 save(t,fullfile(MirrorDir,[ProjectName '.xml']))% create an xml file in the mirror folder to indicate its source folder
    183 set(handles.MirrorDir,'String',MirrorDir)
    184 set(handles.MirrorDir,'Visible','on')
    185 set(handles.CreateMirror,'String','update_mirror')
     168    MirrorRoot=uigetfile_uvmat('select the folder which must contain the mirror directory:',SourcePath,'uigetdir');
     169    if isempty(MirrorRoot)
     170        return
     171    elseif strcmp(MirrorRoot,SourcePath)
     172        msgbox_uvmat('ERROR','The mirror folder must be different from the source')
     173        return
     174    else
     175        MirrorDir=fullfile(MirrorRoot,ProjectName);
     176    end
     177    if exist(MirrorDir,'dir')
     178        msgbox_uvmat('ERROR',['The folder ' MirrorDir ' chosen as new mirror campaign already exists'])
     179        return
     180    else
     181        [s,errormsg]=mkdir(MirrorDir);% create the mirror dir
     182        if s~=1
     183            msgbox_uvmat('ERROR',['error in creating ' MirrorDir ': ' errormsg])
     184            return
     185        end
     186    end
     187    SourceDir=fullfile(SourcePath,ProjectName);
     188    MirrorDoc.SourceDir=SourceDir;
     189    t=struct2xml(MirrorDoc);
     190    set(t,1,'name','DataTree');
     191    save(t,fullfile(MirrorDir,[ProjectName '.xml']))% create an xml file in the mirror folder to indicate its source folder
     192    set(handles.MirrorDir,'String',MirrorDir)
     193    set(handles.MirrorDir,'Visible','on')
     194    set(handles.CreateMirror,'String','update_mirror')
    186195end
    187196ExpName={''};
     
    189198%% update the mirror from the source dir
    190199if exist(SourceDir,'dir')
    191 hdir=dir(SourceDir); %list files and dirs
    192 idir=0;
    193 for ilist=1:length(hdir)
    194 if hdir(ilist).isdir% scan all subfolders
    195 dirname=hdir(ilist).name;%
    196 if ~isequal(dirname(1),'.')&&~isequal(dirname(1),'0')%skip subfolder beginning by '0'
    197 idir=idir+1;
    198 mirror=fullfile(MirrorDir,hdir(ilist).name);% corresponding name in the mirror
    199 if ~exist(mirror,'dir')
    200 mkdir(mirror)% create the mirror folder if it does not exist
    201 end
    202 ExpName{idir}=['+/' hdir(ilist).name];% insert '+/' in the list to show that it is a folder
    203 end
    204 % look for the list of 'devices'
    205 else
    206 %warning for isolated files
    207 end
    208 end
    209 set(handles.ListExperiments,'String',[{'*'};ExpName'])
    210 set(handles.ListExperiments,'Value',1)
    211 update_experiments(handles,[{'*'};ExpName'],SourceDir,MirrorDir)
    212 % ListExperiments_Callback(hObject, eventdata, handles) % list the content of the experiment
    213 else
    214 msgbox_uvmat('ERROR',['The input ' SourceDir ' is not a directory'])
     200    hdir=dir(SourceDir); %list files and dirs
     201    idir=0;
     202    for ilist=1:length(hdir)
     203        if hdir(ilist).isdir% scan all subfolders
     204            dirname=hdir(ilist).name;%
     205            if ~isequal(dirname(1),'.')&&~isequal(dirname(1),'0')%skip subfolder beginning by '0'
     206                idir=idir+1;
     207                mirror=fullfile(MirrorDir,hdir(ilist).name);% corresponding name in the mirror
     208                if ~exist(mirror,'dir')
     209                    mkdir(mirror)% create the mirror folder if it does not exist
     210                end
     211                ExpName{idir}=['+/' hdir(ilist).name];% insert '+/' in the list to show that it is a folder
     212            end
     213            % look for the list of 'devices'
     214        else
     215            %warning for isolated files
     216        end
     217    end
     218    set(handles.ListExperiments,'String',[{'*'};ExpName'])
     219    set(handles.ListExperiments,'Value',1)
     220    update_experiments(handles,[{'*'};ExpName'],SourceDir,MirrorDir)
     221    % ListExperiments_Callback(hObject, eventdata, handles) % list the content of the experiment
     222else
     223    msgbox_uvmat('ERROR',['The input ' SourceDir ' is not a directory'])
    215224end
    216225set(handles.SourceDir,'BackgroundColor',[1 1 1])
  • trunk/src/calc_field_tps.m

    r1071 r1090  
    9898            DataOut.(FieldNameType)=zeros(nb_sites,1);
    9999            VarAttributeNew{1}.Role='scalar';
    100         case {'curl','div','strain'}
     100        case {'curl','div','strain','DUDX','DUDY','DVDX','DVDY'}
    101101            check_der=1;
    102102            DataOut.(FieldNameType)=zeros(nb_sites,1);
     
    105105    VarAttribute=[VarAttribute VarAttributeNew];
    106106end
    107 %Attr_FF.Role='errorflag';
    108 %VarAttribute=[VarAttribute {Attr_FF}];
    109107FieldName(check_remove)=[];
    110108
     
    138136            case 'div(U,V)'
    139137                DataOut.div(ind_sel)=DataOut.div(ind_sel)+EMDX*FieldVar(1:nbvec_sub+3,isub,1)+EMDY *FieldVar(1:nbvec_sub+3,isub,2);
    140 %             case 'curl_polar(U,V)'
    141 %                 DataOut.curl(ind_sel)=DataOut.curl(ind_sel)+(-EMDY *FieldVar(1:nbvec_sub+3,isub,1)+EMDX *(Coord_interp(ind_sel,1).*FieldVar(1:nbvec_sub+3,isub,2)))./Coord_interp(ind_sel,1);
    142138            case 'strain(U,V)'
    143139                DataOut.strain(ind_sel)=DataOut.strain(ind_sel)+EMDY*FieldVar(1:nbvec_sub+3,isub,1)+EMDX *FieldVar(1:nbvec_sub+3,isub,2);
     140            case 'DUDX(U,V)'
     141                DataOut.DUDX(ind_sel)=DataOut.DUDX(ind_sel)+EMDX *FieldVar(1:nbvec_sub+3,isub,1);
     142            case 'DUDY(U,V)'
     143                DataOut.DUDY(ind_sel)=DataOut.DUDY(ind_sel)+EMDY*FieldVar(1:nbvec_sub+3,isub,1);
     144            case 'DVDX(U,V)'
     145                DataOut.DVDX(ind_sel)=DataOut.DVDX(ind_sel)+EMDX*FieldVar(1:nbvec_sub+3,isub,2);
     146            case 'DVDY(U,V)'
     147                DataOut.DVDY(ind_sel)=DataOut.DVDY(ind_sel)+EMDY *FieldVar(1:nbvec_sub+3,isub,2);
    144148        end
    145149    end
  • trunk/src/plot_field.m

    r1077 r1090  
    968968            colormap('jet'); % default matlab colormap ('jet')
    969969        end
    970        
    971         if isfield(PlotParam.Axes,'CheckFixAspectRatio') && isequal(PlotParam.Axes.CheckFixAspectRatio,1)
    972             set(haxes,'DataAspectRatioMode','manual')
    973             if isfield(PlotParam.Axes,'AspectRatio')
    974                 set(haxes,'DataAspectRatio',[PlotParam.Axes.AspectRatio 1 1])
    975             else
    976                 set(haxes,'DataAspectRatio',[1 1 1])
    977             end
    978         end
    979970    else %usual images (no contour)
    980971        % set  colormap for  image display
     
    10521043                set(hima,'AlphaData',1)% full opacity (no transparency) by default
    10531044            end
     1045        end
     1046    end
     1047    if isfield(PlotParam.Axes,'CheckFixAspectRatio') && isequal(PlotParam.Axes.CheckFixAspectRatio,1)
     1048        set(haxes,'DataAspectRatioMode','manual')
     1049        if isfield(PlotParam.Axes,'AspectRatio')
     1050            set(haxes,'DataAspectRatio',[PlotParam.Axes.AspectRatio 1 1])
     1051        else
     1052            set(haxes,'DataAspectRatio',[1 1 1])
    10541053        end
    10551054    end
  • trunk/src/proj_field.m

    r1085 r1090  
    129129function  [ProjData,errormsg]=proj_points(FieldData,ObjectData)%%
    130130%-------------------------------------------------------------------
    131 
     131ProjData=[];%default output
    132132siz=size(ObjectData.Coord);
    133133width=0;
     
    143143if isfield(ObjectData,'RangeZ')&&~isempty(ObjectData.RangeZ)
    144144    width=max(width,max(ObjectData.RangeZ));
     145end
     146if isfield(ObjectData,'RangeInterp')&&~isempty(ObjectData.RangeInterp)
     147    width=ObjectData.RangeInterp;
    145148end
    146149if isequal(ObjectData.ProjMode,'projection')
  • trunk/src/series.m

    r1085 r1090  
    706706   
    707707%% get the input root name, indices, file extension and nomenclature NomType
    708 if ~exist(fileinput,'file')
     708if isempty(regexp(fileinput,'^http')) && ~exist(fileinput,'file')
    709709    errormsg=['input file ' fileinput  ' does not exist'];
    710710    msgbox_uvmat('ERROR',errormsg)
     
    16011601    Param.IndexRange.NbSlice=[];
    16021602end
     1603OutputPath=get(handles.OutputPath,'String');
    16031604
    16041605%% Look for processing on multiple experiments set by the GUI browse_data
     
    16241625        for iexp=1:numel(ListExp)
    16251626            if ~isempty(regexp(ListExp{iexp},'^\+/'))% if it is a folder
    1626                 if strcmp(get(BrowseData.DataSeries,'enable'),'off');%case of a multiple input line for series
     1627                if strcmp(get(BrowseData.DataSeries,'enable'),'off') %case of a multiple input line for series
    16271628                    NbExp=NbExp+1;
    16281629                    ExpIndex{NbExp}=iexp;
     
    16301631                        lpath= fullfile(SourceDir,regexprep(ListExp{iexp},'^\+/',''),...
    16311632                            regexprep(ListDevices{idevice},'^\+/',''));
     1633                        lpathout=fullfile(OutputPath,regexprep(ListExp{iexp},'^\+/',''),...
     1634                            regexprep(ListDevices{idevice},'^\+/',''));
    16321635                        ldir=regexprep(ListDataSeries{idevice},'^\+/','');
    16331636                        ListPath{idevice,NbExp}=lpath;
     1637                        ListPathOut{idevice,NbExp}=lpathout;
    16341638                        ListSubdir{idevice,NbExp}=ldir;
    16351639                    end
     
    16411645                                    lpath= fullfile(SourceDir,regexprep(ListExp{iexp},'^\+/',''),...
    16421646                                        regexprep(ListDevices{idevice},'^\+/',''));
     1647                                    lpathout= fullfile(OutputPath,regexprep(ListExp{iexp},'^\+/',''),...
     1648                                        regexprep(ListDevices{idevice},'^\+/',''));
    16431649                                    ldir= regexprep(ListDataSeries{isubdir},'^\+/','');
    16441650                                    if exist(fullfile(lpath,ldir),'dir')
     
    16461652                                        ExpIndex{NbExp}=iexp;
    16471653                                        ListPath{NbExp}=lpath;
     1654                                        ListPathOut{NbExp}=lpathout;
    16481655                                        ListSubdir{NbExp}=ldir;
    16491656                                    end
     
    16611668    end
    16621669end
    1663 %      set(handles.OutputSubDir,'String',SubDir)
    1664 %      Param.OutputSubDir=SubDir;
     1670
    16651671%%%%%%%%%%%%%%%%%%% LOOP ON EXPERIMENTS POSSIBLY SET BY THE GUI browse_data, NbExp=1 otherwise %%%%%%%%%
     1672
    16661673for iexp=1:NbExp
    16671674    if get(handles.Replicate,'Value')
     
    16891696    answer='';
    16901697    if isfield(Param,'OutputSubDir')% possibly update the output dir if it already exists
     1698        PathOut=get(handles.OutputPath,'String');
     1699        if ~exist(PathOut,'dir') % test if  the dir  already exist
     1700        PathOut=uigetdir(PathOut,'pick the output root path')
     1701        set(handles.OutputPath,'String',PathOut);
     1702        end
     1703        PathExpOut=fullfile(PathOut,get(handles.Experiment,'String'));
     1704        if ~exist(PathExpOut,'dir')
     1705            [tild,msg1]=mkdir(PathExpOut);
     1706            if ~strcmp(msg1,'')
     1707                errormsg=['cannot create ' PathExpOut ': ' msg1]; % error message for directory creation
     1708                return
     1709            end
     1710        end
     1711        PathExpDeviceOut=fullfile(PathExpOut,get(handles.Device,'String'));
     1712        if ~exist(PathExpDeviceOut,'dir')
     1713            [tild,msg1]=mkdir(PathExpDeviceOut);
     1714            if ~strcmp(msg1,'')
     1715                errormsg=['cannot create ' PathExpDeviceOut ': ' msg1]; % error message for directory creation
     1716                return
     1717            end
     1718        end
    16911719        SubDirOut=[Param.OutputSubDir Param.OutputDirExt];
    16921720        SubDirOutNew=SubDirOut;
    1693         detect=exist(fullfile(Param.InputTable{1,1},SubDirOutNew),'dir'); % test if  the dir  already exist
     1721        detect=exist(fullfile(PathExpDeviceOut,SubDirOutNew),'dir'); % test if  the dir  already exist
    16941722        check_create=1; % need to create the result directory by default
    16951723        CheckOverwrite=1;
    16961724        if isfield(Param,'CheckOverwrite')
    1697             CheckOverwrite=Param.CheckOverwrite;
     1725            CheckOverwrite=Param.CheckOverwrite;% will overwrite previous data if it is equal to 1
    16981726        end
    16991727        while detect
     
    17031731                comment=', will complement existing result files (no overwriting)';
    17041732            end
    1705             answer=msgbox_uvmat('INPUT_Y-N-Cancel',['use existing ouput directory: ' fullfile(Param.InputTable{1,1},SubDirOutNew) comment]);
     1733            answer=msgbox_uvmat('INPUT_Y-N-Cancel',['use existing ouput directory: ' fullfile(PathExpDeviceOut,SubDirOutNew) comment]);
    17061734            if strcmp(answer,'Cancel')
    17071735                break
     
    17161744                end
    17171745                SubDirOutNew=[r(1).root num2str(str2num(r(1).num1)+1)]; % increment the index by 1 or put 1
    1718                 detect=exist(fullfile(Param.InputTable{1,1},SubDirOutNew),'dir'); % test if  the dir  already exists
     1746                detect=exist(fullfile(PathExpDeviceOut,SubDirOutNew),'dir'); % test if  the dir  already exists
    17191747                check_create=1;
    17201748            end
     
    17251753        Param.OutputDirExt=regexprep(SubDirOutNew,['^' Param.OutputSubDir],'');
    17261754        Param.OutputRootFile=Param.InputTable{1,3}; % the first sorted RootFile taken for output
    1727         OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]); % full name (with path) of output directory
     1755        OutputDir=fullfile(PathExpDeviceOut,[Param.OutputSubDir Param.OutputDirExt]); % full name (with path) of output directory
    17281756        if check_create    % create output directory if it does not exist
    17291757            [tild,msg1]=mkdir(OutputDir);
     
    24452473    FieldList=set_field_list('U','V'); % standard menu for civx data
    24462474    if max(get(handles.FieldName,'Value'))>numel(FieldList)
    2447     set(handles.FieldName,'Value',1); % velocity vector choice by default
     2475        set(handles.FieldName,'Value',1); % velocity vector choice by default
    24482476    end
    24492477    if  VelTypeRequest_1 && numel(iview_civ)>=2
     
    25002528    set(handles_coord,'Visible','on')
    25012529    if isempty(find(strcmp('add_field...',FieldList)))
    2502     FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already
     2530        FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already
    25032531    end
    25042532    if FieldNameRequest_1 && numel(iview_netcdf)>=2
     
    25642592    set(handles.MinIndex_j,'Data',MinIndex_j(iview,:));
    25652593    set(handles.MaxIndex_i,'Data',MaxIndex_i(iview,:));
    2566     set(handles.MaxIndex_j,'Data',MaxIndex_j(iview,:));;
     2594    set(handles.MaxIndex_j,'Data',MaxIndex_j(iview,:));
    25672595    TimeTable=get(handles.TimeTable,'Data');
    25682596    if size(TimeTable,1)<size(Param.InputTable,1)%if the time table is not complete, copy the missing lines from the previous ones
     
    26532681end
    26542682set(handles.FieldTransform,'Visible',FieldTransformVisible)
    2655 if isfield(ParamOut,'TransformPath');% record the path of transform function requested for compilation
     2683if isfield(ParamOut,'TransformPath')% record the path of transform function requested for compilation
    26562684    set(handles.TransformPath,'UserData',ParamOut.TransformPath)
    26572685else
     
    26842712end
    26852713
    2686 %% definition of the directory containing the output files
     2714%% definition of the path for the output files
     2715InputTable=get(handles.InputTable,'Data');
     2716[OutputPath,Device,DeviceExt]=fileparts(InputTable{1,1});
     2717[OutputPath,Experiment,ExperimentExt]=fileparts(OutputPath);
     2718set(handles.Device,'String',[Device DeviceExt])
     2719set(handles.Device,'Visible','on')
     2720set(handles.Device_title,'Visible','on')
     2721set(handles.Experiment,'String',[Experiment ExperimentExt])
     2722set(handles.Experiment,'Visible','on')
     2723set(handles.Experiment_title,'Visible','on')
     2724OutputPathOld=get(handles.OutputPath,'String')
     2725if isempty(OutputPathOld)
     2726    if ~isempty(regexp(InputTable{1,1},'(^http://)|(^https://)'))
     2727        OutputPath=uigetdir(pwd,'pick a root folder for output data');
     2728    end
     2729    set(handles.OutputPath,'String',OutputPath)
     2730end
     2731set(handles.Experiment_title,'Visible','on')
     2732set(handles.OutputPath,'Visible','on')
     2733set(handles.OutputPathBrowse,'Visible','on')
     2734   
     2735%% definition of the subdirectory containing the output files
     2736
    26872737if  ~(isfield(SeriesData,'ActionName') && strcmp(ActionName,SeriesData.ActionName))
    26882738    OutputDirExt='.series'; % default
     
    26982748    OutputSubDirMode=ParamOut.OutputSubDirMode;
    26992749end
    2700 InputTable=get(handles.InputTable,'Data');
    27012750switch OutputSubDirMode
    2702     case 'auto'; % default
     2751    case 'auto' % default
    27032752        OutputDirVisible='on';
    27042753        SubDir=InputTable(1:end,2); % set of subdirectories
     
    27272776set(handles.OutputDirExt,'Visible',OutputDirVisible)
    27282777set(handles.OutputSubDir,'Visible',OutputDirVisible)
    2729 %set(handles.CheckOverwrite,'Visible',OutputDirVisible)
    27302778set(handles.OutputDir_title,'Visible',OutputDirVisible)
    27312779SeriesData.ActionName=ActionName; % record ActionName for next use
     
    28102858    FirstFileName=fullfile_uvmat(InputTable{LineIndex,1},InputTable{LineIndex,2},InputTable{LineIndex,3},...
    28112859        InputTable{LineIndex,5},InputTable{LineIndex,4},i1,i2,j1,j2);
    2812     if exist(FirstFileName,'file')
     2860    if exist(FirstFileName,'file') || ~isempty(regexp(InputTable{LineIndex,1},'^http'))
    28132861        ParamIn.Title='get_field: pick input variables and coordinates for series processing';
    28142862        ParamIn.SeriesInput=1;
     
    34773525    drawnow
    34783526    Param=read_GUI(handles.series);
    3479     RootPath=Param.InputTable{1,1};
     3527    RootPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device);
    34803528    if ~isfield(Param,'OutputSubDir')   
    34813529        msgbox_uvmat('ERROR','no standard sub-directory definition for output files, use a browser to check the output')
     
    38953943end
    38963944
     3945
     3946
     3947
     3948function OutputPath_Callback(hObject, eventdata, handles)
     3949% hObject    handle to OutputPath (see GCBO)
     3950% eventdata  reserved - to be defined in a future version of MATLAB
     3951% handles    structure with handles and user data (see GUIDATA)
     3952
     3953% Hints: get(hObject,'String') returns contents of OutputPath as text
     3954%        str2double(get(hObject,'String')) returns contents of OutputPath as a doubl
     3955
     3956
     3957
     3958function Experiment_Callback(hObject, eventdata, handles)
     3959% hObject    handle to Experiment (see GCBO)
     3960% eventdata  reserved - to be defined in a future version of MATLAB
     3961% handles    structure with handles and user data (see GUIDATA)
     3962
     3963% Hints: get(hObject,'String') returns contents of Experiment as text
     3964%        str2double(get(hObject,'String')) returns contents of Experiment as a double
     3965
     3966
     3967function Device_Callback(hObject, eventdata, handles)
     3968% hObject    handle to Device (see GCBO)
     3969% eventdata  reserved - to be defined in a future version of MATLAB
     3970% handles    structure with handles and user data (see GUIDATA)
     3971
     3972
     3973
     3974% --- Executes on button press in OutputPathBrowse.
     3975function OutputPathBrowse_Callback(hObject, eventdata, handles)
     3976OutputPath=uigetdir(get(handles.OutputPath,'String'));
     3977set(handles.OutputPath,'String',OutputPath)
  • trunk/src/series/civ_series.m

    r1089 r1090  
    331331    end
    332332    if CheckInputFile
     333        OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device);
    333334        if iview_A==0 % no nc file has been entered
    334             ncfile=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},Param.InputTable{1,5},...
     335            ncfile=fullfile_uvmat(OutputPath,Param.InputTable{1,2},Param.InputTable{1,3},Param.InputTable{1,5},...
    335336                NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    336337        else% an existing nc file has been entered
     
    341342            end
    342343            if strcmp(Param.ActionInput.ListCompareMode,'PIV')
    343                 ncfile=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.nc',NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),...
     344                ncfile=fullfile_uvmat(OutputPath,Civ1Dir,RootFile_A,'.nc',NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),...
    344345                    j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    345346            else
    346                 ncfile=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
     347                ncfile=fullfile_uvmat(OutputPath,Civ1Dir,RootFile_A,'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
    347348                    j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    348349            end
    349350        end
    350351        ncfile_out=ncfile;% by default
     352       
    351353        if isfield (Param.ActionInput,'Civ2')
    352354            i1_civ2=i1_series_Civ2(ifield);
     
    409411                        end
    410412                    end
    411                     if ~exist(ImageName_A,'file')
     413                    if isempty(regexp(ImageName_A,'(^http://)|(^https://)')) && ~exist(ImageName_A,'file')
    412414                        disp([ImageName_A ' missing'])
    413415                        continue
     
    425427                        FileType_B=FileInfo_B.FileType;
    426428                    end
    427                     if ~exist(ImageName_B,'file')
     429                    if isempty(regexp(ImageName_B,'(^http://)|(^https://)')) && ~exist(ImageName_B,'file')
    428430                        disp([ImageName_B ' missing'])
    429431                        continue
     
    492494                par_civ1.Mask=mask; %use mask already opened
    493495            else
    494                 if exist(maskname,'file')
     496                if ~isempty(regexp(maskname,'(^http://)|(^https://)'))|| exist(maskname,'file')
    495497                    try
    496498                        par_civ1.Mask=imread(maskname);%update the mask, an store it for future use
  • trunk/src/series/merge_proj.m

    r1084 r1090  
    252252    CheckOverwrite=Param.CheckOverwrite;
    253253end
     254OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device);
    254255for index=1:NbField
    255256        update_waitbar(WaitbarHandle,index/NbField)
     
    276277        end
    277278    end
    278     OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFileOut,FileExtOut,NomTypeOut,i1,i2,j1,j2);
     279    OutputFile=fullfile_uvmat(OutputPath,OutputDir,RootFileOut,FileExtOut,NomTypeOut,i1,i2,j1,j2);
    279280    if ~CheckOverwrite && exist(OutputFile,'file')
    280281            disp(['existing output file ' OutputFile ' already exists, skip to next field'])
  • trunk/src/set_field_list.m

    r1071 r1090  
    4141    ['div(' UName ',' VName ')'];...
    4242    ['strain(' UName ',' VName ')'];...
     43    ['DUDX(' UName ',' VName ')'];...
     44    ['DUDY(' UName ',' VName ')'];...
     45    ['DVDX(' UName ',' VName ')'];...
     46    ['DVDY(' UName ',' VName ')'];...
    4347    UName;...
    4448    VName};
  • trunk/src/uigetfile_uvmat.m

    r1084 r1090  
    196196fig_struct=get(hObject,'parent');
    197197if isstruct(fig_struct)%recent Matlab
    198 uiresume(fig_struct.Number)
    199 else
    200    uiresume(fig_struct)
     198    uiresume(fig_struct.Number)
     199else
     200    uiresume(fig_struct)
    201201end
    202202
  • trunk/src/uvmat.m

    r1088 r1090  
    468468end
    469469
     470% --------------------------------------------------------------------
     471function MenuBrowseOpendap_Callback(hObject, eventdata, handles)
     472    oldfile=get(hObject,'Label');
     473fileinput=uigetfile_uvmat('pick an input file',oldfile);
     474hh=dir(fileinput);
     475if numel(hh)>1
     476    msgbox_uvmat('ERROR','invalid input, probably a broken link');
     477else
     478
     479    %% display the selected field and related information
     480    if ~isempty(fileinput)
     481        set(handles.SubField,'Value',0)
     482        desable_subfield(handles)
     483        display_file_name(handles,fileinput)
     484    end
     485end
     486
    470487% -----------------------------------------------------------------------
    471488% --- Open again the file whose name has been recorded in MenuFile
     
    486503    end
    487504end
     505
     506
    488507
    489508% -----------------------------------------------------------------------
     
    21042123%% look for the input file existence
    21052124errormsg='';%default
    2106 if isempty(regexp(fileinput,'^http://')) && ~exist(fileinput,'file')
     2125if isempty(regexp(fileinput,'^http')) && ~exist(fileinput,'file')
    21072126    errormsg=['input file ' fileinput  ' does not exist'];
    21082127    msgbox_uvmat('ERROR',errormsg)
     
    22552274       
    22562275        %enable other menus
    2257         set(handles.MenuOpenCampaign,'Enable','on')
     2276%         set(handles.MenuOpenCampaign,'Enable','on')
    22582277        set(handles.MenuExport,'Enable','on')
    22592278        set(handles.MenuExportFigure,'Enable','on')
     
    63026321
    63036322
     6323
     6324
Note: See TracChangeset for help on using the changeset viewer.