1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of check_functions</title> |
---|
6 | <meta name="keywords" content="check_functions"> |
---|
7 | <meta name="description" content="'check_functions': check the path and modification date for all the"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../index.html">Home</a> > <a href="index.html">.</a> > check_functions.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>check_functions |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
24 | <div class="box"><strong>'check_functions': check the path and modification date for all the</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
27 | <div class="box"><strong>function [errormsg,date_str]=check_functions </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">'check_functions': check the path and modification date for all the |
---|
31 | function in the toolbox UVMAT. Called at the opening of uvmat.fig |
---|
32 | ---------------------------------------------------------------------- |
---|
33 | function [errormsg,date_str]=check_functions |
---|
34 | |
---|
35 | OUTPUT: |
---|
36 | errormsg: error message listing functions whose paths are not in the directory of uvmat.m |
---|
37 | date_str: date of the most recent modification of a file in the toolbox |
---|
38 | |
---|
39 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
---|
40 | Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, sommeria@coriolis-legi.org. |
---|
41 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
---|
42 | This file is part of the toolbox UVMAT. |
---|
43 | |
---|
44 | UVMAT is free software; you can redistribute it and/or modify |
---|
45 | it under the terms of the GNU General Public License as published by |
---|
46 | the Free Software Foundation; either version 2 of the License, or |
---|
47 | (at your option) any later version. |
---|
48 | |
---|
49 | UVMAT is distributed in the hope that it will be useful, |
---|
50 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
51 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
52 | GNU General Public License (file UVMAT/COPYING.txt) for more details. |
---|
53 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</pre></div> |
---|
54 | |
---|
55 | <!-- crossreference --> |
---|
56 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
57 | This function calls: |
---|
58 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
59 | </ul> |
---|
60 | This function is called by: |
---|
61 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
62 | <li><a href="get_field.html" class="code" title="function varargout = get_field(varargin)">get_field</a> 'get_field': display variables and attributes from a Netcdf file, and plot selected fields</li><li><a href="series.html" class="code" title="function varargout = series(varargin)">series</a> 'series': master function associated to the GUI series.m for analysis field series</li><li><a href="uvmat.html" class="code" title="function varargout = uvmat(varargin)">uvmat</a> 'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization</li></ul> |
---|
63 | <!-- crossreference --> |
---|
64 | |
---|
65 | |
---|
66 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
67 | <div class="fragment"><pre>0001 <span class="comment">%'check_functions': check the path and modification date for all the</span> |
---|
68 | 0002 <span class="comment">% function in the toolbox UVMAT. Called at the opening of uvmat.fig</span> |
---|
69 | 0003 <span class="comment">%----------------------------------------------------------------------</span> |
---|
70 | 0004 <span class="comment">% function [errormsg,date_str]=check_functions</span> |
---|
71 | 0005 <span class="comment">%</span> |
---|
72 | 0006 <span class="comment">% OUTPUT:</span> |
---|
73 | 0007 <span class="comment">% errormsg: error message listing functions whose paths are not in the directory of uvmat.m</span> |
---|
74 | 0008 <span class="comment">% date_str: date of the most recent modification of a file in the toolbox</span> |
---|
75 | 0009 <span class="comment">%</span> |
---|
76 | 0010 <span class="comment">%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</span> |
---|
77 | 0011 <span class="comment">% Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, sommeria@coriolis-legi.org.</span> |
---|
78 | 0012 <span class="comment">%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</span> |
---|
79 | 0013 <span class="comment">% This file is part of the toolbox UVMAT.</span> |
---|
80 | 0014 <span class="comment">%</span> |
---|
81 | 0015 <span class="comment">% UVMAT is free software; you can redistribute it and/or modify</span> |
---|
82 | 0016 <span class="comment">% it under the terms of the GNU General Public License as published by</span> |
---|
83 | 0017 <span class="comment">% the Free Software Foundation; either version 2 of the License, or</span> |
---|
84 | 0018 <span class="comment">% (at your option) any later version.</span> |
---|
85 | 0019 <span class="comment">%</span> |
---|
86 | 0020 <span class="comment">% UVMAT is distributed in the hope that it will be useful,</span> |
---|
87 | 0021 <span class="comment">% but WITHOUT ANY WARRANTY; without even the implied warranty of</span> |
---|
88 | 0022 <span class="comment">% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> |
---|
89 | 0023 <span class="comment">% GNU General Public License (file UVMAT/COPYING.txt) for more details.</span> |
---|
90 | 0024 <span class="comment">%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</span> |
---|
91 | 0025 |
---|
92 | 0026 <a name="_sub0" href="#_subfunctions" class="code">function [errormsg,date_str]=check_functions</a> |
---|
93 | 0027 errormsg={};<span class="comment">%default</span> |
---|
94 | 0028 list_fct={<span class="string">'calc_field'</span>;<span class="keyword">...</span><span class="comment">% defines fields (velocity, vort, div...) from civx data and calculate them </span> |
---|
95 | 0029 <span class="string">'cell2tab'</span>;<span class="keyword">...</span><span class="comment"> %transform a Matlab cell in a character array suitable for display in a table</span> |
---|
96 | 0030 <span class="string">'check_functions'</span>;<span class="keyword">...</span><span class="comment"> </span> |
---|
97 | 0031 <span class="string">'civ'</span>;<span class="keyword">...</span><span class="comment"> %function associated with the interface 'civ.fig' for PIV and spline interpolation</span> |
---|
98 | 0032 <span class="string">'civ.fig'</span>;<span class="keyword">...</span> |
---|
99 | 0033 <span class="string">'civ_3D'</span>;<span class="keyword">...</span><span class="comment"> function associated with the interface 'civ_3D.fig' for PIV in volume (in progress) </span> |
---|
100 | 0034 <span class="string">'civ_3D.fig'</span>;<span class="keyword">...</span> |
---|
101 | 0035 <span class="string">'close_fig'</span>;<span class="keyword">...</span><span class="comment">% function activated when a figure is closed</span> |
---|
102 | 0036 <span class="string">'copyfields'</span>;<span class="keyword">...</span><span class="comment">%copy fields between two matlab structures</span> |
---|
103 | 0037 <span class="string">'delete_object'</span>;<span class="keyword">...</span><span class="comment">%delete a projection object, defined by its index in the Uvmat list or by its graphic handle</span> |
---|
104 | 0038 <span class="string">'editxml'</span>;<span class="keyword">...</span><span class="comment">%display and edit xml files using a xls schema</span> |
---|
105 | 0039 <span class="string">'editxml.fig'</span>;<span class="keyword">...</span><span class="comment">%interface for editxml</span> |
---|
106 | 0040 <span class="string">'find_field_indices'</span>;<span class="keyword">...</span><span class="comment">% group the variables of a nc-formated Matlab structure into 'fields' with common dimensions</span> |
---|
107 | 0041 <span class="string">'geometry_calib'</span>;<span class="keyword">...</span><span class="comment">%performs geometric calibration from a set of reference points</span> |
---|
108 | 0042 <span class="string">'geometry_calib.fig'</span>;<span class="keyword">...</span><span class="comment">%interface for geometry_calib</span> |
---|
109 | 0043 <span class="string">'get_field'</span>;<span class="keyword">...</span><span class="comment">% choose and plot a field from a Netcdf file</span> |
---|
110 | 0044 <span class="string">'get_field.fig'</span>;<span class="keyword">...</span><span class="comment">%interface for get_field</span> |
---|
111 | 0045 <span class="string">'get_plot_handles'</span>;<span class="keyword">...</span><span class="comment"> %provides handles of elements setting the plotting parameters in the uvmat interface</span> |
---|
112 | 0046 <span class="string">'griddata_uvmat'</span>;<span class="keyword">...</span><span class="comment">%make 2D linear interpolation using griddata, with input appropriate for both Matlab 6.5 and 7</span> |
---|
113 | 0047 <span class="string">'hist_update'</span>;<span class="keyword">...</span><span class="comment">% update of a current global histogram by inclusion of a new field </span> |
---|
114 | 0048 <span class="string">'imadoc2struct'</span>;<span class="keyword">...</span><span class="comment">%convert the image documentation file ImaDoc into a Matlab structure</span> |
---|
115 | 0049 <span class="string">'keyboard_callback'</span>;<span class="keyword">...</span><span class="comment"> % function activated when a key is pressed on the keyboard </span> |
---|
116 | 0050 <span class="string">'ListDir'</span>;<span class="keyword">...</span><span class="comment"> scan the structure of the directory tree (for dataview.m)</span> |
---|
117 | 0051 <span class="string">'mouse_down'</span>;<span class="comment">% function activated when the mouse button is pressed on a figure (callback for 'WindowButtonDownFcn')</span> |
---|
118 | 0052 <span class="string">'mouse_motion'</span>;<span class="keyword">...</span><span class="comment">% permanently called by mouse motion over a figure (callback for 'WindowButtonMotionFcn')</span> |
---|
119 | 0053 <span class="string">'mouse_up'</span>;<span class="keyword">...</span><span class="comment"> % function to be activated when the mouse button is released (callback for 'WindowButtonUpFcn')</span> |
---|
120 | 0054 <span class="string">'msgbox_uvmat'</span>;<span class="keyword">...</span><span class="comment"> associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls</span> |
---|
121 | 0055 <span class="string">'msgbox_uvmat.fig'</span>;<span class="keyword">...</span> |
---|
122 | 0056 <span class="string">'name2display'</span>;<span class="keyword">...</span><span class="comment">% extracts the root name and field numbers from an input filename </span> |
---|
123 | 0057 <span class="string">'name_generator'</span>;<span class="keyword">...</span><span class="comment">%creates a file name from a root name and indices. </span> |
---|
124 | 0058 <span class="string">'nc2struct'</span>;<span class="keyword">...</span><span class="comment">% transform a netcdf file in a corresponding matlab structure</span> |
---|
125 | 0059 <span class="string">'peaklock'</span>;<span class="keyword">...</span><span class="comment">%</span> |
---|
126 | 0060 <span class="string">'phys'</span>;<span class="keyword">...</span><span class="comment">% transforms fields from image (px) to real world (phys) coordinates using geometric calibration parameters</span> |
---|
127 | 0061 <span class="string">'phys_polar'</span>;<span class="keyword">...</span><span class="comment"> transform image coordinates (px) to physical ploar coordinates</span> |
---|
128 | 0062 <span class="string">'phys_XYZ'</span>;<span class="keyword">...</span><span class="comment">%transforms image (px) to real world (phys) coordinates using geometric calibration parameters</span> |
---|
129 | 0063 <span class="string">'px'</span>;<span class="keyword">...</span><span class="comment">% transform fields from physical to px coordinates using geometrical calibration parameters</span> |
---|
130 | 0064 <span class="string">'px_XYZ'</span>;<span class="keyword">...</span><span class="comment">% ransform physical to px coordinates using geometrical calibration parameters</span> |
---|
131 | 0065 <span class="string">'plot_field'</span>;<span class="keyword">...</span><span class="comment">%displays a vector field and/or scalar or images</span> |
---|
132 | 0066 <span class="string">'plot_object'</span>;<span class="keyword">...</span><span class="comment">%draws a projection object (points, line, plane...)</span> |
---|
133 | 0067 <span class="string">'proj_field'</span>;<span class="keyword">...</span><span class="comment">%project a field on a projection object (plane, line,...)</span> |
---|
134 | 0068 <span class="string">'read_civxdata'</span>;<span class="keyword">...</span><span class="comment">reads civx data from netcdf files</span> |
---|
135 | 0069 <span class="string">'read_imatext'</span>;<span class="keyword">...</span><span class="comment">%read .civ files (obsolete, but can be adapted to other text documentation files)</span> |
---|
136 | 0070 <span class="string">'read_plot_param'</span>;<span class="keyword">...</span><span class="comment"> %read the plotting option parameters on the uvmat interface</span> |
---|
137 | 0071 <span class="string">'read_set_object'</span>;<span class="keyword">...</span><span class="comment">%read the data on the set_object interface</span> |
---|
138 | 0072 <span class="string">'read_xls'</span>;<span class="keyword">...</span><span class="comment">%read excel files containing the list of the experiments</span> |
---|
139 | 0073 <span class="string">'reinit'</span>;<span class="keyword">...</span><span class="comment">% suppress the personal parameter file 'uvmat_perso.mat' </span> |
---|
140 | 0074 <span class="string">'RUN_FIX'</span>;<span class="keyword">...</span><span class="comment">% fix velocity fields</span> |
---|
141 | 0075 <span class="string">'RUN_STLIN'</span>;<span class="keyword">...</span><span class="comment">% combine 2 displacement fields for stereo PIV</span> |
---|
142 | 0076 <span class="string">'series'</span>;<span class="keyword">...</span><span class="comment">% master function for analysis field series, with interface 'series.fig'</span> |
---|
143 | 0077 <span class="string">'series.fig'</span>;<span class="keyword">...</span><span class="comment">% interface for 'series'</span> |
---|
144 | 0078 <span class="string">'set_col_vec'</span>;<span class="keyword">...</span> |
---|
145 | 0079 <span class="string">'set_grid'</span>;<span class="keyword">...</span><span class="comment">% creates a grid for PIV</span> |
---|
146 | 0080 <span class="string">'set_grid.fig'</span>;<span class="keyword">...</span><span class="comment">% interface for set_grid</span> |
---|
147 | 0081 <span class="string">'set_object.m'</span>;<span class="keyword">...</span><span class="comment">% edit a projection object</span> |
---|
148 | 0082 <span class="string">'set_object.fig'</span>;<span class="keyword">...</span><span class="comment">% interface for set_object</span> |
---|
149 | 0083 <span class="string">'sub_field'</span>;<span class="keyword">...</span><span class="comment">% combine the two input fields, </span> |
---|
150 | 0084 <span class="string">'struct2nc'</span>;<span class="keyword">...</span><span class="comment">% %write fields in netcdf files</span> |
---|
151 | 0085 <span class="string">'uvmat'</span>;<span class="keyword">...</span><span class="comment">% master function for file scanning and visualisation of 2D fields</span> |
---|
152 | 0086 <span class="string">'uvmat.fig'</span>;<span class="keyword">...</span><span class="comment"> %interface for uvmat </span> |
---|
153 | 0087 <span class="string">'update_obj'</span>;<span class="keyword">...</span><span class="comment"> update the object representation graph and its projection field, record it in the uvmat interface</span> |
---|
154 | 0088 <span class="string">'update_waitbar'</span>;<span class="keyword">...</span><span class="comment"> update the waitbar display, used for ACTION functions in the GUI 'series'</span> |
---|
155 | 0089 <span class="string">'warndlg_uvmat'</span>;<span class="keyword">...</span><span class="comment">% display messages (error, warning, confirmation) , OBSOLETE, use msgbox_uvmat </span> |
---|
156 | 0090 <span class="string">'write_plot_param'</span>};<span class="comment">%update plotting parameters after plot</span> |
---|
157 | 0091 dir_fct=which(<span class="string">'uvmat'</span>);<span class="comment">% path to uvmat</span> |
---|
158 | 0092 [pathuvmat,name,ext]=fileparts(dir_fct); |
---|
159 | 0093 icount=0; |
---|
160 | 0094 <span class="comment">% loop on the list of functions in the uvmat package</span> |
---|
161 | 0095 <span class="keyword">for</span> i=1:length(list_fct) |
---|
162 | 0096 dir_fct=which(list_fct{i});<span class="comment">% path to fct</span> |
---|
163 | 0097 <span class="keyword">if</span> isempty(dir_fct) |
---|
164 | 0098 icount=icount+1; |
---|
165 | 0099 errormsg{icount}=[list_fct{i} <span class="string">' not found'</span>];<span class="comment">% test for function not found</span> |
---|
166 | 0100 <span class="keyword">else</span> |
---|
167 | 0101 [pth,name,ext]=fileparts(dir_fct); |
---|
168 | 0102 <span class="keyword">if</span> ~isequal(pathuvmat,pth) |
---|
169 | 0103 icount=icount+1; |
---|
170 | 0104 errormsg{icount}=[dir_fct <span class="string">' overrides the package UVMAT'</span>];<span class="comment">% bad path for the function</span> |
---|
171 | 0105 <span class="keyword">end</span> |
---|
172 | 0106 datfile=dir(dir_fct); |
---|
173 | 0107 date_str=datfile.date;<span class="comment">%string of the date of last modification</span> |
---|
174 | 0108 datnum(i)=0;<span class="comment">%default</span> |
---|
175 | 0109 char_code=double(date_str);<span class="comment">% code of the date characters</span> |
---|
176 | 0110 special_char=(char_code>127); <span class="comment">%non standard Ascii character (e.g. date in french)</span> |
---|
177 | 0111 <span class="keyword">if</span> isempty(find(special_char))<span class="comment">% standard Ascii character</span> |
---|
178 | 0112 datnum(i)=datenum(date_str); |
---|
179 | 0113 <span class="keyword">end</span> |
---|
180 | 0114 <span class="keyword">end</span> |
---|
181 | 0115 <span class="keyword">end</span> |
---|
182 | 0116 errormsg=errormsg'; |
---|
183 | 0117 date_str=datestr(max(datnum));</pre></div> |
---|
184 | <hr><address>Generated on Fri 13-Nov-2009 11:17:03 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
185 | </body> |
---|
186 | </html> |
---|