dustmaps icon indicating copy to clipboard operation
dustmaps copied to clipboard

WebQuery not working anymore (June 2024)

Open ricardo-rizzo opened this issue 1 year ago • 1 comments

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!

ricardo-rizzo avatar Jun 19 '24 12:06 ricardo-rizzo

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.

gregreen avatar Jul 10 '24 13:07 gregreen

Thank you, @gregreen , for the reply. In the meantime, I think I have to download data bases and modify the scripts to run locally.

ricardo-rizzo avatar Jul 11 '24 23:07 ricardo-rizzo