Redden

class eazy.templates.Redden(model=None, Av=0.0, **kwargs)[source]

Bases: object

Wrapper function for dust_attenuation and dust_extinction reddening laws

import numpy as np
import matplotlib.pyplot as plt

from eazy.templates import Redden

fig, ax = plt.subplots(1,1,figsize=(6,4))

wave = np.arange(1200, 2.e4)

for model in ['calzetti00', 'mw', 'smc', 'reddy15']:
    redfunc = Redden(model=model, Av=1.0)
    ax.plot(wave, redfunc(wave), label=model)

ax.plot(wave, wave*0+10**(-0.4), color='k', 
          label=r'$A_\lambda = 1$', linestyle=':')

ax.legend()
ax.loglog()

ax.set_xticks([2000, 5000, 1.e4])
ax.set_xticklabels([0.2, 0.5, 1.0])

ax.grid()
ax.set_xlabel('wavelength, microns')
ax.set_ylabel('Attenuation / extinction (Av=1 mag)')

fig.tight_layout(pad=0.5)

(Source code)

Parameters:
modelextinction/attenuation object or str

Allowable string arguments:

  • ‘smc’: dust_extinction.averages.G03_SMCBar

  • ‘lmc’: dust_extinction.averages.G03_LMCAvg

  • ‘mw’,’f99’: dust_extinction.parameter_averages.F99

  • ‘calzetti00’, ‘c00’: dust_attenuation.averages.C00

  • ‘wg00’: dust_attenuation.radiative_transfer.WG00

  • ‘kc13’: Calzetti with modified slope and dust bump from Kriek & Conroy (2013)

  • ‘reddy15’: Reddy et al. (2015)

Avfloat

Selective extinction/attenuation (passed as tau_V for WG00)

Attributes Summary

ebv

E(B-V) for models that have Rv

Methods Summary

__call__(wave[, left, right])

Return reddening factor.

Attributes Documentation

ebv

E(B-V) for models that have Rv

Methods Documentation

__call__(wave, left=0, right=1.0, **kwargs)[source]

Return reddening factor.

Parameters:
wavearray (NW)

Wavelength array. If has no units, assume Angstrom.

left, rightfloat

Extrapolation at short/long wavelengths

Returns:
extarray (NW)

Extinction / attenuation as a function of wavelength