File:Chapman function.svg

Uploaded by Maximilian Reininghaus
Upload date 2022-04-04T12:12:10Z
MIME type image/svg+xml
Dimensions 270 × 270 px
File size 27.7 KB

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

Category:FAL-1.3 Category:SVG created with Matplotlib code Category:Special functions