
Product
Introducing Socket MCP for Claude Desktop
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
🌌 An all-sky 3D dust extinction map based on Gaia and LAMOST
📄 Wang et al. (2025), An all-sky 3D dust map based on Gaia and LAMOST
📌 DOI: 10.12149/101620
📦 A Python package for easy access to the 3D dust map
📌 DOI: 10.12149/101619
Install via pip:
pip install dustmaps3d
⚠️ The package does not include the data file. A ~400MB model file will be automatically downloaded on first use from GitHub or NADC.
When dustmaps3d()
is called, it will try to download data_v3.fits.gz
;
After download, it will automatically extract the file to data_v3.fits
and cache it locally;
On future runs, the file will be read from the local cache without re-downloading.
✅ For international users, the primary source is: GitHub Releases
🌀 If GitHub download fails, it will automatically fallback to: NADC Data Center
On Chinese systems, the order is reversed — NADC is used as the primary source.
If download fails (e.g. connect timeout
), you can manually download and place the file in the cache directory:
Visit one of the following links:
🇨🇳 NADC Data Center (for China)
🌍 GitHub Releases (global)
Download: data_v3.fits.gz
Extract to: data_v3.fits
Place the extracted file in the local cache directory (the location is printed on first use)
Example path (Windows):
C:\Users\<username>\AppData\Local\dustmaps3d\data_v3.fits
Example path (Linux/macOS):
/home/<username>/.local/share/dustmaps3d/data_v3.fits
from dustmaps3d import dustmaps3d
l = [120.0]
b = [30.0]
d = [1.5]
EBV, dust, sigma, max_d = dustmaps3d(l, b, d)
print(f"EBV: {EBV.values[0]:.4f} [mag]")
print(f"Dust: {dust.values[0]:.4f} [mag/kpc]")
print(f"Sigma: {sigma.values[0]:.4f} [mag]")
print(f"Max distance: {max_d.values[0]:.4f} kpc")
Batch example with FITS:
import numpy as np
from astropy.table import Table
from dustmaps3d import dustmaps3d
data = Table.read('input.fits')
l = data['l'].astype(float)
b = data['b'].astype(float)
d = data['d'].astype(float)
EBV, dust, sigma, max_d = dustmaps3d(l, b, d)
data['EBV_3d'] = EBV
data['dust'] = dust
data['sigma'] = sigma
data['max_distance'] = max_d
data.write('output.fits', overwrite=True)
dustmaps3d(l, b, d, n_process=None)
Estimates 3D dust extinction and related quantities for given galactic coordinates and distances.
Input | Type | Description | Unit |
---|---|---|---|
l | np.ndarray | Galactic longitude | degrees |
b | np.ndarray | Galactic latitude | degrees |
d | np.ndarray | Distance | kpc |
Output | Type | Description | Unit |
---|---|---|---|
EBV | np.ndarray | E(B–V) extinction | mag |
dust | np.ndarray | Dust density (d(EBV)/dx) | mag/kpc |
sigma | np.ndarray | Estimated uncertainty in E(B–V) | mag |
max_d | np.ndarray | Maximum reliable distance | kpc |
If
d
containsNaN
, it will be automatically replaced by the maximum reliable distance along that line of sight (max_d
).If the input
d
exceedsmax_d
, it indicates the point lies beyond the model's reliable range. The returned values in this case are extrapolated and not guaranteed to be accurate.
If you use this model or the Python package, please cite both:
This project is open-source and distributed under the MIT License.
If you have any questions, suggestions, or encounter issues using this package,
please feel free to contact the authors via GitHub issues or email.
FAQs
An all-sky 3D dust map based on Gaia and LAMOST.
We found that dustmaps3d demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.