dustmaps
dustmaps copied to clipboard
WebQuery not working anymore (June 2024)
I'm building a python package which include BayestarWebQuery to compute extinction based on dustmaps.
Since some days ago, it is not longer working. I suspect it is due to a failure in the web service.
The code I'm using is:
from astropy.coordinates import SkyCoord
import astropy.units as u
from astropy.table import Table
from dustmaps.bayestar import BayestarWebQuery
import numpy as np
def extinction(ra, dec, d):
'''
Function to compute extinction following the
3D model of Bayestar 2019
Reference: dustmaps package (Green 2018. DOI: 10.21105/joss.00695)
Arguments:
ra, dec [deg] Coordinates J2000
d [kpc] Distance
'''
bayestar = BayestarWebQuery(version='bayestar2019')
coords = SkyCoord(ra, dec, distance=d, frame='icrs')
extinction = bayestar(coords, mode='median')
return extinction
It was working perfectly until some days ago. Thank you!
I think this is due to the web server being unreliable. I do not have time at the moment to migrate to a different service, but I will look into it.
Thank you, @gregreen , for the reply. In the meantime, I think I have to download data bases and modify the scripts to run locally.