Changeset 782 for trunk/src/concentration.m
 Timestamp:
 Jun 3, 2014, 8:10:03 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/concentration.m
r566 r782 49 49 Ref.Aref(ind_bad)=D(ind_bad); 50 50 DataOut_1=[]; 51 AX=DataOut.AX;52 AY=DataOut.AY;51 Coord_x=DataOut.Coord_x; 52 Coord_y=DataOut.Coord_y; 53 53 54 dX=( AX(2)AX(1))/(npx1);55 dY=( AY(1)AY(2))/(npy1);%mesh of new pixels56 [R,Y]=meshgrid(linspace( AX(1),AX(2),npx),linspace(AY(1),AY(2),npy));57 r= AX(1)+[0:npx1]*dX;%distance from laser54 dX=(Coord_x(2)Coord_x(1))/(npx1); 55 dY=(Coord_y(1)Coord_y(2))/(npy1);%mesh of new pixels 56 [R,Y]=meshgrid(linspace(Coord_x(1),Coord_x(2),npx),linspace(Coord_y(1),Coord_y(2),npy)); 57 r=Coord_x(1)+[0:npx1]*dX;%distance from laser 58 58 %A(ind_good)=(A(ind_good)>=0).*A(ind_good); %replaces negative values by zeros 59 59 A=A./Ref.Aref;% luminosity normalised by the reference (value at the edge of the box) … … 71 71 Edge_ind=find((abs(Rr_edge)/dX)<=1 & DataMask.A~=0);%indies of positions close to r_edge, values greater than 1 are not expected 72 72 yedge=min(min(Y(Edge_ind))); 73 jmax=round((yedge AY(1))/dY+1);73 jmax=round((yedgeCoord_y(1))/dY+1); 74 74 DataMask.A(jmax:end,:)=0; 75 75 … … 77 77 78 78 % radius along the reference line 79 Theta=(linspace( AY(1),AY(2),npy)*pi/180)'*ones(1,npx);%theta in radians79 Theta=(linspace(Coord_y(1),Coord_y(2),npy)*pi/180)'*ones(1,npx);%theta in radians 80 80 81 81 gamma_coeff=Ref.GammaCoeff*ones(1,npx); … … 91 91 92 92 DataOut=polar2phys(DataOut,RangeX,RangeY); 93 DataOut. AX=DataOut.AX+XmlData.GeometryCalib.PolarCentre(1);94 DataOut. AY=DataOut.AY+XmlData.GeometryCalib.PolarCentre(2);93 DataOut.Coord_x=DataOut.Coord_x+XmlData.GeometryCalib.PolarCentre(1); 94 DataOut.Coord_y=DataOut.Coord_y+XmlData.GeometryCalib.PolarCentre(2); 95 95 DataMask=polar2phys(DataMask,RangeX,RangeY); 96 DataMask. AX=DataMask.AX+XmlData.GeometryCalib.PolarCentre(1);97 DataMask. AY=DataMask.AY+XmlData.GeometryCalib.PolarCentre(2);96 DataMask.Coord_x=DataMask.Coord_x+XmlData.GeometryCalib.PolarCentre(1); 97 DataMask.Coord_y=DataMask.Coord_y+XmlData.GeometryCalib.PolarCentre(2); 98 98 99 99 … … 102 102 DataOut=DataIn; %fdefault 103 103 [npy,npx]=size(DataIn.A); 104 dx=(DataIn. AX(2)DataIn.AX(1))/(npx1);105 dy=(DataIn. AY(2)DataIn.AY(1))/(npy1);%mesh106 rcorner=[DataIn. AX(1) DataIn.AX(2) DataIn.AX(1) DataIn.AX(2)];% radius of the corners107 ycorner=[DataIn. AY(2) DataIn.AY(2) DataIn.AY(1) DataIn.AY(1)];% azimuth of the corners104 dx=(DataIn.Coord_x(2)DataIn.Coord_x(1))/(npx1); 105 dy=(DataIn.Coord_y(2)DataIn.Coord_y(1))/(npy1);%mesh 106 rcorner=[DataIn.Coord_x(1) DataIn.Coord_x(2) DataIn.Coord_x(1) DataIn.Coord_x(2)];% radius of the corners 107 ycorner=[DataIn.Coord_y(2) DataIn.Coord_y(2) DataIn.Coord_y(1) DataIn.Coord_y(1)];% azimuth of the corners 108 108 thetacorner=pi*ycorner/180;% azimuth in radians 109 109 [Xcorner,Ycorner] = pol2cart(thetacorner,rcorner);% cartesian coordinates of the corners (with respect to lser source) … … 126 126 [Theta,R] = cart2pol(X,Y);%corresponding polar coordiantes 127 127 Theta=Theta*180/pi; 128 %Theta=1+round((ThetaDataIn. AY(1))/dy); %index along y (dy negative)129 Theta=1round((ThetaDataIn. AY(2))/dy); %index along y (dy negative)130 R=1+round((RDataIn. AX(1))/dx); %index along x128 %Theta=1+round((ThetaDataIn.Coord_y(1))/dy); %index along y (dy negative) 129 Theta=1round((ThetaDataIn.Coord_y(2))/dy); %index along y (dy negative) 130 R=1+round((RDataIn.Coord_x(1))/dx); %index along x 131 131 R=reshape(R,1,npx*npy);%indices reorganized in 'line' 132 132 Theta=reshape(Theta,1,npx*npy); … … 142 142 143 143 %Rangx=Rangxradius_ref; 144 DataOut. AX=RangeX;145 DataOut. AY=RangeY;144 DataOut.Coord_x=RangeX; 145 DataOut.Coord_y=RangeY; 146 146
Note: See TracChangeset
for help on using the changeset viewer.