Changeset 970 for trunk/src


Ignore:
Timestamp:
Nov 9, 2016, 7:12:32 PM (8 years ago)
Author:
sommeria
Message:

various

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_motion.m

    r966 r970  
    215215                text_displ_1=[xName '=' num2str(xy(1,1),4) ', ' yName '=' num2str(xy(1,2),4) ','];
    216216            end
    217             %display the z coordinate if defined by the projection plane
     217            %display the original phys x,y,z coordinates if defined by the projection plane
    218218            if isfield(Field,'ProjObjectType') && strcmp(Field.ProjObjectType,'plane') && isfield(Field,'ProjObjectCoord') && length(Field.ProjObjectCoord)>=3
    219                 pos=[xy(1,1) xy(1,2) 0];
     219                pos=[xy(1,1) xy(1,2) 0];%coordinates on the graph
    220220                if isfield(Field,'ProjObjectAngle')&&~isequal(Field.ProjObjectAngle,[0 0 0])
    221221                    om=norm(Field.ProjObjectAngle);%norm of rotation angle in radians
  • trunk/src/phys_ima.m

    r922 r970  
    6767           SliceCoord=Calib.SliceCoord(ZIndex,:);
    6868           zphys=SliceCoord(3); %to generalize for non-parallel planes
     69           
     70%         if isfield(Calib,'SliceAngle')&&~isequal(Calib.SliceAngle,[0 0 0])
     71%                     om=norm(Calib.SliceAngle);%norm of rotation angle in radians
     72%                     OmAxis=Calib.SliceAngle/om; %unit vector marking the rotation axis
     73%                     cos_om=cos(pi*om/180);
     74%                     sin_om=sin(pi*om/180);
     75%                     pos=[xy(1,1) xy(1,2) 0];
     76%                     pos=cos_om*pos+sin_om*cross(OmAxis,pos)+(1-cos_om)*(OmAxis*pos')*OmAxis;
     77%                 end
     78           
     79           
    6980%            if isfield(Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex')
    7081%                 H=Calib.InterfaceCoord(3);
  • trunk/src/series.m

    r963 r970  
    27222722if isequal(FileInfo.FileType,'civdata')
    27232723    if ismember(TimeName,{'civ1','filter1'})
     2724        if isfield(Data,'Civ1_Time')
    27242725        TimeValue=Data.Civ1_Time;
     2726        end
     2727        if isfield(Data,'Civ1_Dt')
    27252728        DtValue=Data.Civ1_Dt;
     2729        end
    27262730    else
     2731        if isfield(Data,'Civ2_Time')
    27272732        TimeValue=Data.Civ2_Time;
     2733        end
     2734        if isfield(Data,'Civ2_Dt')
    27282735        DtValue=Data.Civ2_Dt;
     2736        end
    27292737    end
    27302738else
  • trunk/src/series/time_series.m

    r960 r970  
    172172ImageTypeOptions={'image','multimage','mmreader','video'};
    173173NcTypeOptions={'netcdf','civx','civdata'};
    174 FileType=cell(1,nbview);
    175 FileInfo=cell(1,nbview);
    176 MovieObject=cell(1,nbview);
    177 CheckImage=cell(1,nbview);
    178 CheckNc=cell(1,nbview);
    179 frame_index=cell(1,nbview);
    180 
    181 for iview=1:nbview
     174FileType=cell(1,NbView);
     175FileInfo=cell(1,NbView);
     176MovieObject=cell(1,NbView);
     177CheckImage=cell(1,NbView);
     178CheckNc=cell(1,NbView);
     179frame_index=cell(1,NbView);
     180
     181for iview=1:NbView
    182182    if ~exist(filecell{iview,1}','file')
    183183        disp_uvmat('ERROR',['the first input file ' filecell{iview,1} ' does not exist'],checkrun)
     
    233233    return
    234234end
    235 if nbview==2 && ~isequal(CheckImage{1},CheckImage{2})
     235if NbView==2 && ~isequal(CheckImage{1},CheckImage{2})
    236236    disp_uvmat('ERROR','input must be two image series or two netcdf file series',checkrun)
    237237    return
     
    252252%% Set field names and velocity types
    253253InputFields{1}=[];%default (case of images)
    254 if nbview==2
     254if NbView==2
    255255    InputFields{2}=[];%default (case of images)
    256256end
    257257if isfield(Param,'InputFields')
    258258    InputFields{1}=Param.InputFields;
    259     if nbview==2
     259    if NbView==2
    260260        InputFields{2}=Param.InputFields;%default
    261261        if isfield(Param.InputFields,'FieldName_1')
     
    311311
    312312%%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
    313 for index=1:nbfield
    314     update_waitbar(WaitbarHandle,index/nbfield)
     313for index=1:NbField
     314    update_waitbar(WaitbarHandle,index/NbField)
    315315    if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
    316316        disp('program stopped by user')
    317317        break % leave the loop if stop is ordered
    318318    end
    319     Data=cell(1,nbview);%initiate the set Data;
     319    Data=cell(1,NbView);%initiate the set Data;
    320320    nbtime=0;
    321321    dt=[];
    322322    %%%%%%%%%%%%%%%% loop on views (input lines) %%%%%%%%%%%%%%%%
    323     for iview=1:nbview
     323    for iview=1:NbView
    324324        % reading input file(s)
    325325        [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index));
     
    407407                    testsum(ivar)=1;
    408408                    DataOut.(VarName)=Field.(VarName);
    409                     DataOut.([VarName 'Histo'])=zeros([nbfield numel(DataOut.(VarName))]);
     409                    DataOut.([VarName 'Histo'])=zeros([NbField numel(DataOut.(VarName))]);
    410410                    VarMesh=Field.(VarName)(2)-Field.(VarName)(1);
    411411                end
     
    444444                    VarName=Field.ListVarName{ivar};
    445445                    siz=size(Field.(VarName));
    446                     DataOut.(VarName)=zeros([nbfield siz]);
     446                    DataOut.(VarName)=zeros([NbField siz]);
    447447                end
    448448            end
     
    466466                if MaxIndex_new>MaxIndex% the variable max for the current field exceeds the previous one
    467467                    DataOut.(VarName)=[DataOut.(VarName) VarMesh*(MaxIndex+1:MaxIndex_new)];% append the new variable values
    468                     DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros(nbfield,MaxIndex_new-MaxIndex)]; % append the new histo values
     468                    DataOut.([VarName 'Histo'])=[DataOut.([VarName 'Histo']) zeros(NbField,MaxIndex_new-MaxIndex)]; % append the new histo values
    469469                end
    470470                if MinIndex_new <= MinIndex-1
    471471                    DataOut.(VarName)=[VarMesh*(MinIndex_new:MinIndex-1) DataOut.(VarName)];% insert the new variable values
    472                     DataOut.([VarName 'Histo'])=[zeros(nbfield,MinIndex-MinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values
     472                    DataOut.([VarName 'Histo'])=[zeros(NbField,MinIndex-MinIndex_new) DataOut.([VarName 'Histo'])];% insert the new histo values
    473473                    ind_start=1;
    474474                else
     
    560560test_time=diff(DataOut.Time)>0;% test that the readed time is increasing (not constant)
    561561if ~test_time
    562     DataOut.Time=1:nbfield;
     562    DataOut.Time=1:NbField;
    563563end
    564564
  • trunk/src/set_object.m

    r967 r970  
    3838function varargout = set_object(varargin)
    3939
    40 % Last Modified by GUIDE v2.5 09-Jul-2016 20:25:37
     40% Last Modified by GUIDE v2.5 09-Nov-2016 15:46:04
    4141
    4242% Begin initialization code - DO NOT REFRESH
     
    823823
    824824
    825 % --- Executes on key press with focus on num_Angle_1 and none of its controls.
    826 function num_Angle_1_KeyPressFcn(hObject, eventdata, handles)
    827 % hObject    handle to num_Angle_1 (see GCBO)
    828 % eventdata  structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL)
    829 %       Key: name of the key that was pressed, in lower case
    830 %       Character: character interpretation of the key(s) that was pressed
    831 %       Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
    832 % handles    structure with handles and user data (see GUIDATA)
    833 
    834 
    835 % --- Executes on key press with focus on num_Angle_2 and none of its controls.
    836 function num_Angle_2_KeyPressFcn(hObject, eventdata, handles)
    837 % hObject    handle to num_Angle_2 (see GCBO)
    838 % eventdata  structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL)
    839 %       Key: name of the key that was pressed, in lower case
    840 %       Character: character interpretation of the key(s) that was pressed
    841 %       Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
    842 % handles    structure with handles and user data (see GUIDATA)
     825%
     826
     827
     828% --- Executes on key press with focus on num_RangeX_2 and none of its controls.
     829function suggest_refresh(hObject, eventdata, handles)
     830set(handles.REFRESH,'BackgroundColor',[1 0 1])
Note: See TracChangeset for help on using the changeset viewer.