or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

2d-maps.md3d-maps.mdbase-classes.mdconfig.mdindex.md

2d-maps.mddocs/

0

# 2D Dust Maps

1

2

Line-of-sight integrated extinction maps that provide total dust column density measurements across the sky. These maps represent the cumulative dust extinction along the entire line of sight and are the most commonly used for extinction corrections in observational astronomy.

3

4

## Capabilities

5

6

### SFD Map (Schlegel, Finkbeiner & Davis 1998)

7

8

The widely-used SFD'98 dust map based on IRAS and COBE observations, providing full-sky E(B-V) extinction values with ~6 arcminute resolution.

9

10

```python { .api }

11

class SFDQuery(DustMap):

12

def __init__(self, map_dir=None):

13

"""

14

Initialize SFD dust map query.

15

16

Parameters:

17

- map_dir (str, optional): Directory containing SFD map files

18

"""

19

20

def query(self, coords, order=1):

21

"""

22

Query SFD E(B-V) extinction values.

23

24

Parameters:

25

- coords (SkyCoord): Coordinate positions to query

26

- order (int): Interpolation order (0=nearest, 1=linear)

27

28

Returns:

29

- float | np.ndarray: E(B-V) extinction values

30

"""

31

32

class SFDWebQuery(WebDustMap):

33

def __init__(self, api_url=None):

34

"""Initialize web-based SFD query (no local data required)."""

35

36

def query(self, coords, **kwargs):

37

"""Query SFD via web API."""

38

39

def fetch():

40

"""Download SFD map data files to configured data directory."""

41

```

42

43

**Usage Example:**

44

45

```python

46

import dustmaps.sfd

47

from dustmaps.sfd import SFDQuery

48

from astropy.coordinates import SkyCoord

49

50

# Download data (first time only)

51

dustmaps.sfd.fetch()

52

53

# Initialize query

54

sfd = SFDQuery()

55

56

# Query extinction

57

coord = SkyCoord(ra=180.0, dec=0.0, unit='deg', frame='icrs')

58

extinction = sfd(coord)

59

print(f"SFD E(B-V): {extinction:.4f}")

60

```

61

62

### Planck Dust Maps

63

64

Dust maps from the Planck satellite providing both thermal emission and polarization-based extinction measurements.

65

66

```python { .api }

67

class PlanckQuery(HEALPixFITSQuery):

68

def __init__(self, map_fname=None, component='extragalactic'):

69

"""

70

Initialize Planck 2013 dust map query.

71

72

Parameters:

73

- map_fname (str, optional): Path to Planck map file

74

- component (str): Map component ('extragalactic' or 'galactic')

75

"""

76

77

def query(self, coords, **kwargs):

78

"""

79

Query Planck dust measurements.

80

81

Parameters:

82

- coords (SkyCoord): Coordinate positions to query

83

84

Returns:

85

- float | np.ndarray: Dust optical depth values

86

"""

87

88

class PlanckGNILCQuery(HEALPixFITSQuery):

89

def __init__(self, map_fname=None):

90

"""Initialize Planck GNILC dust map query."""

91

92

def query(self, coords, **kwargs):

93

"""Query Planck GNILC dust measurements."""

94

95

def fetch(which='2013'):

96

"""

97

Download Planck map data.

98

99

Parameters:

100

- which (str): Map version ('2013' or 'GNILC')

101

"""

102

```

103

104

### Corrected SFD Map (CSFD - Chiang 2023)

105

106

Temperature-corrected version of the SFD map addressing known systematic errors in the original SFD measurements.

107

108

```python { .api }

109

class CSFDQuery(HEALPixQuery):

110

def __init__(self, map_dir=None):

111

"""

112

Initialize Corrected SFD (CSFD) map query.

113

114

Parameters:

115

- map_dir (str, optional): Directory containing CSFD map files

116

"""

117

118

def query(self, coords, **kwargs):

119

"""

120

Query CSFD E(B-V) extinction values.

121

122

Parameters:

123

- coords (SkyCoord): Coordinate positions to query

124

125

Returns:

126

- float | np.ndarray: Corrected E(B-V) extinction values

127

"""

128

129

def fetch():

130

"""Download CSFD map data files."""

131

```

132

133

### Lenz 2017 Map

134

135

Dust map based on Planck observations with improved temperature and spectral index corrections.

136

137

```python { .api }

138

class Lenz2017Query(HEALPixFITSQuery):

139

def __init__(self, map_fname=None):

140

"""Initialize Lenz et al. 2017 dust map query."""

141

142

def query(self, coords, **kwargs):

143

"""Query Lenz 2017 dust measurements."""

144

145

def fetch():

146

"""Download Lenz 2017 map data."""

147

```

148

149

### Peek & Graves 2010 Map

150

151

High Galactic latitude dust map based on SDSS stellar photometry.

152

153

```python { .api }

154

class PG2010Query(SFDBase):

155

def __init__(self, map_dir=None):

156

"""Initialize Peek & Graves 2010 map query."""

157

158

def query(self, coords, **kwargs):

159

"""Query P&G 2010 dust measurements."""

160

161

def fetch():

162

"""Download P&G 2010 map data."""

163

```

164

165

### Burstein & Heiles 1982 Map

166

167

Classic dust reddening map based on galaxy counts, included for historical completeness.

168

169

```python { .api }

170

class BHQuery(DustMap):

171

def __init__(self, map_fname=None):

172

"""Initialize Burstein & Heiles 1982 map query."""

173

174

def query(self, coords, **kwargs):

175

"""

176

Query B&H reddening values.

177

178

Returns:

179

- float | np.ndarray: Reddening estimates

180

"""

181

```

182

183

### IPHAS Map

184

185

Galactic plane extinction map derived from the IPHAS H-alpha survey.

186

187

```python { .api }

188

class IPHASQuery(UnstructuredDustMap):

189

def __init__(self, map_fname=None):

190

"""Initialize IPHAS extinction map query."""

191

192

def query(self, coords, **kwargs):

193

"""

194

Query IPHAS extinction values (Galactic plane coverage).

195

196

Parameters:

197

- coords (SkyCoord): Coordinate positions to query

198

199

Returns:

200

- float | np.ndarray: A_V extinction values

201

"""

202

203

def fetch(clobber=False):

204

"""Download IPHAS map data."""

205

```

206

207

### Gaia Total Galactic Extinction Map

208

209

All-sky extinction map derived from Gaia stellar observations.

210

211

```python { .api }

212

class GaiaTGEQuery(HEALPixQuery):

213

def __init__(self, map_fname=None, **kwargs):

214

"""Initialize Gaia Total Galactic Extinction map query."""

215

216

def query(self, coords, **kwargs):

217

"""Query Gaia TGE extinction values."""

218

219

def fetch():

220

"""Download Gaia TGE map data."""

221

```

222

223

## Common Usage Patterns

224

225

### Comparing Multiple 2D Maps

226

227

```python

228

from dustmaps.sfd import SFDQuery

229

from dustmaps.planck import PlanckQuery

230

from dustmaps.csfd import CSFDQuery

231

from astropy.coordinates import SkyCoord

232

233

# Initialize multiple maps

234

sfd = SFDQuery()

235

planck = PlanckQuery()

236

csfd = CSFDQuery()

237

238

# Query same coordinates

239

coord = SkyCoord(ra=180.0, dec=30.0, unit='deg', frame='icrs')

240

241

sfd_ext = sfd(coord)

242

planck_ext = planck(coord)

243

csfd_ext = csfd(coord)

244

245

print(f"SFD: {sfd_ext:.4f}")

246

print(f"Planck: {planck_ext:.4f}")

247

print(f"CSFD: {csfd_ext:.4f}")

248

```

249

250

### Batch Processing

251

252

```python

253

import numpy as np

254

from dustmaps.sfd import SFDQuery

255

from astropy.coordinates import SkyCoord

256

257

sfd = SFDQuery()

258

259

# Generate grid of coordinates

260

ra_grid = np.linspace(0, 360, 100)

261

dec_grid = np.linspace(-90, 90, 50)

262

ra_flat, dec_flat = np.meshgrid(ra_grid, dec_grid)

263

264

coords = SkyCoord(

265

ra=ra_flat.flatten(),

266

dec=dec_flat.flatten(),

267

unit='deg',

268

frame='icrs'

269

)

270

271

# Query all coordinates at once

272

extinctions = sfd(coords)

273

extinction_grid = extinctions.reshape(50, 100)

274

```