source: trunk/src/series/clean_civ_cmx.m @ 340

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

small corrections to fit with the new GUI series;fig

File size: 3.5 KB
Line 
1%'clean_civ_cmx': suppress all ancillary files used for PIV: ;cmx,log,.bat...
2%------------------------------------------------------------------------
3% function GUI_input=clean_civ_cmx(num_i1,num_i2,num_j1,num_j2,Series)
4%
5%OUTPUT
6% GUI_input=list of options in the GUI series.fig needed for the function
7%
8%INPUT:
9%num_i1: (not used) series of first indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
10%num_i2: (not used) series of second indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
11%num_j1: (not used) series of first indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ )
12%num_j2: (not used) series of second indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ)
13%Series: Matlab structure containing information set by the series interface
14%
15function GUI_input=clean_civ_cmx(num_i1,num_i2,num_j1,num_j2,Series) %(filecell,filecell_1,num_i,num_j,vel_type,field,param);
16
17%requests for the visibility of input windows in the GUI series  (activated directly by the selection in the menu ACTION)
18if ~exist('num_i1','var')
19    GUI_input={'RootPath';'many';...%nbre of possible input series (options 'on'/'two'/'many', default:'one')
20        'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default)
21        %'RootFile';'on';... %root input file name ('on' by default)
22        %'FileExt';'on';... %input file extension ('on' by default)
23        %'NomType';'on';...%type of file indexing ('on' by default)
24        %'NbSlice';'on'; ...%nbre of slices ('off' by default)
25        %'VelTypeMenu';'one';...% menu for selecting the velocity type (civ1,..) options 'off'/'one'/'two', 'off' by default)
26        %'FieldMenu';'one';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
27        %'CoordType';'on'...%can use a transform function 'off' by default
28        %'GetObject';'on'...%can use projection object ,'off' by default
29        %'GetMask';'on'...%can use mask option   ,'off' by default
30        %'PARAMETER'; options: name of the user defined parameter',repeat a line for each parameter
31               ''};
32    return %exit the function
33end
34%---------------------------------------------------------
35hseries=guidata(Series.hseries);%handles of the GUI series
36WaitbarPos=get(hseries.waitbar_frame,'Position');
37
38%%%%%%%%%%%%%%%%%%%%%%%%
39message='this function will delete all files with extensions .log, .bat, .cmx,.cmx2,.errors in the input directory(ies)';
40answer=msgbox_uvmat('INPUT_Y-N',message);
41if ~isequal(answer,'Yes')
42    return
43end
44nbdelete=0;
45testcell=iscell(Series.RootFile);
46if ~testcell
47    Series.RootPath={Series.RootPath};
48    Series.RootFile={Series.RootFile};
49    Series.SubDir={Series.SubDir};
50    Series.FileExt={Series.FileExt};
51    Series.NomType={Series.NomType};
52end
53for iview=1:length(Series.RootFile)
54    hdir=dir(fullfile(Series.RootPath{iview},Series.SubDir{iview}));%list files
55    for ilist=1:length(hdir)
56%         update_waitbar(hseries.waitbar,WaitbarPos,ilist/length(hdir))
57        FileName=hdir(ilist).name;
58        [dd,ff,Ext]=fileparts(FileName);
59        if isequal(Ext,'.log')||isequal(Ext,'.bat')||isequal(Ext,'.cmx')||isequal(Ext,'.cmx2')|| isequal(Ext,'.errors')
60            delete(fullfile(Series.RootPath{iview},Series.SubDir{iview},FileName))
61            nbdelete=nbdelete+1;
62        end
63    end
64end
65msgbox_uvmat('CONFIRMATION',['END: ' num2str(nbdelete) ' files deleted by clean_civ_cmx'])
66
67
68
Note: See TracBrowser for help on using the repository browser.