HOW-TO Use galactic extinction in Astro-WISE

We have implemented in Astro-WISE two Galactic extinction maps:

In the case of SFD map we used an original IDL program rewritten in python: http://astro.berkeley.edu/~marc/dust/data/data.html

SFD extinction map: for extragalactic sources

To find the Galactic extinction towards an extragalactic object one can use the SFD map for which you have to provide galactic coordinates:

awe> longvec = 45.0
awe> latvec = 45.0
awe> from astro.util.extinction import extinction
awe> ret = extinction(longvec, latvec)
awe> print(ret)
[0.0439861752093]

The returned value is an excess ratio (\(E_{B-V}\)) in the selected direction. You can use as well vectors for input coordinates:

awe> longvec = [0.0, 45.0, 90.0]
awe> latvec = [0.0, 45.0, 90.0]
awe> from astro.util.extinction import extinction
awe> ret = extinction(longvec, latvec)
awe> print(ret)
[101.313850403, 0.0439861752093, 0.012209450826]

The Galactic extinction can be calculated with an interpolation between pixels closest to the desired direction:

awe> longvec = [0.0, 45.0, 90.0]
awe> latvec = [0.0, 45.0, 90.0]
awe> from astro.util.extinction import extinction
awe> ret = extinction(longvec, latvec, interp=True)
awe> print(ret)
[99.697704474, 0.0443909994508, 0.0119094799738]

Note: The number precision used in the IDL code is lower than in the python implementation. This can cause differences in derived \(E_{B-V}\) between the two implementations in areas of highly varying extinction. Differences are \(< 0.1 \%\) for 99.8% of the sky as Table 1 illustrates:

Table 1: Differences in derived \(E_{B-V}\) between the IDL and python implementation for SFD

Absolute difference sky area fraction
\(< 0.1 \%\) 99.8 %
\(< 1 \%\) 99.8 %
\(> 5 \%\) 00.02 %
\(> 10 \%\) 00.004 %
\(> 50 \%\) 00.0004 %

Arenou extinction map: inside the Galaxy

Arenou extinction model based on Hipparcos data and provides an extinction inside the Galaxy, i.e., for a selected distance. The user can provide a distance (in kpc), if the distance is omitted, an extinction for 15 kpc will be returned (according to the model).

awe> longvec = [0.0,45.0,90.0]
awe> latvec = [0.0,45.0,90.0]
awe> from astro.util.extinction import extinction
awe> ret = extinction(longvec,latvec,source='Arenou')
awe> print(ret)
[0.51390040827009664, 0.017030418212218647, 0.032073867112540198]

or, for 100 pc distance,

awe> longvec = [0.0,45.0,90.0]
awe> latvec = [0.0,45.0,90.0]
awe> d = [0.1,0.1,0.1]
awe> from astro.util.extinction import extinction
awe> ret = extinction(longvec,latvec,source='Arenou',dist=d)
awe> print(ret)
[0.08085090032154342, 0.017030418212218647, 0.0032773954983922873]

Coordinate transformation

A number of functions for coordinate transformations are available in Astro-WISE (which are based on the IDL astro library).

  1. glactc Convert between celestial and Galactic (or Supergalactic) coordinates.

    Input parameters:

    • right ascension, hours (or degrees if degree=True is set), scalar
    • declination, degrees, scalar
    • equinox of ra and dec, scalar
    • if degree=True, both coordinates are in degree (overwise ra is in hours), degree=False by default
    • if fk4=True, then coordinates are assumed to be in FK4, if fk4=False (default), FK5 is assumed. By B1950 coordinates use year=1950 and fk4=True
    • SuperGalactic=False by default, if SuperGalactic=True, SuperGalactic coordinates are returned (deVaucouleurs et al. 1976), to account for the local supercluster. The North pole in SuperGalactic coordinates has Galactic coordinates l = 47.47, b = 6.32, and the origin is at Galactic coordinates l = 137.37, b= 0 )
    • direction of conversion, eqtogal=True by default, if eqtogal=False, the input coordinates (ra, dec) are galactic coordinates and returned coordinates are celestial ones

    Example: Convert coordinates (0.0,0.0) to galactic coordinates

    awe> from astro.util.idllib import glactc
    awe> glactc(0.0,0.0,2008.0)
    (96.112413056666824, -60.188305254568284)
    

    Convert galactic coordinates (0.0,0.0) to FK4 coordinates for epoch 2008.0, in degrees

    awe> from astro.util.idllib import glactc
    awe> glactc(0.0,0.0, 2008.0, degree=True, fk4=True, eqtogal=False)
    (266.53170097124888, -28.938911978654406)
    
  2. precess Precess coordinates between two epochs

    Input parameters:

    • right ascension, degrees (or radians if radian=True is set), scalar
    • declination, degrees (or radians if radian=True is set), scalar
    • original equinox of coordinates, numeric scalar
    • equinox of precessed coordinate, numeric scalar
    • if fk4=True, then coordinates are assumed to be in FK4, if fk4=False (default), FK5 is assumed
    • if radian=True, coordinates must be in radians, by default radians=False

    Example:

    awe> from astro.util.idllib import precess
    awe> ra = 329.887720833
    awe> dec = -56.9925147222
    awe> precess(ra, dec, 1950.0, 1975.0, fk4=True)
    (330.3144305415542, -56.871861264857067)