- Timestamp:
- Jan 21, 2021, 3:59:54 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r1076 r1090 153 153 set(handles.SourceDir,'BackgroundColor',[1 1 0])% indicate action of button by yellow color 154 154 drawnow 155 SourceDir=get(handles.SourceDir,'String'); 156 [SourcePath,ProjectName]=fileparts(SourceDir); 155 SourcePath=get(handles.SourceDir,'String'); 156 if ~isempty(regexp(SourcePath,'^http')) 157 SourcePath=pwd; 158 SourcePath=regexprep(SourcePath,'^\/.fsnet','/fsnet'); 159 end 160 161 162 ProjectList=get(handles.ListExperiments,'String'); 163 ProjectName=ProjectList{get(handles.ListExperiments,'Value')}; 164 ProjectName=regexprep(ProjectName,'^\+/',''); 157 165 if strcmp(get(handles.MirrorDir,'Visible'),'on') 158 MirrorDir=get(handles.MirrorDir,'String');% name of the mirror folder166 MirrorDir=get(handles.MirrorDir,'String');% name of the mirror folder 159 167 else% 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') 186 195 end 187 196 ExpName={''}; … … 189 198 %% update the mirror from the source dir 190 199 if exist(SourceDir,'dir') 191 hdir=dir(SourceDir); %list files and dirs192 idir=0;193 for ilist=1:length(hdir)194 if hdir(ilist).isdir% scan all subfolders195 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 mirror199 if ~exist(mirror,'dir')200 mkdir(mirror)% create the mirror folder if it does not exist201 end202 ExpName{idir}=['+/' hdir(ilist).name];% insert '+/' in the list to show that it is a folder203 end204 % look for the list of 'devices'205 else206 %warning for isolated files207 end208 end209 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 experiment213 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 222 else 223 msgbox_uvmat('ERROR',['The input ' SourceDir ' is not a directory']) 215 224 end 216 225 set(handles.SourceDir,'BackgroundColor',[1 1 1]) -
trunk/src/calc_field_tps.m
r1071 r1090 98 98 DataOut.(FieldNameType)=zeros(nb_sites,1); 99 99 VarAttributeNew{1}.Role='scalar'; 100 case {'curl','div','strain' }100 case {'curl','div','strain','DUDX','DUDY','DVDX','DVDY'} 101 101 check_der=1; 102 102 DataOut.(FieldNameType)=zeros(nb_sites,1); … … 105 105 VarAttribute=[VarAttribute VarAttributeNew]; 106 106 end 107 %Attr_FF.Role='errorflag';108 %VarAttribute=[VarAttribute {Attr_FF}];109 107 FieldName(check_remove)=[]; 110 108 … … 138 136 case 'div(U,V)' 139 137 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);142 138 case 'strain(U,V)' 143 139 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); 144 148 end 145 149 end -
trunk/src/plot_field.m
r1077 r1090 968 968 colormap('jet'); % default matlab colormap ('jet') 969 969 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 else976 set(haxes,'DataAspectRatio',[1 1 1])977 end978 end979 970 else %usual images (no contour) 980 971 % set colormap for image display … … 1052 1043 set(hima,'AlphaData',1)% full opacity (no transparency) by default 1053 1044 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]) 1054 1053 end 1055 1054 end -
trunk/src/proj_field.m
r1085 r1090 129 129 function [ProjData,errormsg]=proj_points(FieldData,ObjectData)%% 130 130 %------------------------------------------------------------------- 131 131 ProjData=[];%default output 132 132 siz=size(ObjectData.Coord); 133 133 width=0; … … 143 143 if isfield(ObjectData,'RangeZ')&&~isempty(ObjectData.RangeZ) 144 144 width=max(width,max(ObjectData.RangeZ)); 145 end 146 if isfield(ObjectData,'RangeInterp')&&~isempty(ObjectData.RangeInterp) 147 width=ObjectData.RangeInterp; 145 148 end 146 149 if isequal(ObjectData.ProjMode,'projection') -
trunk/src/series.m
r1085 r1090 706 706 707 707 %% get the input root name, indices, file extension and nomenclature NomType 708 if ~exist(fileinput,'file')708 if isempty(regexp(fileinput,'^http')) && ~exist(fileinput,'file') 709 709 errormsg=['input file ' fileinput ' does not exist']; 710 710 msgbox_uvmat('ERROR',errormsg) … … 1601 1601 Param.IndexRange.NbSlice=[]; 1602 1602 end 1603 OutputPath=get(handles.OutputPath,'String'); 1603 1604 1604 1605 %% Look for processing on multiple experiments set by the GUI browse_data … … 1624 1625 for iexp=1:numel(ListExp) 1625 1626 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 series1627 if strcmp(get(BrowseData.DataSeries,'enable'),'off') %case of a multiple input line for series 1627 1628 NbExp=NbExp+1; 1628 1629 ExpIndex{NbExp}=iexp; … … 1630 1631 lpath= fullfile(SourceDir,regexprep(ListExp{iexp},'^\+/',''),... 1631 1632 regexprep(ListDevices{idevice},'^\+/','')); 1633 lpathout=fullfile(OutputPath,regexprep(ListExp{iexp},'^\+/',''),... 1634 regexprep(ListDevices{idevice},'^\+/','')); 1632 1635 ldir=regexprep(ListDataSeries{idevice},'^\+/',''); 1633 1636 ListPath{idevice,NbExp}=lpath; 1637 ListPathOut{idevice,NbExp}=lpathout; 1634 1638 ListSubdir{idevice,NbExp}=ldir; 1635 1639 end … … 1641 1645 lpath= fullfile(SourceDir,regexprep(ListExp{iexp},'^\+/',''),... 1642 1646 regexprep(ListDevices{idevice},'^\+/','')); 1647 lpathout= fullfile(OutputPath,regexprep(ListExp{iexp},'^\+/',''),... 1648 regexprep(ListDevices{idevice},'^\+/','')); 1643 1649 ldir= regexprep(ListDataSeries{isubdir},'^\+/',''); 1644 1650 if exist(fullfile(lpath,ldir),'dir') … … 1646 1652 ExpIndex{NbExp}=iexp; 1647 1653 ListPath{NbExp}=lpath; 1654 ListPathOut{NbExp}=lpathout; 1648 1655 ListSubdir{NbExp}=ldir; 1649 1656 end … … 1661 1668 end 1662 1669 end 1663 % set(handles.OutputSubDir,'String',SubDir) 1664 % Param.OutputSubDir=SubDir; 1670 1665 1671 %%%%%%%%%%%%%%%%%%% LOOP ON EXPERIMENTS POSSIBLY SET BY THE GUI browse_data, NbExp=1 otherwise %%%%%%%%% 1672 1666 1673 for iexp=1:NbExp 1667 1674 if get(handles.Replicate,'Value') … … 1689 1696 answer=''; 1690 1697 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 1691 1719 SubDirOut=[Param.OutputSubDir Param.OutputDirExt]; 1692 1720 SubDirOutNew=SubDirOut; 1693 detect=exist(fullfile(Pa ram.InputTable{1,1},SubDirOutNew),'dir'); % test if the dir already exist1721 detect=exist(fullfile(PathExpDeviceOut,SubDirOutNew),'dir'); % test if the dir already exist 1694 1722 check_create=1; % need to create the result directory by default 1695 1723 CheckOverwrite=1; 1696 1724 if isfield(Param,'CheckOverwrite') 1697 CheckOverwrite=Param.CheckOverwrite; 1725 CheckOverwrite=Param.CheckOverwrite;% will overwrite previous data if it is equal to 1 1698 1726 end 1699 1727 while detect … … 1703 1731 comment=', will complement existing result files (no overwriting)'; 1704 1732 end 1705 answer=msgbox_uvmat('INPUT_Y-N-Cancel',['use existing ouput directory: ' fullfile(Pa ram.InputTable{1,1},SubDirOutNew) comment]);1733 answer=msgbox_uvmat('INPUT_Y-N-Cancel',['use existing ouput directory: ' fullfile(PathExpDeviceOut,SubDirOutNew) comment]); 1706 1734 if strcmp(answer,'Cancel') 1707 1735 break … … 1716 1744 end 1717 1745 SubDirOutNew=[r(1).root num2str(str2num(r(1).num1)+1)]; % increment the index by 1 or put 1 1718 detect=exist(fullfile(Pa ram.InputTable{1,1},SubDirOutNew),'dir'); % test if the dir already exists1746 detect=exist(fullfile(PathExpDeviceOut,SubDirOutNew),'dir'); % test if the dir already exists 1719 1747 check_create=1; 1720 1748 end … … 1725 1753 Param.OutputDirExt=regexprep(SubDirOutNew,['^' Param.OutputSubDir],''); 1726 1754 Param.OutputRootFile=Param.InputTable{1,3}; % the first sorted RootFile taken for output 1727 OutputDir=fullfile(Pa ram.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]); % full name (with path) of output directory1755 OutputDir=fullfile(PathExpDeviceOut,[Param.OutputSubDir Param.OutputDirExt]); % full name (with path) of output directory 1728 1756 if check_create % create output directory if it does not exist 1729 1757 [tild,msg1]=mkdir(OutputDir); … … 2445 2473 FieldList=set_field_list('U','V'); % standard menu for civx data 2446 2474 if max(get(handles.FieldName,'Value'))>numel(FieldList) 2447 set(handles.FieldName,'Value',1); % velocity vector choice by default2475 set(handles.FieldName,'Value',1); % velocity vector choice by default 2448 2476 end 2449 2477 if VelTypeRequest_1 && numel(iview_civ)>=2 … … 2500 2528 set(handles_coord,'Visible','on') 2501 2529 if isempty(find(strcmp('add_field...',FieldList))) 2502 FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already2530 FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already 2503 2531 end 2504 2532 if FieldNameRequest_1 && numel(iview_netcdf)>=2 … … 2564 2592 set(handles.MinIndex_j,'Data',MinIndex_j(iview,:)); 2565 2593 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,:)); 2567 2595 TimeTable=get(handles.TimeTable,'Data'); 2568 2596 if size(TimeTable,1)<size(Param.InputTable,1)%if the time table is not complete, copy the missing lines from the previous ones … … 2653 2681 end 2654 2682 set(handles.FieldTransform,'Visible',FieldTransformVisible) 2655 if isfield(ParamOut,'TransformPath') ;% record the path of transform function requested for compilation2683 if isfield(ParamOut,'TransformPath')% record the path of transform function requested for compilation 2656 2684 set(handles.TransformPath,'UserData',ParamOut.TransformPath) 2657 2685 else … … 2684 2712 end 2685 2713 2686 %% definition of the directory containing the output files 2714 %% definition of the path for the output files 2715 InputTable=get(handles.InputTable,'Data'); 2716 [OutputPath,Device,DeviceExt]=fileparts(InputTable{1,1}); 2717 [OutputPath,Experiment,ExperimentExt]=fileparts(OutputPath); 2718 set(handles.Device,'String',[Device DeviceExt]) 2719 set(handles.Device,'Visible','on') 2720 set(handles.Device_title,'Visible','on') 2721 set(handles.Experiment,'String',[Experiment ExperimentExt]) 2722 set(handles.Experiment,'Visible','on') 2723 set(handles.Experiment_title,'Visible','on') 2724 OutputPathOld=get(handles.OutputPath,'String') 2725 if 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) 2730 end 2731 set(handles.Experiment_title,'Visible','on') 2732 set(handles.OutputPath,'Visible','on') 2733 set(handles.OutputPathBrowse,'Visible','on') 2734 2735 %% definition of the subdirectory containing the output files 2736 2687 2737 if ~(isfield(SeriesData,'ActionName') && strcmp(ActionName,SeriesData.ActionName)) 2688 2738 OutputDirExt='.series'; % default … … 2698 2748 OutputSubDirMode=ParamOut.OutputSubDirMode; 2699 2749 end 2700 InputTable=get(handles.InputTable,'Data');2701 2750 switch OutputSubDirMode 2702 case 'auto' ;% default2751 case 'auto' % default 2703 2752 OutputDirVisible='on'; 2704 2753 SubDir=InputTable(1:end,2); % set of subdirectories … … 2727 2776 set(handles.OutputDirExt,'Visible',OutputDirVisible) 2728 2777 set(handles.OutputSubDir,'Visible',OutputDirVisible) 2729 %set(handles.CheckOverwrite,'Visible',OutputDirVisible)2730 2778 set(handles.OutputDir_title,'Visible',OutputDirVisible) 2731 2779 SeriesData.ActionName=ActionName; % record ActionName for next use … … 2810 2858 FirstFileName=fullfile_uvmat(InputTable{LineIndex,1},InputTable{LineIndex,2},InputTable{LineIndex,3},... 2811 2859 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')) 2813 2861 ParamIn.Title='get_field: pick input variables and coordinates for series processing'; 2814 2862 ParamIn.SeriesInput=1; … … 3477 3525 drawnow 3478 3526 Param=read_GUI(handles.series); 3479 RootPath= Param.InputTable{1,1};3527 RootPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device); 3480 3528 if ~isfield(Param,'OutputSubDir') 3481 3529 msgbox_uvmat('ERROR','no standard sub-directory definition for output files, use a browser to check the output') … … 3895 3943 end 3896 3944 3945 3946 3947 3948 function 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 3958 function 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 3967 function 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. 3975 function OutputPathBrowse_Callback(hObject, eventdata, handles) 3976 OutputPath=uigetdir(get(handles.OutputPath,'String')); 3977 set(handles.OutputPath,'String',OutputPath) -
trunk/src/series/civ_series.m
r1089 r1090 331 331 end 332 332 if CheckInputFile 333 OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device); 333 334 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},... 335 336 NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 336 337 else% an existing nc file has been entered … … 341 342 end 342 343 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),... 344 345 j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 345 346 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),[],... 347 348 j1_series_Civ1(ifield),j2_series_Civ1(ifield)); 348 349 end 349 350 end 350 351 ncfile_out=ncfile;% by default 352 351 353 if isfield (Param.ActionInput,'Civ2') 352 354 i1_civ2=i1_series_Civ2(ifield); … … 409 411 end 410 412 end 411 if ~exist(ImageName_A,'file')413 if isempty(regexp(ImageName_A,'(^http://)|(^https://)')) && ~exist(ImageName_A,'file') 412 414 disp([ImageName_A ' missing']) 413 415 continue … … 425 427 FileType_B=FileInfo_B.FileType; 426 428 end 427 if ~exist(ImageName_B,'file')429 if isempty(regexp(ImageName_B,'(^http://)|(^https://)')) && ~exist(ImageName_B,'file') 428 430 disp([ImageName_B ' missing']) 429 431 continue … … 492 494 par_civ1.Mask=mask; %use mask already opened 493 495 else 494 if exist(maskname,'file')496 if ~isempty(regexp(maskname,'(^http://)|(^https://)'))|| exist(maskname,'file') 495 497 try 496 498 par_civ1.Mask=imread(maskname);%update the mask, an store it for future use -
trunk/src/series/merge_proj.m
r1084 r1090 252 252 CheckOverwrite=Param.CheckOverwrite; 253 253 end 254 OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device); 254 255 for index=1:NbField 255 256 update_waitbar(WaitbarHandle,index/NbField) … … 276 277 end 277 278 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); 279 280 if ~CheckOverwrite && exist(OutputFile,'file') 280 281 disp(['existing output file ' OutputFile ' already exists, skip to next field']) -
trunk/src/set_field_list.m
r1071 r1090 41 41 ['div(' UName ',' VName ')'];... 42 42 ['strain(' UName ',' VName ')'];... 43 ['DUDX(' UName ',' VName ')'];... 44 ['DUDY(' UName ',' VName ')'];... 45 ['DVDX(' UName ',' VName ')'];... 46 ['DVDY(' UName ',' VName ')'];... 43 47 UName;... 44 48 VName}; -
trunk/src/uigetfile_uvmat.m
r1084 r1090 196 196 fig_struct=get(hObject,'parent'); 197 197 if isstruct(fig_struct)%recent Matlab 198 uiresume(fig_struct.Number)199 else 200 uiresume(fig_struct)198 uiresume(fig_struct.Number) 199 else 200 uiresume(fig_struct) 201 201 end 202 202 -
trunk/src/uvmat.m
r1088 r1090 468 468 end 469 469 470 % -------------------------------------------------------------------- 471 function MenuBrowseOpendap_Callback(hObject, eventdata, handles) 472 oldfile=get(hObject,'Label'); 473 fileinput=uigetfile_uvmat('pick an input file',oldfile); 474 hh=dir(fileinput); 475 if numel(hh)>1 476 msgbox_uvmat('ERROR','invalid input, probably a broken link'); 477 else 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 485 end 486 470 487 % ----------------------------------------------------------------------- 471 488 % --- Open again the file whose name has been recorded in MenuFile … … 486 503 end 487 504 end 505 506 488 507 489 508 % ----------------------------------------------------------------------- … … 2104 2123 %% look for the input file existence 2105 2124 errormsg='';%default 2106 if isempty(regexp(fileinput,'^http ://')) && ~exist(fileinput,'file')2125 if isempty(regexp(fileinput,'^http')) && ~exist(fileinput,'file') 2107 2126 errormsg=['input file ' fileinput ' does not exist']; 2108 2127 msgbox_uvmat('ERROR',errormsg) … … 2255 2274 2256 2275 %enable other menus 2257 set(handles.MenuOpenCampaign,'Enable','on')2276 % set(handles.MenuOpenCampaign,'Enable','on') 2258 2277 set(handles.MenuExport,'Enable','on') 2259 2278 set(handles.MenuExportFigure,'Enable','on') … … 6302 6321 6303 6322 6323 6324
Note: See TracChangeset
for help on using the changeset viewer.