File:Chapman function.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 270 × 270 pixels, file size: 28 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

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[edit]

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")

File history

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

Date/TimeThumbnailDimensionsUserComment
current12:12, 4 April 2022Thumbnail for version as of 12:12, 4 April 2022270 × 270 (28 KB)Maximilian Reininghaus (talk | contribs){{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.

File usage on other wikis

The following other wikis use this file:

Metadata