gdpyc package¶
Submodules¶
gdpyc.core module¶
Gas and Dust Python Calculator¶
A python module for estimating extinction, reddening and Hydrogen column densities.
-
class
DustMap
[source]¶ Bases:
gdpyc.core.Map
Class for dust maps.
-
classmethod
ebv
(coords, dustmap='SFD', hires=False)[source]¶ E(B - V) in the line-of-sight of coords.
Parameters: - coords (
SkyCoord
) – Astropy SkyCoord object with the line-of-sight coordinates. - dustmap (
str
, optional) – Name of the dust survey. Useshow_maps
method to see a list of all available maps. Defaults to ‘SFD’. - hires (
boolean
, optional) – Use high resolution map. If the map is not available locally, it is downloaded. Defaults to False.
Returns: ebv (
float
ornumpy.ndarray
) – Float, or numpy array with shape like coords.- coords (
-
classmethod
extinction
(coords, dustmap='SFD', filters='default', hires=False)[source]¶ Galactic extinction in the line-of-sight of coords for the bandpasses defined in filters. If there are N coords and M filters, returns an astropy table of shape N x M.
Note: E(B - V) to extinction conversion coefficients were estimated in [4] for the SFD map [5]. Using this method with a different dust map is possible, but obtaining accurate values is highly unlikely.
Parameters: - coords (
SkyCoord
) – Astropy SkyCoord object with the line-of-sight coordinates. - dustmap (
str
, optional) – Name of the dust survey. Useshow_maps
method to see a list of all available maps. Defaults to ‘SFD’. - filters (
str
orlist
, optional) – List of the filters (or, equivalently, a single string with comma separated filters). Useshow_filters
method to see a list of all available maps. If filters is ‘default’, returns extinction for the five SDSS bands (u, g, r, i, z). Defaults to ‘default’. - hires (
boolean
, optional) – Use high resolution map. If the map is not available locally, it is downloaded. Defaults toFalse
.
Returns: ext (
Table
) – Astropy Table with the extinction values at coords for each selected filter.References
[4] (1, 2) Schlafly & Finkbeiner 2011, ApJ, 737, 2, 103. [5] Schlegel, Finkbeiner & Davis 1998, ApJ, 500, 2. - coords (
-
classmethod
-
class
GasMap
[source]¶ Bases:
gdpyc.core.Map
Class for HI maps.
-
classmethod
nh
(coords, nhmap='LAB', hires=False)[source]¶ Hydrogen column density in the line-of-sight of coords, using LAMBDA healpix maps [1].
Parameters: - coords (
SkyCoord
) – Astropy SkyCoord object with the line-of-sight coordinates. - nhmap (
str
, optional) – Name of the HI survey. Useshow_maps
method to see a list of all available maps. Defaults to ‘LAB’. - hires (
boolean
, optional) – Use high resolution map. If the map is not available locally, it is downloaded. Defaults toFalse
.
Returns: nh (
Quantity
) – An Astropy Quantity object with shape like coords, in cm**-2.References
[1] https://lambda.gsfc.nasa.gov/product/foreground/fg_diffuse.cfm - coords (
-
classmethod
nhf
(coords, nhmap='LAB', radius=<Quantity 1. deg>)[source]¶ Hydrogen column density in the line-of-sight of coords, using HEASoft fits images (resolution of 0.675 x 0.675 deg) [3] and method.
Parameters: - coords (
SkyCoord
) – Astropy SkyCoord object with the line-of-sight coordinates. - nhmap (
str
, optional) – Name of the HI survey. Useshow_maps
method to see a list of all available maps. Defaults to ‘LAB’. - radius (
Quantity
, optional) – Radius of the circle around coords where the nH value is averaged. An Astropy angular Quantity object, consistent with degrees.
Returns: nh (
Quantity
) – An Astropy Quantity object with shape like coords, in cm**-2..References
[3] Original fits files created by K. Kuntz (LAB) and Steve Snowden (DL). - coords (
-
classmethod
nhtotal
(coords, hires=False)[source]¶ Total Hydrogen column density (NHI + 2NH2) in the line-of-sight of coords, using Willingale’s method [2].
Parameters: - coords (
SkyCoord
) – Astropy SkyCoord object with the line-of-sight coordinates. - hires (
boolean
, optional) – Use high resolution maps. If the map is not available locally, it is downloaded. Defaults toFalse
.
Returns: nhtotal (
Quantity
) – An Astropy Quantity object with shape like coords, in cm**-2.References
[2] Willingale et al. 2013, MNRAS, 431, 1. - coords (
-
classmethod
-
class
Map
[source]¶ Bases:
object
A class with common methods for HEALpix maps.
-
classmethod
plot_map
(map_name, plotname=None)[source]¶ Full-sky plot (mollweide projection) of the map.
Note: this method needs
healpy
andmatplotlib
.Parameters: - map_name (
str
) – Name of the map to be plotted. Useshow_maps
method to see a list of all available maps. - plotname (
str
orNone
, optional) – Name of the file where the plot will be saved. IfNone
, the plot is shown but not saved. Defaults toNone
.
Returns: plot (
numpy.ndarray
) – 2D numpy array with the plot.- map_name (
-
classmethod
unseen_pixels
(map_name, hires=False)[source]¶ Returns a list of UNSEEN healpix pixels contained in map_name.
Parameters: - map_name (
str
) – Name of the map to be plotted. Useshow_maps
method to see a list of all available maps. - hires (
boolean
, optional) – Use high resolution map. If the map is not available locally, it is downloaded. Defaults toFalse
.
- map_name (
-
classmethod
gdpyc.data module¶
Gas and Dust Python Calculator.
Module for downloading and processing the HEALpix maps used in gdpyc.