Note
Go to the end to download the full example code.
IGM transmission example¶
Plot IGM transmission curves (Inoue+14 & Madau+96
![plot igm](../../_images/sphx_glr_plot_igm_001.png)
/home/runner/work/synthesizer/synthesizer/src/synthesizer/igm.py:280: RuntimeWarning: divide by zero encountered in power
return a**b
/home/runner/work/synthesizer/synthesizer/src/synthesizer/igm.py:119: RuntimeWarning: invalid value encountered in cast
tLCDLA_value[x0 & ~x1] = (
/home/runner/work/synthesizer/synthesizer/src/synthesizer/igm.py:218: RuntimeWarning: overflow encountered in exp
t = np.exp(-tau)
import cmasher as cmr
import matplotlib.pyplot as plt
import numpy as np
from synthesizer.igm import Inoue14, Madau96
lam = np.arange(0, 20000)
redshifts = [3.0, 5.0, 7.0]
colors = cmr.take_cmap_colors("cmr.guppy", len(redshifts))
for IGM, ls in zip([Inoue14, Madau96], ["-", ":"]):
igm = IGM()
for z, color in zip(redshifts, colors):
plt.plot(lam, igm.T(z, lam), ls=ls, c=color, label=f"{igm.name} z={z}")
plt.legend()
plt.xlabel(r"$\lambda_{obs}/\AA$")
plt.ylabel(r"$T$")
plt.ylim([0, 1.1])
plt.show()
# plt.savefig('../docs/source/images/img.png', bbox_inches='tight', dpi=200)
Total running time of the script: (0 minutes 0.827 seconds)