diff --git a/MANIFEST.in b/MANIFEST.in index 9e52660..c664f97 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ include README.rst include LICENSE include scopesim_templates/defaults.yaml include scopesim_templates/stellar/mamajek_alt.dat +include scopesim_templates/extragalactic/spiral_two_component.fits.bz2 graft scopesim_templates/micado/data/ graft scopesim_templates/micado/viking_fields/ prune scopesim_templates/tests* diff --git a/docs/index.rst b/docs/index.rst index 9188469..b1ec95e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,11 +23,6 @@ A library of templates and helper functions for creating In short :class:`scopesim.source.source.Source` objects contain a description of the spatial and spectral information of the source. For more information see :ref:`here `. -.. warning:: July 2022: The downloadable content server was retired and the data migrated to a new server. - - ScopeSim_templates v0.4.2 and above have been redirected to a new server URL. - For older verions, please either upgrade to the latest version (``pip install --upgrade scopesim_templates``), or follow these `instructions to update the server URL `_ in the config file. - Installation ------------ diff --git a/scopesim_templates/defaults.yaml b/scopesim_templates/defaults.yaml index c66041d..9f5be8a 100644 --- a/scopesim_templates/defaults.yaml +++ b/scopesim_templates/defaults.yaml @@ -2,9 +2,5 @@ spectral : wave_min : 0.3 wave_max : 3.0 -file : - server_url : "https://scopesim.univie.ac.at/scopesim_templates/" - use_cache : True - random : seed : 9001 diff --git a/scopesim_templates/extragalactic/galaxies.py b/scopesim_templates/extragalactic/galaxies.py index 3079c3b..78eb78e 100644 --- a/scopesim_templates/extragalactic/galaxies.py +++ b/scopesim_templates/extragalactic/galaxies.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- """TBA.""" +import pathlib import numpy as np import pyckles @@ -7,12 +8,11 @@ from astropy import units as u from astropy.io import fits from astropy.utils import deprecated_renamed_argument -from astropy.utils.data import download_file from astropy.wcs import WCS from spextra import Spextrum -from ..rc import Source, __config__, im_plane_utils as ipu, \ +from ..rc import Source, im_plane_utils as ipu, \ ter_curve_utils as tcu from ..extragalactic import galaxy_utils as gal_utils from ..extragalactic.exgal_models import GalaxyBase @@ -270,12 +270,8 @@ def spiral_two_component(extent=60*u.arcsec, fluxes=(0, 0), offset=(0, 0)): else: extent /= 3600. - filename = "spiral_two_component.fits" - url = __config__["!file.server_url"] - use_cache = __config__["!file.use_cache"] - # print(url+filename) - - path = download_file(remote_url=url+filename, cache=use_cache) + filename = "spiral_two_component.fits.bz2" + path = pathlib.Path(__file__).parent.absolute() / filename hdulist = fits.open(path) img_ext = hdulist[0].header["IMG_EXT"] spec_ext = hdulist[0].header["SPEC_EXT"] diff --git a/scopesim_templates/extragalactic/spiral_two_component.fits.bz2 b/scopesim_templates/extragalactic/spiral_two_component.fits.bz2 new file mode 100644 index 0000000..9f6e2c6 Binary files /dev/null and b/scopesim_templates/extragalactic/spiral_two_component.fits.bz2 differ