N09¶
- class dust_attenuation.shapes.N09(x0=0.2175, gamma=0.035, ampl=0, slope=0.0, Av=1.0, **kwargs)[source]¶
Bases:
BaseAttAvModelAttenuation curve using a modified version of the Calzetti law allowing for a varying UV slope and the presence of a UV bump.
- Parameters:
- Raises:
InputParameterError – Input Av values outside of defined range
Notes
The original formalism is from Noll et al, A&A 507, 1793–1813 (2009).
Example:
import matplotlib.pyplot as plt import numpy as np import astropy.units as u from dust_attenuation.shapes import N09 fig, ax = plt.subplots() # generate the curves and plot them x = np.arange(0.5,10,0.1)/u.micron slopes = [-1, -0.5, 0, 0.5, 1] for slope in slopes: att_model = N09(Av=1,ampl=3.5,slope=slope) ax.plot(x,att_model(1/x),label=r'$\delta$ = %.2f' % (slope)) ax.set_xlabel(r'$x$ [$\mu m^{-1}$]') ax.set_ylabel(r'A(x) [mag]') ax.legend(loc='best') plt.title("Noll09 with varying slopes") plt.show()
(
Source code,png,hires.png,pdf)
Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
evaluate(x, Av, x0, gamma, ampl, slope)N09 function
k_lambda(x, x0, gamma, ampl, slope)Compute the starburst reddening curve k'(λ)=A(λ)/E(B-V) using recipe of Calzetti 2000 and Leitherer 2002
power_law(x, slope)Power law normalised at 0.55 microns (V band).
uv_bump(x, x0, gamma, ampl)Drude profile for computing the UV bump.
Attributes Documentation
- Av = Parameter('Av', value=1.0, bounds=(0.0, None))¶
- Rv_C00 = 4.05¶
- ampl = Parameter('ampl', value=0.0, bounds=(0, None))¶
- gamma = Parameter('gamma', value=0.035, bounds=(0, None))¶
- param_names = ('Av', 'x0', 'gamma', 'ampl', 'slope')¶
Names of the parameters that describe models of this type.
The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.
When defining a custom model class the value of this attribute is automatically set by the
Parameterattributes defined in the class body.
- slope = Parameter('slope', value=0.0, bounds=(-3.0, 3.0))¶
- x0 = Parameter('x0', value=0.2175, bounds=(0, None))¶
- x_range = [0.097, 2.2]¶
Methods Documentation
- evaluate(x, Av, x0, gamma, ampl, slope)[source]¶
N09 function
- Parameters:
x (np array (float)) – expects either x in units of wavelengths or frequency or assumes wavelengths in [micron] internally microns are used
Av (float) – attenuation in V band.
x0 (float) – Central wavelength of the UV bump (in microns).
gamma (float) – Width (FWHM) of thhe UV bump (in microns).
ampl (float) – Amplitude of the UV bump.
slope (float) – Slope of the power law.
- Returns:
att – Att(x) attenuation curve [mag]
- Return type:
np array (float)
- Raises:
ValueError – Input x values outside of defined range
- k_lambda(x, x0, gamma, ampl, slope)[source]¶
Compute the starburst reddening curve k’(λ)=A(λ)/E(B-V) using recipe of Calzetti 2000 and Leitherer 2002
- Parameters:
in_x (np array (float)) – expects either x in units of wavelengths or frequency or assumes wavelengths in [micron] internally microns are used
x0 (float) – Central wavelength of the UV bump (in microns).
gamma (float) – Width (FWHM) of thhe UV bump (in microns).
ampl (float) – Amplitude of the UV bump.
slope (float) – Slope of the power law.
- Returns:
k_lambda – k_lambda(x) reddening curve
- Return type:
np array (float)
- Raises:
ValueError – Input x values outside of defined range
- uv_bump(x, x0, gamma, ampl)[source]¶
Drude profile for computing the UV bump.
- Parameters:
- Returns:
lorentzian-like Drude profile
- Return type:
np array (float)
- Raises:
ValueError – Input x values outside of defined range