How to use the landau.discrete_convolution function in landau

To help you get started, we’ve selected a few landau examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HiSPARC / sapphire / reconstruction_efficiency / plots.py View on Github external
figure()

    x = data.root.datasets.poisson.x.read()
    y = data.root.datasets.poisson.y.read()
    yerr = data.root.datasets.poisson.yerr.read()
    errorbar(x, y, yerr=yerr, fmt='o', label="Data")

    x = linspace(-10, 10, 101)
    f = vectorize(lambda x: 1 - exp(-.5 * x) if x >= 0 else 0.)

    for s in [0., 0.5, 1., 1.5]:
        if s == 0.:
            plot(x, f(x), label="Unconvoluted")
        else:
            g = stats.norm(scale=s).pdf
            plot(x, discrete_convolution(f, g, x),
                 label="sigma = %.2f m$^{-2}$" % s)

    xlim(0, 5)
    title("Effect of uncertainty on particle density")
    xlabel("Charged particle density (m$^{-2}$)")
    ylabel("Probability of one or more particles")
    legend(loc='best')
    savefig("plots/conv_poisson.pdf")

landau

A library to calculate alloy thermodynamic equilibria and plot phase diagrams in the (semi-)grand ensemble.

BSD-3-Clause
Latest version published 10 days ago

Package Health Score

66 / 100
Full package analysis

Similar packages