A 3D map of interstellar dust reddening, covering three quarters of the sky (declinations greater than -30 degrees) out to a distance of several kiloparsecs. The map is based on high-quality stellar photometry of 800 million stars from Pan-STARRS 1 and 2MASS.
The map is available for five HEALPix levels (6 through 10), published here as separate tables, map6 through map10. A union of the coverage is provided as map_union. Use its coverage column to match against other tables.
See http://argonaut.rc.fas.harvard.edu/ for more details.
These tables lets you do dereddening of photometry provided you have:
You will usually join two of the arrays in map_union to your table. Because of boring technicalities, that is a bit ideomatic; you need to compute an order-10 healpix and see if that is contained in this tables coverage. In a cartoon:
SELECT mytable.*, best_fit, grdiagnostic FROM mytable JOIN prdust.map_union ON (1=ivo_interval_has( CAST(ivo_healpix_index(10, l, b) AS INTEGER), coverage))
Yes, you have to use galactic longitude and latitude in the arguments of ivo_healpix_index; and the odd cast is necessary because coverage contains normal integer intervals.
If you have equatorial coordinates ra and dec, on this service there's the gavo_transform user defined function to your rescue. Just write:
CAST(ivo_healpix_index(10, gavo_transform('ICRS', 'GALACTIC', POINT(ra, dec)) ) AS INTEGER), coverage)
in the second argument of ivo_interval_has above.
The next step is to estimate a distance modulus. If you have a good parallax estimate and your TAP service supports the in_unit UDF, you might get away with:
5*log10(1./in_unit(parallax, 'arcsec'))-5 AS dist_mod
You will certainly want to do better than this in almost all science use cases (see 2018arXiv180409376L for a through discussion in the context of Gaia DR2).
From dist_mod, you can compute the distance bin in the best_fit and grdiagostic columns with:
ROUND((dist_mod-4)*2)+1 AS dist_mod_bin
With this, you can add an E(B-V) to a local table somewhat like this:
SELECT q.*, best_fit[dist_mod_bin] as eb_v FROM ( SELECT ( CAST(ivo_healpix_index(10, l, b) AS INTEGER) AS cat_hpx, ROUND((dist_mod-4)*2)+1 AS dist_mod_bin, mytable.* FROM mytable) AS q JOIN prdust.map_union ON (1=ivo_interval_has(cat_hpx, coverage)) WHERE grdiagnostic[dist_mod_bin]<1.2
To turn E(B-V) into extinctions, there are several recipes. See, for instance 1998ApJ...500..525S.
You'll find a worked-out example on this at https://blog.g-vo.org/deredden-using-tap/.