- Timestamp:
- Jun 25, 2012, 10:50:51 AM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_files.m
r475 r476 54 54 'fileparts_uvmat';...% extracts the root name,field indexes and nomenclature type from an input filename 55 55 'fill_GUI';...% fill a GUI with handles 'handles' from input data Param 56 'filter_tps';...% find the thin plate spline coefficients for interpolation-smoothing 56 57 'find_field_indices';...% group the variables of a nc-formated Matlab structure into 'fields' with common dimensions 57 58 'find_file_series';...%check the content of an input file and find the corresponding file series … … 128 129 129 130 %% loop on the list of functions in the uvmat package 130 131 131 icount=0; 132 132 datnum=zeros(1,length(list_fct)); … … 160 160 [tild,result]=system(['svn status' dir_fct]); 161 161 svn_info.status=result; 162 errormsg =[errormsg {['SVN revision : ' num2str(svn_info.cur_rev)]}]; 162 163 if svn_info.rep_rev>svn_info.cur_rev 163 errormsg {length(errormsg)+1}=['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']; 164 errormsg =[errormsg ... 165 {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}]; 164 166 end 165 167 modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match'); 166 168 if ~isempty(modifications) 167 for k=1:length(modifications) 168 errormsg {length(errormsg)+1}=modifications{k}; 169 end 169 errormsg=[errormsg modifications]; 170 170 end 171 else 172 errormsg=[errormsg {'SVN not available'}]; 171 173 end 172 174 catch ME 173 errormsg= ME.message;175 errormsg=[errormsg {'SVN not available'}]; 174 176 end 175 177 errormsg=errormsg'; -
trunk/src/civ.m
r469 r476 356 356 elseif ~isempty(Data.absolut_time_T0')% case of civx data, 357 357 set(handles.Program,'Value',1) %select Cix by default 358 ListProgram_Callback([],[], handles)358 Program_Callback([],[], handles) 359 359 if ~isempty(Data.fix2) 360 360 ind_opening=5; … … 423 423 set(handles.RootFile,'String',RootFile) 424 424 if strcmp(ExtInput,'.nc') 425 SubDirCiv=regexprep(SubDir,[Su ddirImages '^'],'');%suppress the root SuddirImages;425 SubDirCiv=regexprep(SubDir,[SubdirImages '^'],'');%suppress the root SuddirImages; 426 426 else 427 427 SubDirCiv= '.civ'; … … 449 449 450 450 %% look for an image documentation file 451 XmlFileName=find_imadoc(RootPath,SubDir,RootFile, FileExt);451 XmlFileName=find_imadoc(RootPath,SubDir,RootFile,ImaExt); 452 452 % SubDirBase=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.' 453 453 % filexml=fullfile(RootPath,[SubDirBase '.xml']);% new convention: xml above the image dir … … 482 482 [XmlData,warntext]=imadoc2struct(XmlFileName); 483 483 nom_type_read=[]; 484 if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file485 [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName);486 fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file,487 if ~exist(fullname,'file')488 msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist'])489 end490 end484 % if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file 485 % [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName); 486 % fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file, 487 % if ~exist(fullname,'file') 488 % msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist']) 489 % end 490 % end 491 491 if isfield(XmlData,'Time') && ~isempty(XmlData.Time) 492 492 time=XmlData.Time; … … 1183 1183 end 1184 1184 if Param.CheckCiv2 1185 [Param.Civ2.FileTypeA, FileInfoA_civ2,Param.Civ2.ImageA]=get_file_type(filecell.ima1.civ2{1});1186 [Param.Civ2.FileTypeB, FileInfoB_civ2,Param.Civ2.ImageB]=get_file_type(filecell.ima2.civ2{1});1185 [Param.Civ2.FileTypeA,ImageInfoA_civ2,Param.Civ2.ImageA]=get_file_type(filecell.ima1.civ2{1}); 1186 [Param.Civ2.FileTypeB,ImageInfoB_civ2,Param.Civ2.ImageB]=get_file_type(filecell.ima2.civ2{1}); 1187 1187 end 1188 1188 % end … … 1206 1206 1207 1207 if Param.CheckCiv1 1208 % read image-dependent parameters 1209 1208 % read image-dependent parameters 1210 1209 if ~checkframe% && size(time,1)>=i2_civ1(ifile) && size(time,2)>=j2_civ1(j) 1211 1210 Param.Civ1.Dt=(time(i2_civ1(ifile)+1,j2_civ1(j)+1)-time(i1_civ1(ifile)+1,j1_civ1(j)+1)); … … 1220 1219 Param.Civ1.ImageA=filecell.ima1.civ1{ifile,j}; 1221 1220 Param.Civ1.ImageB=filecell.ima2.civ1{ifile,j}; 1222 Param.Civ1.ImageBitDepth= FileInfoA_civ1.BitDepth;1223 Param.Civ1.ImageWidth= FileInfoA_civ1.Width;1224 Param.Civ1.ImageHeight= FileInfoA_civ1.Height;1221 Param.Civ1.ImageBitDepth=ImageInfoA_civ1.BitDepth; 1222 Param.Civ1.ImageWidth=ImageInfoA_civ1.Width; 1223 Param.Civ1.ImageHeight=ImageInfoA_civ1.Height; 1225 1224 Param.Civ1.FrameIndexA=i1_civ1(ifile); 1226 1225 Param.Civ1.FrameIndexB=i2_civ1(ifile); … … 1294 1293 end 1295 1294 1296 Param.Civ2.ImageBitDepth= FileInfoA_civ2.BitDepth;1297 Param.Civ2.ImageWidth= FileInfoA_civ2.Width;1298 Param.Civ2.ImageHeight= FileInfoA_civ2.Height;1295 Param.Civ2.ImageBitDepth=ImageInfoA_civ2.BitDepth; 1296 Param.Civ2.ImageWidth=ImageInfoA_civ2.Width; 1297 Param.Civ2.ImageHeight=ImageInfoA_civ2.Height; 1299 1298 Param.Civ2.FrameIndexA=i1_civ2(ifile); 1300 1299 Param.Civ2.FrameIndexB=i2_civ2(ifile); … … 1499 1498 else 1500 1499 for p=1:length(batch_file_list) 1501 fid=fopen( batch_file_list{p}); 1500 % civ_matlab([batch_file_list{p} '.xml'], [batch_file_list{p} '.nc']) 1501 fid=fopen(batch_file_list{p}); 1502 1502 eval(fscanf(fid,'%s')); 1503 1503 fclose(fid); -
trunk/src/fill_GUI.m
r472 r476 47 47 set(hh,'String',input_data) 48 48 case{'listbox','popupmenu'} 49 input_data50 49 if isnumeric(input_data) 51 50 input_data=num2str(input_data); … … 59 58 iline=find(strcmp(input_data{idata},menu)); 60 59 if isempty(iline) 61 values(idata)= numel(menu)+1;62 menu=[ menu;input_data(idata)];60 values(idata)=1; 61 menu=[input_data(idata);menu]; 63 62 else 64 values(idata)=iline ;63 values(idata)=iline(1); 65 64 end 66 65 end 67 set(hh,'String', [menu;input_data(idata)])66 set(hh,'String',menu) 68 67 set(hh,'Value',values) 69 68 end -
trunk/src/filter_tps.m
r389 r476 1 %'filter_tps': find the thin plate spline coefficients for interpolation-smoothing 1 2 %------------------------------------------------------------------------ 2 % patch function 3 % [SubRange,NbSites,Coord_tps,U_tps,V_tps,W_tps,U_smooth,V_smooth,W_smooth,FF] =filter_tps(Coord,U,V,W,SubDomain,Rho,Threshold) 4 % 3 5 % OUTPUT: 4 6 % SubRange(NbCoord,NbSubdomain,2): range (min, max) of the coordiantes x and y respectively, for each subdomain … … 10 12 % 11 13 % INPUT: 12 % X, Y: set of coordinates of the initial data14 % coord=[X Y]: matrix whose first column is the x coordinates of the initial data, the second column the y coordiantes 13 15 % U,V: set of velocity components of the initial data 14 16 % Rho: smoothing parameter … … 16 18 % Subdomain: estimated number of data points in each subdomain 17 19 18 %function [SubRangx,SubRangy,nbpoints,FF,U_smooth,V_smooth,X_tps,Y_tps,U_tps,V_tps,Indices_tps] =filter_tps(Coord,U,V,W,SubDomain,Rho,Threshold)19 20 function [SubRange,NbSites,Coord_tps,U_tps,V_tps,W_tps,U_smooth,V_smooth,W_smooth,FF] =filter_tps(Coord,U,V,W,SubDomain,Rho,Threshold) 20 21 %subdomain decomposition 21 22 warning off 22 % U=reshape(U,[],1);23 % V=reshape(V,[],1);24 % X=reshape(X,[],1);25 % Y=reshape(Y,[],1);26 23 nbvec=size(Coord,1); 27 24 W_tps=[];%default … … 43 40 CentreY=reshape(CentreY,1,[]);% Y positions of subdomain centres 44 41 CentreX=reshape(CentreX,1,[]);% X positions of subdomain centres 45 rho=Siz(1)*Siz(2)*Rho/1000 000;%optimum rho increase as the area of the subdomain (division by 10^6 to reach good values with the default GUI input)42 rho=Siz(1)*Siz(2)*Rho/1000;%optimum rho increase as the area of the subdomain (division by 10^6 to reach good values with the default GUI input) 46 43 U_tps_sub=zeros(nbvec,NbSubDomain);%default spline 47 44 V_tps_sub=zeros(nbvec,NbSubDomain);%default spline -
trunk/src/series.m
r472 r476 101 101 end 102 102 if isfield(param,'FileName') 103 InputTable={'','','','',''}; 104 set(handles.InputTable,'Data',InputTable) 103 105 if isfield(param,'FileName_1') 104 106 display_file_name(handles,param.FileName_1,0) … … 107 109 display_file_name(handles,param.FileName,0) 108 110 end 109 InputTable={'','','','',''};110 set(handles.InputTable,'Data',InputTable)111 111 end 112 112 -
trunk/src/uvmat.m
r469 r476 207 207 guidata(hObject, handles); 208 208 209 %% check the path and date of modification of all functions in uvmat210 path_to_uvmat=which ('uvmat');% check the path detected for source file uvmat211 [errormsg,date_str,svn_info]=check_files;%check the path of the functions called by uvmat.m212 date_str=['last modification: ' date_str];213 214 215 209 %% set the position of colorbar and ancillary GUIs: 216 210 set(hObject,'Units','Normalized') … … 330 324 end 331 325 else 332 if ishandle(handles.UVMAT_title) 333 set(handles.UVMAT_title,'String',... 334 [{'Copyright LEGI UMR 5519 /CNRS-UJF-Grenoble INP, 2010'};... 335 {'GNU General Public License'};... 336 {path_to_uvmat};... 337 {date_str};... 338 {['SVN revision : ' num2str(svn_info.cur_rev)]};... 339 errormsg]); 340 end 326 %% check the path and date of modification of all functions in uvmat 327 path_to_uvmat=which ('uvmat');% check the path detected for source file uvmat 328 [infomsg,date_str,svn_info]=check_files;%check the path of the functions called by uvmat.m 329 date_str=['last modification: ' date_str]; 330 if ishandle(handles.UVMAT_title) 331 set(handles.UVMAT_title,'String',... 332 [{'Copyright LEGI UMR 5519 /CNRS-UJF-Grenoble INP, 2010'};... 333 {'GNU General Public License'};... 334 {path_to_uvmat};... 335 {date_str};... 336 infomsg]); 337 end 341 338 end 342 339 set(handles.uvmat,'UserData',UvData) … … 4127 4124 set(handles.ViewObject,'value',1) 4128 4125 ViewObject_Callback(hObject, eventdata, handles) 4129 % if isempty(hset_object)% open the GUI set_object with data of the currently selected object4130 % ViewObject_Callback(hObject, eventdata, handles)4131 % % hset_object=findobj(allchild(0),'Tag','set_object');4132 % else4133 % hhset_object=guidata(hset_object);4134 % set(hhset_object.PLOT,'enable','on');4135 % set(get(hset_object,'children'),'enable','on')4136 % end4137 4126 else % desctivate object edit mode 4138 4127 set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) … … 4586 4575 set(handles.edit_object,'Value',1) 4587 4576 edit_Callback(hObject, eventdata, handles) 4588 4589 % %------------------------------------------------------------------------4590 % function enable_transform(handles,state)4591 % %------------------------------------------------------------------------4592 % set(handles.transform_fct,'Visible',state)4593 % set(handles.TRANSFORM_txt,'Visible',state)4594 % set(handles.transform_fct,'Visible',state)4595 % set(handles.path_transform,'Visible',state)4596 % set(handles.pxcmx_txt,'Visible',state)4597 % set(handles.pxcmy_txt,'Visible',state)4598 % set(handles.pxcm,'Visible',state)4599 % set(handles.pycm,'Visible',state)4600 4577 4601 4578 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.