Changeset 629


Ignore:
Timestamp:
May 3, 2013, 11:09:53 AM (8 years ago)
Author:
sommeria
Message:

bug repaired in proj_field: .Object -> ProjObject?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r625 r629  
    937937
    938938%% reproduce initial plane position and angle
    939 if isfield(FieldData,'PlaneCoord')&&length(FieldData.PlaneCoord)==3
    940    if length(ProjData.ObjectCoord)==3% if the projection plane has a z coordinate
    941        if ~isequal(ProjData.PlaneCoord(3),ProjData.ObjectCoord) %check the consistency with the z coordinate of the field plane (set by calibration)
     939if isfield(FieldData,'PlaneCoord')&&length(FieldData.PlaneCoord)==3&& isfield(ProjData,'ProjObjectCoord')
     940   if length(ProjData.ProjObjectCoord)==3% if the projection plane has a z coordinate
     941       if ~isequal(ProjData.PlaneCoord(3),ProjData.ProjObjectCoord) %check the consistency with the z coordinate of the field plane (set by calibration)
    942942           errormsg='inconsistent z position for field and projection plane';
    943943           return
    944944       end
    945945   else % the z coordinate is set only by the field plane (by calibration)
    946        ProjData.ObjectCoord(3)=FieldData.PlaneCoord(3);
     946       ProjData.ProjObjectCoord(3)=FieldData.PlaneCoord(3);
    947947   end
    948948   if isfield(FieldData,'PlaneAngle')
    949        if isfield(ProjData,'ObjectAngle')
    950            if ~isequal(FieldData.PlaneAngle,ProjData.ObjectAngle) %check the consistency with the z coordinate of the field plane (set by calibration)
     949       if isfield(ProjData,'ProjObjectAngle')
     950           if ~isequal(FieldData.PlaneAngle,ProjData.ProjObjectAngle) %check the consistency with the z coordinate of the field plane (set by calibration)
    951951           errormsg='inconsistent plane angle for field and projection plane';
    952952           return
    953953           end
    954954       else
    955         ProjData.ObjectAngle=FieldData.PlaneAngle;
     955        ProjData.ProjObjectAngle=FieldData.PlaneAngle;
    956956       end
    957957    end
Note: See TracChangeset for help on using the changeset viewer.