Changeset 377
- Timestamp:
- Jan 17, 2012, 12:11:44 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/check_data_files.m
r374 r377 25 25 26 26 %requests for the visibility of input windows in the GUI series (activated directly by the selection in the menu ACTION) 27 if ~exist(' num_i1_cell','var')27 if ~exist('Param','var') 28 28 GUI_input={'RootPath';'many';...%nbre of possible input series (options 'on'/'two'/'many', default:'one') 29 29 'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default) … … 67 67 % number of views 68 68 count=0; 69 nbview= length(RootFile);69 nbview=numel(RootFile); 70 70 71 71 for iview=1:nbview 72 filebase=fullfile(Series.RootPath{iview},Series.RootFile{iview});%root file name 73 if testcell 74 num_i1=num_i1_cell{iview}; num_i2=num_i2_cell{iview}; num_j1=num_j1_cell{iview}; num_j2=num_j2_cell{iview}; 75 else 76 num_i1=num_i1_cell; num_i2=num_i2_cell; num_j1=num_j1_cell; num_j2=num_j2_cell; 77 end 78 siz=size(num_i1); 79 nbfield2=siz(1); %nb of consecutive fields at each level(burst 80 nbfield=siz(1)*siz(2); 72 filebase=fullfile(RootPath{iview},RootFile{iview});%root file name 73 % if testcell 74 % num_i1=num_i1_cell{iview}; num_i2=num_i2_cell{iview}; num_j1=num_j1_cell{iview}; num_j2=num_j2_cell{iview}; 75 % else 76 % num_i1=num_i1_cell; num_i2=num_i2_cell; num_j1=num_j1_cell; num_j2=num_j2_cell; 77 % end 78 % siz=size(num_i1); 79 nbfield=size(i1_series{iview},1); 80 nbfield2=size(i1_series{iview},2); %nb of consecutive fields at each level(burst 81 nbfield=numel(i1_series{iview}); 81 82 nbfield=floor(nbfield/(nbfield2*NbSlice));%total number of i indexes (adjusted to an integer number of slices) 82 if isequal(lower( Series.FileExt{iview}),'.avi')83 info=aviinfo([filebase Series.FileExt{iview}]);83 if isequal(lower(FileExt{iview}),'.avi') 84 info=aviinfo([filebase FileExt{iview}]); 84 85 message{1}=info.Filename; 85 86 message{2}=info.FileModDate; … … 103 104 update_waitbar(hseries.waitbar_frame,WaitbarPos,index/(nbfield*nbfield2)) 104 105 ifile=indselect(index); 105 file=... 106 name_generator(filebase,num_i1(ifile),num_j1(ifile),Series.FileExt{iview},Series.NomType{iview},1,num_i2(ifile),num_j2(ifile),Series.SubDir{iview}); 106 % file=... 107 % name_generator(filebase,num_i1(ifile),num_j1(ifile),FileExt{iview},NomType{iview},1,num_i2(ifile),num_j2(ifile),SubDir{iview}); 108 file=filecell{iview,ifile}; 107 109 [Path,Name,ext]=fileparts(file); 108 110 detect=exist(file,'file'); % check the existence of the file … … 117 119 filefound(ifile)={datfile.name}; 118 120 lastfield=''; 119 if isequal(Series.FileExt{iview},'.nc') || isequal(Series.FileExt{iview},'.cdf') 120 % check the content netcdf file 121 Data=nc2struct(file,'ListGlobalAttribute','patch2','fix2','civ2','patch','fix','absolut_time_T0','hart'); 122 if ~isempty(Data.patch2) && isequal(Data.patch2,1) 123 lastfield='patch2'; 124 elseif ~isempty(Data.fix2) && isequal(Data.fix2,1) 125 lastfield='fix2'; 126 elseif ~isempty(Data.civ2) && isequal(Data.civ2,1); 127 lastfield='civ2'; 128 elseif ~isempty(Data.patch) && isequal(Data.patch,1); 129 lastfield='patch1'; 130 elseif ~isempty(Data.fix) && isequal(Data.fix,1); 131 lastfield='fix1'; 132 elseif ~isempty(Data.absolut_time_T0) && ~isempty(Data.hart) 133 lastfield='civ1'; 134 end 135 end 121 [FileType,FileInfo,Object]=get_file_type(file); 122 if strcmp(FileType,'civx')||strcmp(FileType,'civdata') 123 if isfield(FileInfo,'CivStage') 124 liststage={'civ1','fix1','patch1','civ2','fix2','patch2'}; 125 lastfield=liststage{FileInfo.CivStage}; 126 end 127 end 128 lastfield=[FileType ', ' lastfield]; 136 129 end 137 130 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]};
Note: See TracChangeset
for help on using the changeset viewer.