In [1]:
using GSL
using PyPlot
function Plot(f, x)
    fx=[f(xi) for xi in x]
    plot(x, fx)
end


INFO: Precompiling module GSL.
WARNING: Method definition macroexpand(Module, Any) in module Compat at /home/mikhasenko/.julia/v0.6/Compat/src/Compat.jl:1491 overwritten in module MacroTools at /home/mikhasenko/.julia/v0.6/MacroTools/src/utils.jl:64.
Out[1]:
Plot (generic function with 1 method)

Fraunhofer scattering

Consider optical problem: a plane wave interfere on a screen $\newcommand{\diff}{\mathrm{d}}$ $$ u_q = \int_{S} \diff x\, \diff y\, u_0 e^{i \vec{q} \vec{r}} $$

In the case of diffraction on


In [2]:
rc("text", usetex=false)

In [3]:
fig = figure()
pl = fig[:add_subplot](111);
ax = Plot(0:0.01:10) do t
    R = 5
    return log((R*sf_bessel_jl(1,R*sqrt(t))/sqrt(t))^2)
end  
pl[:set](title = "Fraunhofer scattering", xlabel="t", ylabel="log |A(t)|^{2}",)


Out[3]:
3-element Array{Any,1}:
 PyObject <matplotlib.text.Text object at 0x7f510499c290>
 PyObject <matplotlib.text.Text object at 0x7f5104d7c410>
 PyObject <matplotlib.text.Text object at 0x7f51049a6b10>

Particles scattering

Compare to the measurements of the the neutron scattering off lead


In [ ]: