brutus_red module

brutus: a set of Python modules to process datacubes from integral field spectrographs.

Copyright (C) 2016, F.P.A. Vogt


This file contains several function and tools used by the brutus routines to correct emission line fluxes for galactic and extragalactic reddening.

Created April 2016, F.P.A. Vogt - frederic.vogt@alumni.anu.edu.au

brutus_red.D_fm90(x, gamma, x0)[source]

The UV points from Fitzpatrick & Massa (1990).

Args:
x: float

Wavelength in 1/microns.

gamma: float

The gamma factor.

x0: float

The x0 factor.

brutus_red.F_fm90(x)[source]

The UV points from Fitzpatrick & Massa (1990).

Args:
x: float

Wavelength in 1/microns.

brutus_red.alam(lams, ab, av, curve='f99', rv=None, rva=4.5)[source]

Calculate the value of A_lambda for different extinction/attenuation laws.

Args:
lams: 1-D numpy array of float

The values at which to evaluate the attenuation/extinction.

ab: float

The extinction in B (e.g. according to NED)

av: float

The extinction in V (e.g. according to NED)

curve: string [default: ‘f99’]

Which extinction/attenuation curve to use.

rv: float

The value of Rv.

rva: float [default: 4.5]

The value of Rva, if using curve=’fd05’.

Notes:

To reproduce the values given in NED, set curve=’f99’, and rv = 3.1. The default value of Rv will depend on the curve used (if not specified). rv=3.1 for ‘f99’, rv=3.08 for ‘fd05’, rv=4.05 for ‘cal00’ and ‘cal00*’, and rv=3.1 for ‘ccm89’. ‘cal00*’ includes a 0.44 correction factor to derive the stellar extinction.

brutus_red.cal00_ke(lams, rv)[source]

The Calzetti (2000) law. lams in Angstroem.

Notes:This does NOT include the 0.44 correction factor to apply for stellar extinction.
brutus_red.ccm89_alav(lams, rv)[source]

The law from Caredelli, Clayton and Mathis (1989). lams in Angstroem.

brutus_red.check()[source]

Make some quick plots to test the reddening functions of brutus, by comparing with the original papers. And make sure I did not mess things up ...

brutus_red.extragalactic_red(lam, hahb, hahb_0, curve='fd05', rv=None, rva=4.3)[source]

Calculate the extragalactic attenuation (based on Halpha/Hbeta).

Args:
lam: float

The wavelength at which to evaluate the attenuation/extinction.

hahb: float or numpy array

The observed Halpha/Hbeta flux ratio. Can be a 2-D map.

hahb_0: float

The reference theoretical unreddened Halpha/Hbeta flux ratio.

curve: string [default: ‘fd05’]

Which extinction/attenuation curve to use.

rv: float [default: None]

Rv value.

rva: float [default: 4.3]

The value of Rva, if using curve=’fd05’.

Returns:
out: 1-D numpy array

The ratio of Flux_(unattenuated)/ Flux_(attenuated)

Notes:

See also Vogt+ (2013), Appendix A. By default, Rv = 3.08 and Rva = 4.3, which gives a curve vey close to that of Calzetti (2000) below the 2000 Ansgtroem bump. Supported curves are ‘fd05’, ‘f99’,’ccm89’,’cal00’ and ‘cal00*’.’cal00*’ includes a 0.44 correction factor to derive the stellar extinction.

brutus_red.f99_alebv(lams, rv=3.1)[source]

The spline-interpolated Fitzpatrick, PASP (1999) Alambda/E(B-V) function.

Args:
lams: 1-D numpy array of floats

The wavelengths in Angstroem.

rv: float [default: 3.1]

The Rv value.

brutus_red.fd05_elvebv(lams, rv=3.08, rva=4.3)[source]

Compute E(lambda-V)/E(B-V) according to Fischera&Dopita (2005), given Rv and Rva.

This function reproduces Table 1 in the article. Unlike in Appendix 1 of Vogt et al. (2013), this function relies on the polynomials defined in the text to reproduce the values of E(lambda-V)/E(B-V) for any Rv and Rva.

Args:
lams: 1-D numpy array of float

The wavelengths at which to evaluate the attenutation.

rv: float [default: 3.08]

The Rv value, following Fischera & Dopita.

rva: float [default: 4.5]

The Rva value, following Fischera & Dopita.

Returns:
out: 1-D numpy aarray of float

The value of E(lambda-V)/E(B-V), as in Table 1 and Fig.3 of the article.

Notes:

By default, Rv = 3.08 and Rva = 4.3, which gives a curve vey close to that of Calzetti (2000) below the 2000 Ansgtroem bump. Thanks to R. Sutherland at ANU/RSAA for sharing his reddening code (included in MAPPINGS V), which helped me implement this function properly.

brutus_red.galactic_red(lams, ab, av, curve='f99', rv=3.1, rva=4.3)[source]

Calculate the galactic extinction for a given sight-line, using Ab and Av.

Args:
lams: 1-D numpy array of float

The values at which to evaluate the attenuation/extinction.

ab: float

The extinction in B (e.g. according to NED).

av: float

The extinction in V (e.g. according to NED) .

curve: string [default: ‘f99’]

Which extinction/attenuation curve to use.

rv: float

Rv value.

rva: float [default: 4.5]

The value of Rva, if using curve=’fd05’.

Returns:
out: 1-dNumpy array

The ratio of Flux_(unreddened)/ Flux_(observed).

Notes:

To follow NED, set curve=’f99’, and rv = 3.1. The default value of Rv will depend on the curve used (if not specified). rv=3.1 for ‘f99’, rv=3.08 for ‘fd05’, rv=4.05 for ‘cal00’ and ‘cal00*’, and rv=3.1 for ‘ccm89’. ‘cal00*’ includes a 0.44 correction factor to derive the stellar extinction.

brutus_red.hahb_to_av(hahb, hahb_0, curve='fd05', rv=None, rva=4.3)[source]

A function to get the reddening in Av mag, from Ha/Hb ratio.

Args:
ha_hb: 1-D numpy array

The flux ratio of Halpha to Hbeta (NOT the log!)

ha_hb_0: float

The theoretical value of Halpha/Hbeta. (2.86 for SB, more for AGNs)

curve: string [default: ‘fd05’]

Which reddeing law to use ?

rv: float [default: None]

The value of Rv to use. None for the default.

Returns:
out: 1-D numpy array

The corrseponding values of Av.

Notes:

See also Vogt+ (2013), Appendix A. By default, Rv = 3.08 and Rva = 4.3, which gives a curve vey close to that of Calzetti (2000) below the 2000 Ansgtroem bump.