Changeset 1156 for trunk/src/series.m
- Timestamp:
- Jul 8, 2024, 11:03:33 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1154 r1156 540 540 function check_input_file_series(handles) 541 541 %------------------------------------------------------------------------ 542 InputTable=get(handles.InputTable,'Data'); 542 InputTable=get(handles.InputTable,'Data');%read the table of input file series 543 543 set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch' 544 544 set(handles.REFRESH,'BackgroundColor',[1 1 0])% set REFRESH button to yellow color (indicate activation) … … 548 548 empty_line(iline)= isempty(cell2mat(InputTable(iline,1:3)));%check the empty lines in the input table 549 549 end 550 if ~isempty(find(empty_line,1)) 550 if ~isempty(find(empty_line,1))%removes the empty lines in the table 551 551 InputTable(empty_line,:)=[]; % remove empty lines 552 552 set(handles.InputTable,'Data',InputTable) … … 579 579 end 580 580 InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,j2); 581 [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series, tild,FileInfo,MovieObject]=...581 [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,~,FileInfo,MovieObject]=... 582 582 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),InputFile); 583 583 end … … 589 589 return 590 590 else 591 display_file_name(handles,fileinput,iview) 591 display_file_name(handles,fileinput,iview)% update the table of input file series, then call update_rootinfo 592 592 end 593 593 else … … 771 771 end 772 772 for ifile=1:min(length(MenuFile),5) 773 eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',MenuFile{ifile});']) 773 ffname=['MenuFile_' num2str(ifile)]; 774 set(handles.(ffname),'Label',MenuFile{ifile}); 774 775 end 775 776 dir_perso=prefdir; … … 792 793 set(handles.Device,'String',[Device DeviceExt]) 793 794 set(handles.Experiment,'String',[Experiment ExperimentExt]) 794 if ~isempty(regexp(InputTable{1,1},'(^http://)|(^https://)' ))795 if ~isempty(regexp(InputTable{1,1},'(^http://)|(^https://)', 'once')) 795 796 set(handles.OutputPathBrowse,'Value',1)% an output folder needs to be specified for OpenDAP data 796 797 end … … 814 815 %% initiate input file series and refresh the current field view: 815 816 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,MovieObject,iview); 817 816 818 %% enable field and veltype menus, in accordance with the current action 817 819 ActionName_Callback([],[], handles) … … 828 830 %------------------------------------------------------------------------ 829 831 InputTable=get(handles.InputTable,'Data'); 832 833 %% make the j indices visible if relevant 834 if (isempty(j1_series)|| ~isempty(j2_series))% no j series or j1-j2 pair 835 enable_j(handles,'off'); 836 else 837 enable_j(handles,'on')%%%%remark: put series with j index at the end in the case of a list 838 end 830 839 831 840 %% display the min and max indices for the whole file series … … 838 847 ref_i=squeeze(max(i1_series(1,:,:),[],2)); % select ref_j index for each ref_i 839 848 ref_j=squeeze(max(j1_series(1,:,:),[],3)); % select ref_i index for each ref_j 840 MinIndex_i= min(find(ref_i))-1;841 MaxIndex_i= max(find(ref_i))-1;842 MaxIndex_j= max(find(ref_j))-1;843 MinIndex_j= min(find(ref_j))-1;849 MinIndex_i=find(ref_i, 1 )-1; 850 MaxIndex_i=find(ref_i, 1, 'last' )-1; 851 MaxIndex_j=find(ref_j, 1, 'last' )-1; 852 MinIndex_j=find(ref_j, 1 )-1; 844 853 diff_j_max=diff(ref_j); 845 854 diff_i_max=diff(ref_i); … … 873 882 set(handles.MaxIndex_i,'Data',MaxIndex_i_table)%display the min indices in the table MinIndex 874 883 set(handles.MaxIndex_j,'Data',MaxIndex_j_table)%display the max indices in the table MaxIndex 884 885 875 886 SeriesData=get(handles.series,'UserData'); 876 887 … … 1063 1074 1064 1075 1065 %% display the set of existing files as an image 1076 %% display the set of existing files as an image with black bands for gaps showing gaps in the series 1066 1077 set(handles.FileStatus,'Units','pixels') 1067 1078 Position=get(handles.FileStatus,'Position'); … … 1316 1327 end 1317 1328 1318 %-------------------------------------1319 function enable_i(handles,state)1320 set(handles.i_txt,'Visible',state)1321 set(handles.num_first_i,'Visible',state)1322 set(handles.num_last_i,'Visible',state)1323 set(handles.num_incr_i,'Visible',state)1324 1329 1325 1330 %----------------------------------- … … 2579 2584 ParamOut.WholeIndexRange='off'; 2580 2585 end 2581 if ~isfield(ParamOut,'WholeIndexRange_j') 2582 ParamOut.WholeIndexRange_j='off'; 2583 end 2584 2586 if ~isfield(ParamOut,'IndexRange_j') 2587 ParamOut.IndexRange_j='on';% accept Index_j as input by default 2588 end 2585 2589 if strcmp(ParamOut.WholeIndexRange,'on') 2586 2590 MinIndex_i=get(handles.MinIndex_i,'Data'); … … 2596 2600 end 2597 2601 end 2598 if strcmp(ParamOut.WholeIndexRange,'on')||strcmp(ParamOut. WholeIndexRange_j,'on')2602 if strcmp(ParamOut.WholeIndexRange,'on')||strcmp(ParamOut.IndexRange_j,'whole') 2599 2603 MinIndex_j=get(handles.MinIndex_j,'Data'); 2600 2604 MaxIndex_j=get(handles.MaxIndex_j,'Data'); … … 2613 2617 2614 2618 %% enable or desable j index visibility 2615 status_j='on'; % default 2616 if isfield(SeriesData,'j1_series') && isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)) % case of empty j indices 2617 status_j='off'; % no j index needed 2618 elseif strcmp(get(handles.PairString,'Visible'),'on') 2619 check_burst=cellfun(@isempty,regexp(get(handles.PairString,'Data'),'^j')); % =0 for burst case, 1 otherwise 2620 if isempty(find(check_burst, 1))% if all pair string begins by j (burst) 2621 status_j='off'; % no j index needed for bust case 2622 end 2623 end 2624 enable_j(handles,status_j) % no j index needed 2625 if isfield(ParamOut,'j_index_1')&& isfield(ParamOut,'j_index_2')%strcmp(ParamOut.Desable_j_index,'on') 2626 %status_j='off'; 2627 set(handles.num_first_j,'String',num2str(ParamOut.j_index_1)) 2628 set(handles.num_last_j,'String',num2str(ParamOut.j_index_2)) 2629 % set(handles.num_first_j,'enable','off') 2630 % set(handles.num_last_j,'enable','off') 2631 set(handles.num_first_j,'visible','off') 2632 set(handles.num_last_j,'visible','off') 2633 set(handles.num_incr_j,'visible','off') 2634 else 2635 set(handles.num_first_j,'visible','on') 2636 set(handles.num_last_j,'visible','on') 2637 set(handles.num_incr_j,'visible',status_j) 2638 end 2619 if strcmp(ParamOut.IndexRange_j,'off')%do not show the j index 2620 enable_j(handles,'off') 2621 else% show j index if relevant in the input series 2622 j1_series=SeriesData.j1_series; 2623 for iview=1:size(j1_series,1) 2624 if ~isempty(j1_series{iview}) 2625 enable_j(handles,'on') 2626 break 2627 end 2628 end 2629 end 2630 2631 % status_j='on'; % default 2632 % if isfield(SeriesData,'j1_series') && isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)) % case of empty j indices 2633 % status_j='off'; % no j index needed 2634 % elseif strcmp(get(handles.PairString,'Visible'),'on') 2635 % check_burst=cellfun(@isempty,regexp(get(handles.PairString,'Data'),'^j')); % =0 for burst case, 1 otherwise 2636 % if isempty(find(check_burst, 1))% if all pair string begins by j (burst) 2637 % status_j='off'; % no j index needed for bust case 2638 % end 2639 % end 2640 % enable_j(handles,status_j) % no j index needed 2641 % if isfield(ParamOut,'j_index_1')&& isfield(ParamOut,'j_index_2')%strcmp(ParamOut.Desable_j_index,'on') 2642 % %status_j='off'; 2643 % set(handles.num_first_j,'String',num2str(ParamOut.j_index_1)) 2644 % set(handles.num_last_j,'String',num2str(ParamOut.j_index_2)) 2645 % % set(handles.num_first_j,'enable','off') 2646 % % set(handles.num_last_j,'enable','off') 2647 % set(handles.num_first_j,'visible','off') 2648 % set(handles.num_last_j,'visible','off') 2649 % set(handles.num_incr_j,'visible','off') 2650 % else 2651 % set(handles.num_first_j,'visible','on') 2652 % set(handles.num_last_j,'visible','on') 2653 % set(handles.num_incr_j,'visible',status_j) 2654 % end 2639 2655 2640 2656 %% NbSlice visibility
Note: See TracChangeset
for help on using the changeset viewer.