Ignore:
Timestamp:
May 30, 2018, 7:30:21 PM (7 years ago)
Author:
sommeria
Message:

read rrdvision corrected

File:
1 edited

Legend:

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

    r1027 r1046  
    9595%parameters for polar coordinates (taken from the calibration data of the first field)
    9696%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    97 XmlData.PolarReferenceRadius=450;
    98 XmlData.PolarReferenceAngle=450*pi/2;
     97XmlData.PolarReferenceRadius=0;%450;
     98XmlData.PolarReferenceAngle=0;%450*pi/2;
    9999origin_xy=[0 0];%center for the polar coordinates in the original x,y coordinates
    100100radius_offset=0;%reference radius used to offset the radial coordinate r
    101101angle_offset=0; %reference angle used as new origin of the polar angle (= axis Ox by default)
     102angle_scale=180/pi;
    102103if isfield(XmlData,'TransformInput')
    103104    if isfield(XmlData.TransformInput,'PolarCentre') && isnumeric(XmlData.TransformInput.PolarCentre)
     
    249250npx=[];
    250251npy=[];
     252NbPoints=20; % nbre of points used to determine the image edge
    251253for icell=1:length(A)
    252254    siz=size(A{icell});
     
    255257    zphys=0; %default
    256258    if isfield(CalibIn{icell},'SliceCoord') %.Z= index of plane
     259        if ZIndex==0
     260            ZIndex=1;
     261        end
    257262       SliceCoord=CalibIn{icell}.SliceCoord(ZIndex,:);
    258263       zphys=SliceCoord(3); %to generalize for non-parallel planes
    259264    end
    260     xima=[0.5 siz(2)-0.5 0.5 siz(2)-0.5];%image coordiantes of corners
    261     yima=[0.5 0.5 siz(1)-0.5 siz(1)-0.5];
     265%     xima=[0.5 siz(2)-0.5 0.5 siz(2)-0.5];%image coordinates of corners
     266%     yima=[0.5 0.5 siz(1)-0.5 siz(1)-0.5];
     267      edge_x=linspace(0.5,siz(1)-0.5,NbPoints);     
     268      edge_y=linspace(0.5,siz(2)-0.5,NbPoints);
     269      xima=[edge_y (siz(2)-0.5)*ones(1,NbPoints) edge_y 0.5*ones(1,NbPoints)];%image coordinates of corners
     270      yima=[0.5*ones(1,NbPoints) edge_x (siz(1)-0.5)*ones(1,NbPoints) edge_x];%image coordinates of corners
    262271    [xcorner_new,ycorner_new]=phys_XYZ(CalibIn{icell},xima,yima,ZIndex);%corresponding physical coordinates
    263272    %transform the corner coordinates into polar ones   
Note: See TracChangeset for help on using the changeset viewer.