diff --git a/xrtpy/util/__init__.py b/xrtpy/util/__init__.py index 449e228e7..771b7f57a 100644 --- a/xrtpy/util/__init__.py +++ b/xrtpy/util/__init__.py @@ -5,3 +5,8 @@ "epoch", "time", ] + +_SSW_MIRRORS = [ + "https://sohoftp.nascom.nasa.gov/solarsoft/", + "https://hesperia.gsfc.nasa.gov/ssw/", +] diff --git a/xrtpy/util/xrt_deconvolve.py b/xrtpy/util/xrt_deconvolve.py index 4a182e9ce..23e7637fe 100644 --- a/xrtpy/util/xrt_deconvolve.py +++ b/xrtpy/util/xrt_deconvolve.py @@ -11,19 +11,24 @@ from sunpy.image.resample import resample from sunpy.image.transform import affine_transform from sunpy.map import Map +from urllib.parse import urljoin + +from xrtpy.util import _SSW_MIRRORS @manager.require( "PSF560.fits", [ - "https://sohoftp.nascom.nasa.gov/solarsoft/hinode/xrt/idl/util/XRT20170324_151721.0.PSF560.fits" + urljoin(mirror, "hinode/xrt/idl/util/XRT20170324_151721.0.PSF560.fits") + for mirror in _SSW_MIRRORS ], "0eaa5da6fb69661e7f46d1f0c463e4b3b1745426a399a4fbc53fc0c0ae87dd0d", ) @manager.require( "PSF1000.fits", [ - "https://sohoftp.nascom.nasa.gov/solarsoft/hinode/xrt/idl/util/XRT20170324_161721.0.PSF1000.fits" + urljoin(mirror, "hinode/xrt/idl/util/XRT20170324_161721.0.PSF1000.fits") + for mirror in _SSW_MIRRORS ], "95590a7174692977a2f111b932811c9c7ae105a59b93bfe6c96fba862cefacf1", )