source: trunk/src/check_functions.m @ 204

Last change on this file since 204 was 204, checked in by sommeria, 13 years ago

put back deleted files

File size: 7.4 KB
[204]1%'check_functions': check the path and modification date for all the
2%  function in the toolbox UVMAT. Called at the opening of uvmat
4% function [errormsg,date_str]=check_functions
7% errormsg: error message listing functions whose paths are not in the directory of uvmat.m
8% date_str: date of the most recent modification of a file in the toolbox
11%  Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG,
13%     This file is part of the toolbox UVMAT.
15%     UVMAT is free software; you can redistribute it and/or modify
16%     it under the terms of the GNU General Public License as published by
17%     the Free Software Foundation; either version 2 of the License, or
18%     (at your option) any later version.
20%     UVMAT is distributed in the hope that it will be useful,
21%     but WITHOUT ANY WARRANTY; without even the implied warranty of
23%     GNU General Public License (file UVMAT/COPYING.txt) for more details.
26function [errormsg,date_str]=check_functions
28list_fct={'calc_field';...% defines fields (velocity, vort, div...) from civx data and calculate them 
29          'cell2tab';... %transform a Matlab cell in a character array suitable for display in a table
30          'check_field_structure';...% check the validity of the field struture representation consistant with the netcdf format
31          'check_functions';... 
32          'civ';...   %function associated with the interface 'civ.fig' for PIV and spline interpolation
33          'civ.fig';...
34          'civ_3D';... function associated with the interface 'civ_3D.fig' for PIV in volume (in progress)
35          'civ_3D.fig';...
36          'close_fig';...% function  activated when a figure is closed
37          'copyfields';...% copy fields between two matlab structures
38          'create_grid';...% called by the GUI geometry_calib to create a physical grid
39          'create_grid.fig';...% GUI corresponding to create_grid.m
40          'dataview';...% function for scanning directories in a campaign
41          'delete_object';...%delete a projection object, defined by its index in the Uvmat list or by its graphic handle 
42          'editxml';...%display and edit xml files using a xls schema
43          'editxml.fig';...%interface for editxml
44          'find_field_indices';...% group the variables of a nc-formated Matlab structure into 'fields' with common dimensions
45          'geometry_calib';...%performs geometric calibration from a set of reference points
46          'geometry_calib.fig';...%interface for geometry_calib
47          'get_field';...% choose and plot a field from a Netcdf file
48          'get_field.fig';...%interface for get_field
49          'griddata_uvmat';...%make 2D linear interpolation using griddata, with input appropriate for both Matlab 6.5 and 7
50          'hist_update';...%  update of a current global histogram by inclusion of a new field 
51          'imadoc2struct';...%convert the image documentation file ImaDoc into a Matlab structure
52          'keyboard_callback';... % function activated when a key is pressed on the keyboard
53          'ListDir';... scan the structure of the directory tree (for dataview.m)
54          'mouse_down';% function activated when the mouse button is pressed on a figure (callback for 'WindowButtonDownFcn')
55          'mouse_motion';...% permanently called by mouse motion over a figure (callback for 'WindowButtonMotionFcn')
56          'mouse_up';... % function to be activated when the mouse button is released (callback for 'WindowButtonUpFcn')
57          'msgbox_uvmat';... associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls
58          'msgbox_uvmat.fig';...
59          'name2display';...% extracts the root name and field numbers from an input filename
60          'name_generator';...%creates a file name from a root name and indices.
61          'nc2struct';...% transform a netcdf file in a corresponding matlab structure
62          'peaklock';...%
63          'plot_field';...%displays a vector field and/or scalar or images
64          'plot_object';...%draws a projection object (points, line, plane...)
65          'proj_field';...%project a field on a projection object (plane, line,...)
66          'read_civxdata';...reads civx data from netcdf files
67          'read_imatext';...%read .civ files (obsolete, but can be adapted to other text documentation files)
68           'read_plot_param';... %read the plotting option parameters on the uvmat interface
69           'read_set_object';...%read the data on the set_object interface
70           'read_xls';...%read excel files containing the list of the experiments
71           'reinit';...% suppress the personal parameter file 'uvmat_perso.mat'
72           'RUN_FIX';...% fix velocity fields
73           'RUN_STLIN';...% combine 2 displacement fields for stereo PIV
74           'series';...% master function for analysis field series, with interface 'series.fig'
75           'series.fig';...% interface for 'series'
76           'set_col_vec';...
77           'set_grid';...% creates a grid for PIV
78           'set_grid.fig';...% interface for set_grid
79           'set_object.m';...%  edit a projection object
80           'set_object.fig';...% interface for set_object
81           'sub_field';...% combine the two input fields,
82           'struct2nc';...% %write fields in netcdf files
83           'uvmat';...% master function for file scanning and visualisation of 2D fields
84           'uvmat.fig';...  %interface for uvmat 
85           'update_imadoc';...  %update the ImaDoc xml file
86           'update_obj';... update the object representation graph and its projection field, record it in the uvmat interface
87           'update_waitbar';... update the waitbar display, used for ACTION functions in the GUI 'series'
88           'view_field.m';...% function for visualisation of projected fields'
89           'view_field.fig';...%GUI for view_field
90            'write_plot_param'};%update plotting parameters after plot
91 dir_fct=which('uvmat');% path to uvmat
94% loop on the list of functions in the uvmat package
96 for i=1:length(list_fct)
97    dir_fct=which(list_fct{i});% path to fct
98    if isempty(dir_fct)
99        icount=icount+1;
100        errormsg{icount}=[list_fct{i} ' not found'];% test for function not found
101    else
102       [pth,name,ext]=fileparts(dir_fct);
103       if ~isequal(pathuvmat,pth)&~isequal(fullfile(pathuvmat,'private'),pth)
104           icount=icount+1;
105           errormsg{icount}=[dir_fct ' overrides the package UVMAT'];% bad path for the function
106       end
107       datfile=dir(dir_fct);
108       if isfield(datfile,'datenum')
109          datnum(i)= datfile.datenum;
110       end
111%;%string of the date of last modification
112%        datnum(i)=0;%default
113%        try
114%            datnum(i)=datenum(date_str);
115%        catch
116%            datnum(i)=0;%in case of error with datenum (e.g. date in french)
117%        end
118   end
Note: See TracBrowser for help on using the repository browser.