- Timestamp:
- May 3, 2014, 12:07:41 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r769 r770 243 243 end 244 244 245 %% introduce the input file name(s) if defined from input Param 245 %% introduce the input file name(s) if defined from input Param, TODO: avoid the file checking if Param.i1_series defined 246 246 if isfield(Param,'FileName')&&~isempty(Param.FileName) 247 247 InputTable={}; 248 248 set(handles.InputTable,'Data',InputTable) 249 display_file_name(handles,Param,'one')%refresh the input table 249 250 if isfield(Param,'FileName_1') 250 display_file_name(handles,Param.FileName,'one')%refresh the input table 251 display_file_name(handles,Param.FileName_1,1) 252 else 253 display_file_name(handles,Param.FileName,'one')%refresh the input table 251 Param.FileName=Param.FileName_1; 252 display_file_name(handles,Param,2) 254 253 end 255 254 else … … 567 566 %------------------------------------------------------------------------ 568 567 % --- Function called when a new file is opened, either by series_OpeningFcn or by the browser 569 function errormsg=display_file_name(handles, fileinput,iview)568 function errormsg=display_file_name(handles,Param,iview) 570 569 %------------------------------------------------------------------------ 571 570 % … … 579 578 drawnow 580 579 errormsg='';%default 580 if ischar(Param) 581 fileinput=Param; 582 else% input set when series is opened (called by the GUI uvmat) 583 fileinput=Param.FileName; 584 end 585 581 586 %% get the input root name, indices, file extension and nomenclature NomType 582 587 if ~exist(fileinput,'file') … … 589 594 %% detect root name, nomenclature and indices in the input file name: 590 595 [FilePath,FileName,FileExt]=fileparts(fileinput); 596 %%%%%%%%%%%%%%%%%% 597 %TODO: case of input by uvmat: do not check agai the input seies %%%%%%% 598 %%%%%%%%%%%%%%%%%%% 591 599 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 592 600 % the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists … … 1097 1105 %------------------------------------------------------------------------ 1098 1106 SeriesData=get(handles.series,'UserData');% 1107 if ~isfield(SeriesData,'Time') 1108 return 1109 end 1099 1110 PairString=get(handles.PairString,'Data'); 1100 1111 ref_i_1=str2num(get(handles.num_first_i,'String'));%first reference index … … 1408 1419 Param=read_GUI_series(handles);%displayed parameters 1409 1420 SeriesData=get(handles.series,'UserData');%hidden parameters 1421 if ~isfield(SeriesData,'i1_series') 1422 msgbox_uvmat('ERROR','The input field series needs to be refreshed: press REFRESH') 1423 return 1424 end 1410 1425 if isfield(Param,'InputFields')&& isequal(Param.InputFields.FieldName,'get_field...') 1411 1426 msgbox_uvmat('ERROR','input field name(s) not defined, select get_field...') … … 1535 1550 NbCore=1;% no need to split the calculation 1536 1551 case 'cluster_oar' 1537 if strcmp( Param.Action.ActionExt,'.m')% case of Matlab function (uncompiled)1552 if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled) 1538 1553 NbCore=1;% one core used only (limitation of Matlab licences) 1539 1554 msgbox_uvmat('WARNING','Number of cores =1: select the compiled version civ_matlab.sh for multi-core processing'); … … 1656 1671 ref_i=first_i:incr_i:last_i; 1657 1672 if isempty(incr_j) 1658 [ref_j,tild]=find(squeeze(SeriesData.i1_series{1}(1,:,:)));1659 ref_j=ref_j-1;1660 ref_j=ref_j(ref_j>=first_j & ref_j<=last_j);1673 [ref_j,tild]=find(squeeze(SeriesData.i1_series{1}(1,:,:))); 1674 ref_j=ref_j-1; 1675 ref_j=ref_j(ref_j>=first_j & ref_j<=last_j); 1661 1676 else 1662 1677 ref_j=first_j:incr_j:last_j; … … 1817 1832 system(['chmod +x ' filebat]);% set the file to executable 1818 1833 1819 case {'PCWIN','PCWIN64'} % TODO: adapt to Windows system 1820 % cmd=['matlab -automation -logfile ' regexprep(filelog,'\\','\\\\')... 1821 % ' -r "addpath(''' regexprep(path_series,'\\','\\\\') ''');'... 1822 % 'addpath(''' regexprep(Param.Action.ActionPath,'\\','\\\\') ''');'... 1823 % '' Param.Action.ActionName '( ''' regexprep(filexml,'\\','\\\\') ''');exit"']; 1834 case {'PCWIN','PCWIN64'} 1824 1835 fprintf(fid,cmd); 1825 1836 fclose(fid); 1826 % dos([filebat ' &']);1827 1837 end 1828 1838 end … … 2056 2066 if numel(iview_civ)>=1 && ~isempty(iview_civ(1)) 2057 2067 menu=set_veltype_display(SeriesData.FileInfo{iview_civ(1)}.CivStage,SeriesData.FileType{iview_civ(1)}); 2068 set(handles.VelType,'Value',1)% set first choice by default 2058 2069 set(handles.VelType,'String',[{'*'};menu]) 2059 2070 if numel(iview_civ)>=2 2060 2071 menu=set_veltype_display(SeriesData.FileInfo{iview_civ(2)}.CivStage,SeriesData.FileType{iview_civ(2)}); 2072 set(handles.VelType_1,'Value',1)% set first choice by default 2061 2073 set(handles.VelType_1,'String',[{'*'};menu]) 2062 2074 end
Note: See TracChangeset
for help on using the changeset viewer.