Skip to content

Commit

Permalink
Merge pull request #88 from AstarVienna/hb/addspiralgalaxy
Browse files Browse the repository at this point in the history
Add spiral galaxy directly to the repository
  • Loading branch information
hugobuddel committed Jul 31, 2024
2 parents b239f44 + ca704f0 commit 268214f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
5 changes: 0 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Source Object>`.

.. 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 <https://astarvienna.github.io/server_upgrade_instructions.html>`_ in the config file.

Installation
------------

Expand Down
4 changes: 0 additions & 4 deletions scopesim_templates/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 4 additions & 8 deletions scopesim_templates/extragalactic/galaxies.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# -*- coding: utf-8 -*-
"""TBA."""
import pathlib

import numpy as np
import pyckles

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
Expand Down Expand Up @@ -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"]
Expand Down
Binary file not shown.

0 comments on commit 268214f

Please sign in to comment.