Changeset 256 in ETALON for simulations


Ignore:
Timestamp:
Aug 7, 2015, 1:29:55 PM (9 years ago)
Author:
malovyts
Message:

deleted colormap| scripts are too old

Location:
simulations
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • simulations/FarZoneCriterium/pw_PlotCrit.m

    r244 r256  
     1%{
    12pw_pitch = input('Please enter the pitch(period) of the grating (in mm):\n');
    23pw_stripnum = input('Please enter the number of strips in grating:\n');
    34pw_plotname = input('Please enter Name of the plot:\n', 's');
    4 pw_farZoneCrit(pw_pitch,pw_stripnum,pw_plotname);
     5pw_r0 = input('Please enter distance from detector:\n');
     6pw_th_min = input('Please enter minimum theta:\n');
     7pw_th_max = input('Please enter maximum theta:\n');
     8pw_farZoneCrit(pw_pitch,pw_stripnum,pw_plotname,pw_r0,pw_th_min,pw_th_max);
     9%}
     10pw_farZoneCrit(0.05,800,'Plot4',220,40,140);
     11
  • simulations/FarZoneCriterium/pw_farZoneCrit.m

    r244 r256  
    1 function result=pw_farZoneCrit(d,N,Name)
     1function result=pw_farZoneCrit(d,N,Name,r0,theta_min,theta_max)
    22y=@(x)N^2*d*(1+cos(x));
    33theta=0:180;
    44theta=theta*pi/180;
     5grating_size=[-(d*N/2),(d*N/2)];
     6zone_X=[0,(r0).*cos((theta_min:(theta_max-theta_min)/100:theta_max).*pi/180),0];
     7zone_Y=[0,(r0).*sin((theta_min:(theta_max-theta_min)/100:theta_max).*pi/180),0];
    58
    69fig = figure('visible', 'off');
    7 plot(y(theta).*cos(theta),y(theta).*sin(theta), 'LineWidth', 2);
     10plot(y(theta).*cos(theta),y(theta).*sin(theta),...
     11y(theta).*cos(theta)./5,y(theta).*sin(theta)./5,...
     12y(theta).*cos(theta)./20,y(theta).*sin(theta)./20,...
     13'LineWidth', 2);
     14    set(gca, 'FontSize', 18, 'LineWidth', 2);
    815xlabel('Z , mm');
    916ylabel('Y , mm');
    1017title({'Far zone criterium in ZY plane';['d =' num2str(d) 'mm N = ' num2str(N)]});
     18legend('R far','R far/5','R Far/20');
    1119print( fig , '-dpng', [Name '_ZY.png']);
    1220close(fig);
    1321
    1422fig = figure('visible', 'off');
    15 plot(theta*180/pi,y(theta), 'LineWidth', 2);
     23plot(y(theta).*cos(theta)/20,y(theta).*sin(theta)/20,zone_X,zone_Y,grating_size,[0 0] ,'LineWidth', 2);
     24    set(gca, 'FontSize', 18, 'LineWidth', 2);
     25xlabel('Z , mm');
     26ylabel('Y , mm');
     27title({'Far zone criterium in ZY plane, ';['d =' num2str(d) 'mm N = ' num2str(N)]});
     28legend('Far zone criterium/20','Observation zone','Grating')
     29print( fig , '-dpng', [Name 'log_ZY.png']);
     30close(fig);
     31
     32
     33fig = figure('visible', 'off');
     34semilogy(theta*180/pi,y(theta),[theta(1) theta(end)]*180/pi,[r0 r0], 'LineWidth', 2);
     35    set(gca, 'FontSize', 18, 'LineWidth', 2);
    1636xlabel('\theta , deg');
    1737ylabel('Criterium , mm');
    1838grid on;
     39legend('Far zone criterium','Observation zone');
    1940%grid minor;
    2041title({'Far zone criterium related to theta';['d =' num2str(d) 'mm N = ' num2str(N)]});
Note: See TracChangeset for help on using the changeset viewer.