Changeset 329


Ignore:
Timestamp:
Dec 10, 2011, 2:24:45 PM (9 years ago)
Author:
sommeria
Message:

bugs repaired in series, default size of view_field changed. ';' added in proj_field

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r258 r329  
    171171[ProjData,errormsg]=proj_heading(FieldData,ObjectData);
    172172ProjData.NbDim=0;
    173 %ProjData.ListDimName= {'nb_points'};
    174 %ProjData.DimValue=siz(1);  %nbre of projection points 
    175 
    176 
    177 % idimvar=0;
    178 [CellVarIndex,NbDimCell,VarTypeCell,errormsg]=find_field_indices(FieldData)
     173[CellVarIndex,NbDimCell,VarTypeCell,errormsg]=find_field_indices(FieldData);
    179174if ~isempty(errormsg)
    180175    errormsg=['error in proj_field/proj_points:' errormsg];
     
    182177end
    183178%LOOP ON GROUPS OF VARIABLES SHARING THE SAME DIMENSIONS
    184 % CellVarIndex=cells of variable index arrays
    185 % ivar_new=0; % index of the current variable in the projected field
    186 % icoord=0;
    187179for icell=1:length(CellVarIndex)
    188180    if NbDimCell(icell)==1
     
    194186    ivar_Y=VarType.coord_y;
    195187    ivar_Z=VarType.coord_z;
    196 %     ivar_U=VarType.vector_x;
    197 %     ivar_V=VarType.vector_y;
    198 %     ivar_W=VarType.vector_z;
    199 %     ivar_C=VarType.scalar ;
    200188    ivar_Anc=VarType.ancillary;
    201 %     test_anc=zeros(size(VarIndex));
    202189    test_anc(ivar_Anc)=ones(size(ivar_Anc));
    203190    ivar_F=VarType.warnflag;
     
    205192    VarIndex([ivar_X ivar_Y ivar_Z ivar_Anc ivar_F ivar_FF])=[];% not projected variables removed frlom list
    206193    if isempty(ivar_X)
    207         test_grid=1;%test for input data on regular grid (e.g. image)coordinates
    208      
     194        test_grid=1;%test for input data on regular grid (e.g. image)coordinates     
    209195    else
    210196        if length(ivar_X)>1 || length(ivar_Y)>1 || length(ivar_Z)>1
  • trunk/src/series.m

    r276 r329  
    125125    FieldCell{1}=param.list_fields{param.index_fields};
    126126end
    127 set(hObject,'WindowButtonDownFcn',{'mouse_alt_gui',handles}) % allows mouse action with right button (zoom for uicontrol display)
     127set(hObject,'WindowButtonDownFcn',{'mouse_down'})%allows mouse action with right button (zoom for uicontrol display)
    128128NomType_Callback(hObject, eventdata, handles)
    129129
    130130%loads the information stored in prefdir to initiate  the list of ACTION functions
    131 fct_menu={'check_files';'aver_stat';'time_series';'merge_proj';'clean_civ_cmx'};
     131fct_menu={'check_data_files';'aver_stat';'time_series';'merge_proj';'clean_civ_cmx'};
    132132transform_menu={'';'phys';'px';'phys_polar'};
    133133nb_builtin_ACTION=numel(fct_menu); %number of functions
     
    194194set(handles.transform_fct,'UserData',fct_handle)% store the list of path in UserData of ACTION
    195195
    196 % display the GUI for the default action 'check_files'
     196% display the GUI for the default action 'check_data_files'
    197197ACTION_Callback(hObject, eventdata, handles)
    198198
     
    216216RootFileCell=get(handles.RootFile,'String');
    217217oldfile=''; %default
    218 if isempty(RootPathCell)|isequal(RootPathCell,{''})%loads the previously stored file name and set it as default in the file_input box
     218if isempty(RootPathCell)||isequal(RootPathCell,{''})%loads the previously stored file name and set it as default in the file_input box
    219219     dir_perso=prefdir;
    220220     profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    221221     if exist(profil_perso,'file')
    222222          h=load (profil_perso);
    223          if isfield(h,'filebase')&ischar(h.filebase)
     223         if isfield(h,'filebase')&&ischar(h.filebase)
    224224                 oldfile=h.filebase;
    225225         end
    226          if isfield(h,'RootPath')&ischar(h.RootPath)
     226         if isfield(h,'RootPath')&&ischar(h.RootPath)
    227227                 oldfile=h.RootPath;
    228228         end
     
    743743last_i_Callback(hObject, eventdata, handles)
    744744
    745 %------------------------------------------------------------
     745%------------------------------------------------------------------------
    746746function RootPath_Callback(hObject, eventdata, handles)
     747%------------------------------------------------------------------------
    747748Val=get(handles.RootPath,'Value');
    748749synchronise_view(handles,Val)
    749750NomType_Callback(hObject, eventdata, handles)
    750 %------------------------------------------------------------
    751 
     751
     752%------------------------------------------------------------------------
    752753function synchronise_view(handles,Val)
     754%------------------------------------------------------------------------
    753755set(handles.RootPath,'Value',Val)
    754756set(handles.SubDir,'Value',Val)
     
    762764
    763765
    764 %---------------------------------------------------------
     766%------------------------------------------------------------------------
    765767% Executes on carriage return on the subdir civ1 edit window
    766 %--------------------------------------------------------
    767768function SubDir_Callback(hObject, eventdata, handles)
    768 
     769%------------------------------------------------------------------------
    769770Val=get(handles.SubDir,'Value');
    770771synchronise_view(handles,Val)
    771772NomType_Callback(hObject, eventdata, handles)
    772773
    773 %--------------------------------------------------------------
    774 %function activated when a new filebase (image series) is introduced
    775 %------------------------------------------------------------
     774%------------------------------------------------------------------------
     775% --- function activated when a new filebase (image series) is introduced
    776776function RootFile_Callback(hObject, eventdata, handles)
     777%------------------------------------------------------------------------
    777778Val=get(handles.RootFile,'Value');
    778779synchronise_view(handles,Val)
     
    813814Val=get(handles.time_last,'Value');
    814815synchronise_view(handles,Val)
    815 
    816 %--------------------------------------------------------------
    817 %function activated by NomType
    818 %------------------------------------------------------------
    819816NomType_Callback(hObject, eventdata, handles)
    820817
  • trunk/src/view_field.m

    r315 r329  
    7777    % handles_mouse.create=hhuvmat.create;
    7878    handles_mouse.edit=hhuvmat.edit_object;
     79    pos_view_field=get(hObject,'Position');
    7980    pos_uvmat=get(huvmat,'Position');
    8081    pos_view_field(1)=pos_uvmat(1)+pos_uvmat(3)/2;
    8182    pos_view_field(2)=pos_uvmat(2)-pos_uvmat(3)/4;
    82     pos_view_field(3:4)=pos_uvmat(3:4);
     83    pos_view_field(3:4)=pos_uvmat(3:4);
    8384    set(hObject,'Position',pos_view_field)
    8485end
Note: See TracChangeset for help on using the changeset viewer.