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 / View on Github external

    x =
    y =
    yerr =
    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")
            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")


The Landau Project

Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Similar packages