Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r521 r523 110 110 end 111 111 end 112 if isfield(param,'incr_i') 113 set(handles.num_incr_i,'String',num2str(param.incr_i)) 114 end 115 if isfield(param,'incr_j') 116 set(handles.num_incr_j,'String',num2str(param.incr_j)) 117 end 112 118 113 119 %% fields input initialisation … … 132 138 133 139 %% TRANSFORM menu: loads the information stored in prefdir to initiate the list of field transform functions 134 menu_str={'';' phys';'px';'phys_polar'};140 menu_str={'';'sub_field';'phys';'phys_polar'}; 135 141 nb_builtin_transform=numel(menu_str); %number of functions 136 142 [path_uvmat,name,ext]=fileparts(which('uvmat')); … … 148 154 rmpath(fullfile(path_uvmat,'transform_field')) 149 155 150 %% read the list of functions stored in the personal file 'uvmat_perso.mat' in prefdir156 %% read the list of transform functions stored in the personal file 'uvmat_perso.mat' in prefdir 151 157 if test_profil_perso 152 158 if isfield(h,'series_fct') && iscell(h.series_fct) … … 214 220 set(handles.RunMode,'String',{'local';'background';'cluster'}) 215 221 end 216 % if isfield(sparam.RunParam,'CivBin')217 % if ~exist(sparam.RunParam.CivBin,'file')218 % sparam.RunParam.CivBin=fullfile(path_uvmat,sparam.RunParam.CivBin);219 % end220 % else221 % sparam.RunParam.CivBin='';222 % end223 % display the GUI for the default actionname 'check_data_files'224 % ActionName_Callback(hObject, eventdata, handles)225 222 226 223 %------------------------------------------------------------------------ … … 596 593 MaxIndex_j=max(find(i_max))-1;% max ref index i 597 594 MinIndex_j=min(find(i_max))-1;% min ref index i 598 % i2_min=[];599 % if ~isempty(i2_series)600 % i2_min=i2_series(1,2,2);601 % end602 % j1_min=[];603 % if ~isempty(j1_series)604 % j1_min=j1_series(1,2,2);605 % end606 % j2_min=[];607 % if ~isempty(j2_series)608 % j2_min=j2_series(1,2,2);609 % end610 % if isequal(MinIndex_i,1) &&...611 % exist (fullfile_uvmat(InputTable{iview,1},InputTable{iview,2},InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},0,i2_min, j1_min,j2_min),'file')612 % MinIndex_i=0;613 % end614 % j_sum=sum(sum(j1_series,1),1);615 % MaxIndex_j=max(find(j_sum>0))-1;616 % MinIndex_j=min(find(j_sum>0))-1;617 595 MinIndex=get(handles.MinIndex,'Data');%retrieve the min indices in the table MinIndex 618 596 MaxIndex=get(handles.MaxIndex,'Data');%retrieve the max indices in the table MaxIndex … … 724 702 %% update time table 725 703 if ~isempty(time) 726 TimeTable=get(handles.TimeTable,'Data');727 first_i=str2num(get(handles.num_first_i,'String'));728 last_i=str2num(get(handles.num_last_i,'String'));729 first_j=str2num(get(handles.num_first_j,'String'));730 last_j=str2num(get(handles.num_last_j,'String'));731 MinIndexTable=get(handles.MinIndex,'Data');732 MinIndex_i=MinIndexTable{iview,1};733 MinIndex_j=MinIndexTable{iview,2};734 MaxIndexTable=get(handles.MaxIndex,'Data');735 MaxIndex_i=MaxIndexTable{iview,1};736 MaxIndex_j=MaxIndexTable{iview,2};737 if isempty(MinIndex_j)738 if MinIndex_i>0739 TimeTable{iview,1}=time(MinIndex_i);740 end741 TimeTable{iview,2}=time(first_i);742 TimeTable{iview,3}=time(last_i);743 TimeTable{iview,4}=time(MaxIndex_i);744 elseif ~isempty(time)745 if MinIndex_i>0746 TimeTable{iview,1}=time(MinIndex_i,MinIndex_j);747 end748 TimeTable{iview,2}=time(first_i,first_j);749 TimeTable{iview,3}=time(last_i,last_j);750 TimeTable{iview,4}=time(MaxIndex_i,MaxIndex_j);751 end752 set(handles.TimeTable,'Data',TimeTable)704 TimeTable=get(handles.TimeTable,'Data'); 705 first_i=str2num(get(handles.num_first_i,'String')); 706 last_i=str2num(get(handles.num_last_i,'String')); 707 first_j=str2num(get(handles.num_first_j,'String')); 708 last_j=str2num(get(handles.num_last_j,'String')); 709 MinIndexTable=get(handles.MinIndex,'Data'); 710 MinIndex_i=MinIndexTable{iview,1}; 711 MinIndex_j=MinIndexTable{iview,2}; 712 MaxIndexTable=get(handles.MaxIndex,'Data'); 713 MaxIndex_i=MaxIndexTable{iview,1}; 714 MaxIndex_j=MaxIndexTable{iview,2}; 715 if isempty(MinIndex_j) 716 if MinIndex_i>0 717 TimeTable{iview,1}=time(MinIndex_i); 718 end 719 TimeTable{iview,2}=time(first_i); 720 TimeTable{iview,3}=time(last_i); 721 TimeTable{iview,4}=time(MaxIndex_i); 722 elseif ~isempty(time) 723 if MinIndex_i>0 724 TimeTable{iview,1}=time(MinIndex_i,MinIndex_j); 725 end 726 TimeTable{iview,2}=time(first_i,first_j); 727 TimeTable{iview,3}=time(last_i,last_j); 728 TimeTable{iview,4}=time(MaxIndex_i,MaxIndex_j); 729 end 730 set(handles.TimeTable,'Data',TimeTable) 753 731 end 754 732 … … 802 780 xI=0.5:Position(3)-0.5; 803 781 nbview=numel(SeriesData.i1_series); 782 pair_max=cell(1,nbview); 804 783 for iview=1:nbview 805 index_min(iview)=min(find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)); 806 index_max(iview)=max(find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)); 784 pair_max{iview}=squeeze(max(SeriesData.i1_series{iview},[],1)); %max on pair index 785 index_min(iview)=find(pair_max{iview}>0, 1 ); 786 index_max(iview)=find(pair_max{iview}>0, 1, 'last' ); 807 787 end 808 788 index_min=min(index_min); … … 818 798 ind_y=1+(iview-1)*range_y:iview*range_y; 819 799 LineData=zeros(1,range_index); 820 x_index=find( SeriesData.i1_series{iview}(1,2:end,2:end)>0)-index_min+1;800 x_index=find(pair_max{iview}>0)-index_min+1; 821 801 LineData(x_index)=1; 822 802 LineData=interp1(x,LineData,xI,'nearest'); -
trunk/src/uvmat.m
r521 r523 207 207 transform_menu={'';'sub_field';'phys';'phys_polar'}; 208 208 UvData.OpenParam.NbBuiltin=numel(transform_menu); %number of functions 209 path_list=(num2cell(blanks(UvData.OpenParam.NbBuiltin)))';%initialize a cell array of nbvar blanks210 209 transform_path=fullfile(path_uvmat,'transform_field'); 211 210 path_list{1}=''; 212 path_list(2:end)=regexprep(path_list(2:end),' ',transform_path); % set transform_path to the path_list 211 for ilist=2:UvData.OpenParam.NbBuiltin 212 path_list{ilist}=transform_path; % set transform_path to the path_list 213 end 213 214 214 215 %% load the list of previously browsed files in menus Open, Open_1 and transform_fct … … 217 218 if exist(profil_perso,'file') 218 219 h=load (profil_perso); 219 if isfield(h,'MenuFile') 220 if isfield(h,'MenuFile')% load the menu of previously opened files 220 221 for ifile=1:min(length(h.MenuFile),5) 221 222 eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',h.MenuFile{ifile});']) … … 223 224 end 224 225 end 225 if isfield(h,'transform_fct') && iscell(h.transform_fct) 226 if isfield(h,'transform_fct') && iscell(h.transform_fct) % load the menu of transform fct set by user 226 227 for ilist=1:length(h.transform_fct); 227 228 if exist(h.transform_fct{ilist},'file') … … 233 234 end 234 235 end 235 transform_menu=[transform_menu;{'more...'}]; 236 set(handles.transform_fct,'String',transform_menu) 237 set(handles.transform_fct,'UserData',path_list)% store the list of path in UserData of ACTION236 transform_menu=[transform_menu;{'more...'}];%append the option more.. to the menu 237 set(handles.transform_fct,'String',transform_menu)% display the menu of transform fcts 238 set(handles.transform_fct,'UserData',path_list)% store the corresponding list of path in UserData of uicontrol transform_fct 238 239 set(handles.path_transform,'String','') 239 240 set(handles.path_transform,'UserData',[]) … … 3604 3605 if exist(profil_perso,'file') 3605 3606 nb_builtin=UvData.OpenParam.NbBuiltin;% number of 'builtin' (basic) transform fcts in uvmat 3607 if nb_builtin<numel(list_path) 3606 3608 for ilist=nb_builtin+1:numel(list_path) 3607 3609 transform_fct{ilist-nb_builtin}=[fullfile(list_path{ilist},menu{ilist}) '.m']; 3608 3610 end 3609 3611 save (profil_perso,'transform_fct','-append'); %store the root name for future opening of uvmat 3612 end 3610 3613 end 3611 3614 end … … 4683 4686 data.CoordType=UvData.CoordType; 4684 4687 end 4685 % pos=get(handles.uvmat,'Position');4686 % pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen)4687 % pos(2)=pos(2)-0.02;4688 4688 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles); 4689 4689 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];
Note: See TracChangeset
for help on using the changeset viewer.