Ignore:
Timestamp:
Feb 20, 2011, 2:52:23 PM (13 years ago)
Author:
sommeria
Message:

Introduction of water wheight in calibration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/transform_field/phys.m

    r167 r202  
    194194           SliceCoord=Calib.SliceCoord(ZIndex,:);
    195195           zphys=SliceCoord(3); %to generalize for non-parallel planes
     196           if isfield(Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex')
     197                H=Calib.InterfaceCoord(3);
     198                if H>zphys
     199                    zphys=H-(H-zphys)/Calib.RefractionIndex; %corrected z (virtual object)
     200                end
     201           end
    196202        end
    197203        [XIMA,YIMA]=px_XYZ(CalibIn{icell},X,Y,zphys);% image coordinates for each point in the real space grid
     
    250256    Zindex=Z;
    251257    Zphys=Calib.SliceCoord(Zindex,3);%GENERALISER AUX CAS AVEC ANGLE
     258    if isfield(Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex')
     259        H=Calib.InterfaceCoord(3);
     260        if H>Zphys
     261            Zphys=H-(H-Zphys)/Calib.RefractionIndex; %corrected z (virtual object)
     262        end
     263    end   
    252264else
    253265    Zphys=0;
Note: See TracChangeset for help on using the changeset viewer.