Extinction Correction

This module is used to correct the observations for Milky Way dust extinction and is documented bellow:

piscola.extinction_correction.calculate_ebv(ra, dec, scaling=0.86)

Calculates Milky Way colour excess, \(E(B-V)\), for a given right ascension and declination.

Parameters:
  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • scaling (float, default 0.86) – Calibration of the Milky Way dust maps. Either 0.86 for the Schlafly & Finkbeiner (2011) recalibration or 1.0 for the original dust map of Schlegel, Finkbeiner & Davis (1998).

Returns:

ebv – Reddening value, \(E(B-V)`\).

Return type:

float

piscola.extinction_correction.deredden(wave, flux, ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)

Dereddens the given spectrum, given a right ascension and declination or \(E(B-V)\).

Parameters:
  • wave (array) – Wavelength values.

  • flux (array) – Flux density values.

  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • scaling (float, default 0.86) – Calibration of the Milky Way dust maps. Either 0.86 for the Schlafly & Finkbeiner (2011) recalibration or 1.0 for the original dust map of Schlegel, Fikbeiner & Davis (1998).

  • reddening_law (str, default fitzpatrick99) – Reddening law. The options are: ccm89 (Cardelli, Clayton & Mathis 1989), odonnell94 (O’Donnell 1994), fitzpatrick99 (Fitzpatrick 1999), calzetti00 (Calzetti 2000) and fm07 (Fitzpatrick & Massa 2007 with \(R_V = 3.1\).)

  • r_v (float, default 3.1) – Total-to-selective extinction ratio (\(R_V\))

  • ebv (float, default None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.

Returns:

deredden_flux – Deredden flux values.

Return type:

array

piscola.extinction_correction.extinction_at_wavelength(wave, ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)

Calculates the extinction at a given wavelength, given a right ascension and declination or \(E(B-V)\).

Parameters:
  • wave (float) – Wavelength in agnstroms.

  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • scaling (float, default 0.86) – Calibration of the Milky Way dust maps. Either 0.86 for the Schlafly & Finkbeiner (2011) recalibration or 1.0 for the original dust map of Schlegel, Fikbeiner & Davis (1998).

  • reddening_law (str, default fitzpatrick99) – Reddening law. The options are: ccm89 (Cardelli, Clayton & Mathis 1989), odonnell94 (O’Donnell 1994), fitzpatrick99 (Fitzpatrick 1999), calzetti00 (Calzetti 2000) and fm07 (Fitzpatrick & Massa 2007 with \(R_V = 3.1\).)

  • r_v (float, default 3.1) – Total-to-selective extinction ratio (\(R_V\))

  • ebv (float, default None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.

Returns:

A – Extinction value in magnitudes.

Return type:

float

piscola.extinction_correction.extinction_curve(ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)

Plots the extinction curve for a given right ascension and declination or \(E(B-V)\).

Parameters:
  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • scaling (float, default 0.86) – Calibration of the Milky Way dust maps. Either 0.86 for the Schlafly & Finkbeiner (2011) recalibration or 1.0 for the original dust map of Schlegel, Fikbeiner & Davis (1998).

  • reddening_law (str, default fitzpatrick99) – Reddening law. The options are: ccm89 (Cardelli, Clayton & Mathis 1989), odonnell94 (O’Donnell 1994), fitzpatrick99 (Fitzpatrick 1999), calzetti00 (Calzetti 2000) and fm07 (Fitzpatrick & Massa 2007 with \(R_V = 3.1\).)

  • r_v (float, default 3.1) – Total-to-selective extinction ratio (\(R_V\))

  • ebv (float, default None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.

piscola.extinction_correction.extinction_filter(filter_wave, filter_response, ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)

Calculates the extinction for a given filter, given a right ascension and declination or \(E(B-V)\).

Parameters:
  • filter_wave (array) – Filter’s wavelength range.

  • filter_response (array) – Filter’s response function.

  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • scaling (float, default 0.86) – Calibration of the Milky Way dust maps. Either 0.86 for the Schlafly & Finkbeiner (2011) recalibration or 1.0 for the original dust map of Schlegel, Fikbeiner & Davis (1998).

  • reddening_law (str, default fitzpatrick99) – Reddening law. The options are: ccm89 (Cardelli, Clayton & Mathis 1989), odonnell94 (O’Donnell 1994), fitzpatrick99 (Fitzpatrick 1999), calzetti00 (Calzetti 2000) and fm07 (Fitzpatrick & Massa 2007 with \(R_V = 3.1\).)

  • r_v (float, default 3.1) – Total-to-selective extinction ratio (\(R_V\))

  • ebv (float, default None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.

Returns:

A – Extinction value in magnitudes.

Return type:

float

piscola.extinction_correction.redden(wave, flux, ra, dec, scaling=0.86, reddening_law='fitzpatrick99', r_v=3.1, ebv=None)

Reddens the given spectrum, given a right ascension and declination or \(E(B-V)\).

Parameters:
  • wave (array) – Wavelength values.

  • flux (array) – Flux density values.

  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • scaling (float, default 0.86) – Calibration of the Milky Way dust maps. Either 0.86 for the Schlafly & Finkbeiner (2011) recalibration or 1.0 for the original dust map of Schlegel, Fikbeiner & Davis (1998).

  • reddening_law (str, default fitzpatrick99) – Reddening law. The options are: ccm89 (Cardelli, Clayton & Mathis 1989), odonnell94 (O’Donnell 1994), fitzpatrick99 (Fitzpatrick 1999), calzetti00 (Calzetti 2000) and fm07 (Fitzpatrick & Massa 2007 with \(R_V = 3.1\).)

  • r_v (float, default 3.1) – Total-to-selective extinction ratio (\(R_V\))

  • ebv (float, default None) – Colour excess (\(E(B-V)\)). If given, this is used instead of the dust map value.

Returns:

redden_flux – Redden flux values.

Return type:

array