Changeset 190 for trunk/src/series
- Timestamp:
- Feb 2, 2011, 1:23:28 AM (14 years ago)
- Location:
- trunk/src/series
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r169 r190 368 368 end 369 369 end 370 370 371 % coordinate transform (or other user defined transform) 371 372 if ~isempty(transform_fct) … … 422 423 end 423 424 end 424 % else425 % nbmissing=nbmissing+1;426 % end427 425 end 428 426 end %end averaging loop … … 447 445 DataMean.Time_end=time(end,num_i1{end}(end),num_j1{end}(end)); 448 446 end 449 447 450 448 %writing the result file 451 449 if testima 452 % if NbSlice==1453 450 [filemean]=name_generator(filebase_out,num_i1{1}(1),num_j1{1}(1),'.png',NomTypeOut,1,num_i2{end}(end),num_j2{end}(end),subdir_result); 454 % else % label the file number by the slice # for simplicity455 % [filemean]=name_generator(filebase_out,i_slice,1,'.png','_i');456 % end457 451 if exist(filemean,'file') 458 452 backupfile=filemean; … … 485 479 DataMean.ListGlobalAttribute=[DataMean.ListGlobalAttribute {'Time','Time_end'}]; 486 480 end 487 % if NbSlice==1 488 filemean=name_generator(filebase_out,num_i1{1}(1),num_j1{1}(1),'.nc',NomTypeOut,1,num_i2{end}(end),num_j2{end}(end),subdir_result); 489 % else % label the file number by the slice # for simplicity 490 % [filemean]=name_generator(filebase_out,i_slice,1,'.nc','_i'); 491 % end 481 filemean=name_generator(filebase_out,num_i1{1}(1),num_j1{1}(1),'.nc',NomTypeOut,1,num_i2{end}(end),num_j2{end}(end),subdir_result); 492 482 if exist(filemean,'file') 493 483 backupfile=filemean; -
trunk/src/series/check_files.m
r169 r190 88 88 Tabchar=message; 89 89 else 90 datnum= [];90 datnum=zeros(1,nbfield); 91 91 Tabchar={}; 92 92 %LOOP ON SLICES … … 109 109 else 110 110 datfile=dir(file); 111 datnum(ifile)=datenum(datfile.date); 111 if isfield(datfile,'datenum') 112 datnum(ifile)=datfile.datenum; 113 end 112 114 filefound(ifile)={datfile.name}; 113 115 lastfield=''; -
trunk/src/series/time_series.m
r169 r190 37 37 WaitbarPos=get(hseries.waitbar_frame,'Position'); %position of the waitbar frame 38 38 39 % projection object39 %% projection object 40 40 test_object=get(hseries.GetObject,'Value'); 41 41 if test_object … … 52 52 end 53 53 54 % root names54 %% root names 55 55 if iscell(Series.RootPath) 56 56 RootPath=Series.RootPath; … … 79 79 nbfield=size(num_i1{1},1)*size(num_i1{1},2); %number of fields in the time series 80 80 81 %Number of input series: this function accepts only a single input file series81 %Number of input series: this function accepts only one or two input file series (sub_field is used in the latter case) 82 82 nbview=length(RootPath); 83 if nbview==284 %TODO: choose between difference and two series85 elseif nbview>2 % TODO: make multiple series86 % RootPath=RootPath(1:2);87 % set(hseries.RootPath,'String',RootPath)88 % SubDir=SubDir(1:2);89 % set(hseries.SubDir,'String',SubDir)90 % RootFile=RootFile(1:2);91 % set(hseries.RootFile,'String',RootFile)92 % NomType=NomType(1:2);93 % %set(hseries.NomType,'String',NomType)94 % FileExt=FileExt(1:2);95 % set(hseries.FileExt,'String',FileExt)96 % nbview=2;97 end98 83 99 84 %determine image type … … 147 132 return 148 133 end 149 %hhget_field=guidata(hget_field);%handles of GUI elements in get_field150 134 SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI 151 135 if isempty(SubField) … … 155 139 SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI 156 140 end 157 % if isequal(get(hhget_field.menu_coord,'Visible'),'on')158 % list_transform=get(hhget_field.menu_coord,'String');159 % val_list=get(hhget_field.menu_coord,'Value');160 % transform=list_transform{val_list};161 % end162 141 end 163 142 164 143 %detect whether the two files are 'images' or 'netcdf' 165 % testima=0; 166 % testvol=0; 144 167 145 testcivx=0; 168 % testnc=0;169 146 FileExt=get(hseries.FileExt,'String'); 170 % for iview=1:nbview171 % ext=FileExt{iview};172 % form=imformats(ext([2:end]));173 % if isequal(lower(ext),'.vol')174 % testvol=testvol+1;175 % elseif ~isempty(form)||isequal(lower(ext),'.avi')% if the extension corresponds to an image format recognized by Matlab176 % testima=testima+1;177 % elseif isequal(ext,'.nc')178 % testnc=testnc+1;179 % end180 % end181 % if testvol182 % msgbox_uvmat('ERROR','volume images not implemented yet')183 % return184 % end185 % if testnc~=nbview && testima~=nbview && testvol~=nbview186 % msgbox_uvmat('need a set of images or a set of netcdf files with the same fields as input','ERROR')187 % return188 % end189 147 if ~isequal(FieldName,{'get_field...'}) 190 148 testcivx=isequal(FileType{1},'netcdf'); … … 200 158 end 201 159 202 % Calibration data and timing: read the ImaDoc files160 %% Calibration data and timing: read the ImaDoc files 203 161 mode=''; %default 204 162 timecell={}; … … 245 203 end 246 204 247 % check coincidence in time205 %% check coincidence in time 248 206 multitime=0; 249 207 if length(timecell)==0 … … 275 233 end 276 234 277 % Root name of output files (TO GENERALISE FOR TWO INPUT SERIES)235 %% Root name of output files (TO GENERALISE FOR TWO INPUT SERIES) 278 236 subdir_result='time_series'; 279 if ~exist(fullfile(RootPath{1},subdir_result),'dir') 280 dircur=pwd; %record current working directory 281 cd(RootPath{1})% goes to the iamge directory 282 [m1,m2,m3]=mkdir(subdir_result); 283 if ~isequal(m2,'') 284 msgbox_uvmat('CONFIRMATION',m2);%error message for directory creation 285 end 286 [xx,msg2] = fileattrib(subdir_result,'+w','g'); %yield writing access (+w) to user group (g) 287 if ~strcmp(msg2,'') 288 msgbox_uvmat('ERROR',['pb of permission for ' subdir_result ': ' msg2])%error message for directory creation 289 cd(dircur) 290 return 291 end 292 cd(dircur) %back to the initial working directory 293 end 237 pathdir=fullfile(RootPath{1},subdir_result); 238 while exist(pathdir,'dir') 239 pathdir=[pathdir '.0']; 240 end 241 [m1,m2,m3]=mkdir(pathdir); 242 if ~isequal(m2,'') 243 msgbox_uvmat('CONFIRMATION',m2);%error message for directory creation 244 end 245 [xx,msg2] = fileattrib(pathdir,'+w','g'); %yield writing access (+w) to user group (g) 246 if ~strcmp(msg2,'') 247 msgbox_uvmat('ERROR',['pb of permission for ' subdir_result ': ' msg2])%error message for directory creation 248 return 249 end 250 294 251 filebase_out=filebase{1}; 295 252 NomTypeOut=nomtype2pair(NomType{1},num_i2{end}(end)-num_i1{1}(1),num_j2{end}(end)-num_j1{1}(1)); 296 253 297 % coordinate transform or other user defined transform254 %% coordinate transform or other user defined transform 298 255 transform_fct=[];%default 299 256 if isfield(Series,'transform_fct') … … 301 258 end 302 259 303 % to update:260 %% velocity type 304 261 VelType_str=get(hseries.VelTypeMenu,'String'); 305 262 VelType_val=get(hseries.VelTypeMenu,'Value'); … … 311 268 end 312 269 313 % LOOP ON SLICES270 %% LOOP ON SLICES 314 271 for i_slice=1:NbSlice 315 272 dt=[];
Note: See TracChangeset
for help on using the changeset viewer.