File:Chapman function.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 270 × 270 pixels, file size: 28 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Graphs of the Chapman function
    Source Own work
    Author Maximilian Reininghaus
    Permission
    (Reusing this file)
    Licence Art Libre Copyleft: This work of art is free; you can redistribute it and/or modify it according to terms of the Free Art License version 1.3 or any later version. You will find a specimen of this license on the Copyleft Attitude site in French, English, German, Polish, and Portuguese as well as on other sites.

    Source code

    import numpy as np
    import scipy.integrate
    import matplotlib.pyplot as plt
    
    @np.vectorize
    def chapman(x, theta):
        f = lambda l, x, theta: np.exp(-(np.sqrt(x**2 + l**2 + 2*l*x*np.cos(theta)) - x))
        result, err = scipy.integrate.quad(f, 0, np.inf, args=(x, theta))
        return result
    
    th = np.linspace(0, 90, 200)
    
    fig, ax = plt.subplots(dpi=200, figsize=(3,3))
    ax.set(yscale="log", ylim=(1, 3e2), xlim=(0, 90), xlabel="$z$", ylabel=r"$\mathrm{ch}(x,z)$")
    ax.xaxis.set_major_formatter('{x:.0f}°')
    
    for x in np.logspace(4, 0, 5):
        ch = chapman(x, np.deg2rad(th))
        ax.plot(th, ch, label=f"$x = 10^{{{np.log10(x):.0f}}}$", lw=2)
    
    ax.legend(loc="upper left", fontsize="small")
    
    fig.tight_layout()
    fig.savefig("chapman_function.svg")
    

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    image/svg+xml

    33cdafe134d2d7a45ff74001820d6f6f411bc2d8

    28,335 byte

    270 pixel

    270 pixel

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current13:12, 4 April 2022Thumbnail for version as of 13:12, 4 April 2022270 × 270 (28 KB)wikimediacommons>Maximilian Reininghaus{{Information |Description = {{en|1=Graphs of the Chapman function}} |source ={{own}} |author =Maximilian Reininghaus |permission ={{FAL-1.3}} }} Category:Special functions

    There are no pages that use this file.