- Timestamp:
- Feb 19, 2015, 8:54:16 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/time_series.m
r874 r875 61 61 62 62 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed 63 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 63 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 64 64 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 65 65 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) … … 75 75 % check for selection of a projection object 76 76 hseries=findobj(allchild(0),'Tag','series');% handles of the GUI series 77 hhseries=guidata(hseries); 77 78 if ~isfield(Param,'ProjObject') 78 79 answer=msgbox_uvmat('INPUT_Y-N','use a projection object for the time_series?'); 79 80 if strcmp(answer,'Yes') 80 hhseries=guidata(hseries);81 81 set(hhseries.CheckObject,'Visible','on') 82 82 set(hhseries.CheckObject,'Value',1) … … 84 84 end 85 85 end 86 86 87 % introduce bin size for histograms 87 88 if isfield(Param,'CheckObject') &&Param.CheckObject 88 89 SeriesData=get(hseries,'UserData'); 89 90 if ismember(SeriesData.ProjObject.ProjMode,{'inside','outside'}) 90 91 answer=msgbox_uvmat('INPUT_TXT','set bin size for histograms (or keep ''auto'' by default)?','auto'); 91 92 ParamOut.ActionInput.VarMesh=str2double(answer); 92 93 end 93 94 end 95 94 96 % test for subtraction 95 if size(Param.InputTable,1)==2 96 answer=msgbox_uvmat('INPUT_Y-N','substract the two input file series (Yes) or concatene them (No)'); 97 ParamOut.ActionInput.CheckSub=str2double(answer); 98 end 97 if size(Param.InputTable,1)>2 98 msgbox_uvmat('WARNING','''time_series'' uses only one or two input lines (two for substraction). To concatene fields first use ''merge_proj'''); 99 end 100 if size(Param.InputTable,1)>=2 101 answer=msgbox_uvmat('INPUT_Y-N','substract the two input file series?'); 102 if strcmp(answer,'Yes') 103 if isempty(Param.FieldTransform.TransformName) 104 set(hhseries.TransformName,'value',2) %select sub_field 105 end 106 else 107 set(hhseries.InputTable,'Data',Param.InputTable(1,:)) 108 end 109 end 110 99 111 % check the existence of the first and last file in the series 100 112 first_j=[]; 101 113 if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end 102 114 last_j=[]; … … 291 303 end 292 304 end 293 CheckSub=0;%default 294 if isfield(Parma,'ActionInput') && isfield(Param.ActionInput,'CheckSub') 295 CheckSub=ParamOut.ActionInput.CheckSub; 296 end 305 297 306 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% 298 307 for index=1:nbfield … … 322 331 % coordinate transform (or other user defined transform) 323 332 if ~isempty(transform_fct) 324 if CheckSub 325 switch nargin(transform_fct) 326 case 4 327 if length(Data)==2 328 Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2}); 329 else 330 Field=transform_fct(Data{1},XmlData{1}); 331 end 332 case 3 333 if length(Data)==2 334 Field=transform_fct(Data{1},XmlData{1},Data{2}); 335 else 336 Field=transform_fct(Data{1},XmlData{1}); 337 end 338 case 2 333 switch nargin(transform_fct) 334 case 4 335 if length(Data)==2 336 Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2}); 337 else 339 338 Field=transform_fct(Data{1},XmlData{1}); 340 case 1 341 Field=transform_fct(Data{1}); 342 end 343 else 344 if nargin(transform_fct)>=2 345 for iview=1:nbview 346 Data{iview}=transform_fct(Data{iview},XmlData{iview}); 347 end 348 else 349 for iview=1:nbview 350 Data{iview}=transform_fct(Data{iview}); 351 end 352 end 339 end 340 case 3 341 if length(Data)==2 342 Field=transform_fct(Data{1},XmlData{1},Data{2}); 343 else 344 Field=transform_fct(Data{1},XmlData{1}); 345 end 346 case 2 347 Field=transform_fct(Data{1},XmlData{1}); 348 case 1 349 Field=transform_fct(Data{1}); 353 350 end 354 351 end
Note: See TracChangeset
for help on using the changeset viewer.