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

Last change on this file since 84 was 27, checked in by gostiaux, 15 years ago

files separated from series.m

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