In [3]:
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt

from knobs import Cloud, CloudInteractive, MultiCloudInteractive

In [4]:
import seaborn as sns
sns.set_context('poster', font_scale=1.5)
sns.set_style('ticks', rc={'xtick.direction': 'in', 'ytick.direction': 'in'})

Examples:

H$\alpha$ emission line between 650 and 660 nm.


In [22]:
# z = 0, sigma = 100 km/s, density is 1 (arbitrary)
i = CloudInteractive(650, 660, zmax=0.01, smin=5, smax=100, nmax=5, 
                     widgets=('z', 'sigma', 'balmer'))
i


H$\alpha$ absorption line between 650 and 660 nm.


In [25]:
i = CloudInteractive(650, 660, cloud_kwargs={'absorption': True, 'continuum': 2.0}, 
                     zmax=0.01, smin=5, smax=100, nmax=1)
i


Two-components of H$\alpha$ emission


In [49]:
clouds = [Cloud(0, 300, 1),
          Cloud(0.001, 400, 1)]
i = MultiCloudInteractive(650, 660, clouds, zmax=0.01, nmin=0.1, nmax=2,
                          widgets=('z', 'n'))
i


Two components of H$\alpha$ absorption.


In [71]:
clouds = [Cloud(0, 150, 0.2, absorption=True),
          Cloud(0.0005, 100, 0.2, absorption=True, continuum=0.01)]
i = MultiCloudInteractive(650, 660, clouds, zmax=0.001, nmin=0.1, nmax=1, smin=50, smax=200,
                          widgets=('z', 'sigma'))
i



In [87]:
clouds = [
    Cloud(z=0.3, sigma=50, n=0.01, absorption=True),
    Cloud(z=1, sigma=50, n=0.01, absorption=True, continuum=0.01)
]

i = MultiCloudInteractive(100, 1000, clouds, zmax=3, nmax=1,
                          widgets=('z', 'lyman', 'balmer', 'paschen'))
i


Local H$\gamma$ emission covering up high-z Ly$\alpha$ absorption.


In [101]:
from knobs.physics import hydrogen_lines
hgamma = hydrogen_lines([2], n_upper=5)[0]
lalpha = hydrogen_lines([1], n_upper=2)[0]
z = (hgamma - lalpha) / lalpha + 0.0001

clouds = [
    Cloud(z=0, sigma=50, n=0.1, absorption=False),
    Cloud(z=z, sigma=100, n=0.01, absorption=True)
]

i = MultiCloudInteractive(432, 436, clouds, zmax=3, nmax=0.5, smin=10, smax=100,
                          widgets=('n', 'sigma', 'lyman', 'balmer'))
i



In [ ]: