function [lambda]=wavelength_wsr(plan_perp_roll)
hurricane='fran';
R_max_unaliased=10000;
rep='meanless\vad\gridded_data';
 files=dir(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\',hurricane,'\data\modified\',rep,'\*.mat']);
 for fil=1
    trans=3000:250:6000;
    for ii=1:length(trans)
        load(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\',hurricane,'\data\modified\',rep,'\',files(fil).name]);
        [x_3dgrid,y_3dgrid,z_3dgrid]=meshgrid(xc,yc,zc);
        pas=50;
        x1=-5000:pas:5000;
        y1=-5000:pas:5000;
        L=length(x1);
        plan_axis=ones(L,1)*x1;
        hsp = surf(x1,y1,zeros(length(x1)));
        rotate(hsp,[1,0,0],90);
        rotate(hsp,[0,0,1],plan_perp_roll);
        xd = get(hsp,'XData');
        yd = get(hsp,'YData');
        zd = get(hsp,'ZData');
        xd1=xd+trans(ii);
        yd1=yd+trans(ii);
        comple=180-plan_perp_roll;
        d_to_y_axis=abs(trans(ii)/cos(deg2rad(comple))); %180-122, 122 is the value that would be in the 2nd rotate line
        d_perp_to_xsection=(trans(ii) + (trans(ii)/tan(deg2rad(comple))))*sin(deg2rad(comple));
        d_from_trans_origin= (2*trans(ii)^2 - d_perp_to_xsection^2)^0.5;
        O_prime_Max=(sqrt((R_max_unaliased^2)-(d_perp_to_xsection^2)))-d_from_trans_origin;
        O_prime_min=-((sqrt((R_max_unaliased^2)-(d_perp_to_xsection^2)))+d_from_trans_origin);
        O_prime_to_x_axis=trans(ii)/deg2rad(comple);
        x_limit_of_max=(trans(ii) + (trans(ii)/tan(deg2rad(comple))))-((O_prime_Max + ( trans (ii)/sin(deg2rad(comple))))*cos(deg2rad(comple)));
        x_limit_of_min=(trans(ii) + (trans(ii)/tan(deg2rad(comple))))+((abs(O_prime_min) - ( trans (ii)/sin(deg2rad(comple))))*cos(deg2rad(comple)));
        if min(O_prime_Max,d_to_y_axis) ==O_prime_Max
            u_limit_good_data=find(xd1(1,:) >= x_limit_of_max & xd1(1,:) <= x_limit_of_min );
            xd2=ones(L,1)*xd1(1,u_limit_good_data);
            yd2=ones(L,1)*yd1(1,u_limit_good_data);
            zd2=zd(:,1:length(u_limit_good_data));
            plan_axis2=plan_axis(:,u_limit_good_data);
        else
            u_limit=find(xd1(1,:)>=0 & xd1(1,:) <= x_limit_of_min  );
            xd2=ones(L,1)*xd1(1,u_limit);
            yd2=ones(L,1)*yd1(1,u_limit);
            zd2=zd(:,1:length(u_limit));
            plan_axis2=plan_axis(:,u_limit);
        end

%             %%%%% isabel
%             xd2=xd1;
%             yd2=yd1;
%             zd2=zd;
%             plan_axis2=plan_axis;
%         %%%%%% fin isabel
        
            h=slice(x_3dgrid,y_3dgrid,z_3dgrid,vel,xd2,yd2,zd2);
        x_section = get(h,'CData');
        
        delta_x=pas;
        
        u=find(zd2(:,1)>=0 & zd2(:,1) <=max(zc));
        x_section=x_section(u,:);
        plan_axis2=plan_axis2(u,:);
        yd2=yd2(u,:);
        zd2=zd2(u,:);
        close all
        z_data=[];
        lambda(ii).trans=trans(ii);
        for height=1:1000/fix(zc(2)-zc(1))
            temp=x_section(height,:);
            

            z_data=[z_data temp'];   
          
        
        
        end
        
        
         
        
        lambda(ii).plan_axis2=plan_axis2;
        lambda(ii).zd2=zd2;
        lambda(ii).z_data=z_data;

    end
    
    save(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\',hurricane,'\data\wavelength analysis\',files(fil).name],'lambda');
    clear('lambda')
end

