Skip to content

Commit

Permalink
Fixing tests broken due to bad links
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed May 11, 2021
1 parent b6beb7c commit caba506
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
5 changes: 3 additions & 2 deletions aesop/tests/test_spectrum1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def test_constructor():

@remote_data
def test_read_fits():
url = ('http://staff.washington.edu/bmmorris/docs/'
'KIC8462852.0065.wfrmcpc.fits')
url = ('https://drive.google.com/uc?export=download&id='
'1vf8rNhAiUJ1NO9VkwZOhcK6avJICfETH')

path = download_file(url, show_progress=False)

echelle_spectrum = EchelleSpectrum.from_fits(path)
Expand Down
27 changes: 13 additions & 14 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,24 @@ spectroscopic standard O star BD+28 4211. We also create an
>>> from astropy.utils.data import download_file
>>> target_url = 'http://staff.washington.edu/bmmorris/docs/KIC8462852.0065.wfrmcpc.fits'
>>> spectroscopic_standard_url = 'http://staff.washington.edu/bmmorris/docs/BD28_4211.0034.wfrmcpc.fits'
>>> target_url = 'https://drive.google.com/uc?export=download&id=1lkZi4p6ZGeeyDf_Z0eexMy0GHnr92_dv'
>>> spectroscopic_standard_url = 'https://drive.google.com/uc?export=download&id=1YiY1DP5Ec4mumvzjWj4u5DmFiEyn9MgH'
>>> target_path = download_file(target_url, show_progress=False)
>>> standard_path = download_file(spectroscopic_standard_url, show_progress=False)
>>> from aesop import EchelleSpectrum
>>> target_spectrum = EchelleSpectrum.from_fits(target_path) # doctest: +SKIP
>>> target_spectrum = EchelleSpectrum.from_fits(target_path)
>>> standard_spectrum = EchelleSpectrum.from_fits(standard_path)
You can check basic metadata for an `~aesop.EchelleSpectrum` object by printing
it:

.. code-block:: python
>>> print(target_spectrum)
<EchelleSpectrum: 107 orders, 3506.8-10612.5 Angstrom>
<EchelleSpectrum: 107 orders, 3506.8-10612.4 Angstrom>
The `~aesop.EchelleSpectrum` object behaves a bit like a Python list -- it
supports indexing, where the index counts the order number, starting with index
Expand All @@ -66,8 +65,8 @@ make a quick plot of the 73rd order of the target's echelle spectrum:

from astropy.utils.data import download_file

target_url = 'http://staff.washington.edu/bmmorris/docs/KIC8462852.0065.wfrmcpc.fits'
spectroscopic_standard_url = 'http://staff.washington.edu/bmmorris/docs/BD28_4211.0034.wfrmcpc.fits'
target_url = 'https://drive.google.com/uc?export=download&id=1lkZi4p6ZGeeyDf_Z0eexMy0GHnr92_dv'
spectroscopic_standard_url = 'https://drive.google.com/uc?export=download&id=1YiY1DP5Ec4mumvzjWj4u5DmFiEyn9MgH'

target_path = download_file(target_url)
standard_path = download_file(spectroscopic_standard_url)
Expand Down Expand Up @@ -116,8 +115,8 @@ function has been mostly removed:

from astropy.utils.data import download_file

target_url = 'http://staff.washington.edu/bmmorris/docs/KIC8462852.0065.wfrmcpc.fits'
spectroscopic_standard_url = 'http://staff.washington.edu/bmmorris/docs/BD28_4211.0034.wfrmcpc.fits'
target_url = 'https://drive.google.com/uc?export=download&id=1lkZi4p6ZGeeyDf_Z0eexMy0GHnr92_dv'
spectroscopic_standard_url = 'https://drive.google.com/uc?export=download&id=1YiY1DP5Ec4mumvzjWj4u5DmFiEyn9MgH'

target_path = download_file(target_url)
standard_path = download_file(spectroscopic_standard_url)
Expand Down Expand Up @@ -149,8 +148,8 @@ continuum normalization method,

from astropy.utils.data import download_file

target_url = 'http://staff.washington.edu/bmmorris/docs/KIC8462852.0065.wfrmcpc.fits'
spectroscopic_standard_url = 'http://staff.washington.edu/bmmorris/docs/BD28_4211.0034.wfrmcpc.fits'
target_url = 'https://drive.google.com/uc?export=download&id=1lkZi4p6ZGeeyDf_Z0eexMy0GHnr92_dv'
spectroscopic_standard_url = 'https://drive.google.com/uc?export=download&id=1YiY1DP5Ec4mumvzjWj4u5DmFiEyn9MgH'

target_path = download_file(target_url)
standard_path = download_file(spectroscopic_standard_url)
Expand Down Expand Up @@ -182,7 +181,7 @@ object:
>>> spec1d = target_spectrum.to_Spectrum1D()
>>> print(spec1d)
<Spectrum1D: 3561.8-10390.9 Angstrom>
<Spectrum1D: 3561.9-10391.0 Angstrom>
>>> spec1d.plot() # doctest: +SKIP
Expand All @@ -195,8 +194,8 @@ telluric absorption. Here's what it looks like:
import matplotlib.pyplot as plt
from astropy.utils.data import download_file

target_url = 'http://staff.washington.edu/bmmorris/docs/KIC8462852.0065.wfrmcpc.fits'
spectroscopic_standard_url = 'http://staff.washington.edu/bmmorris/docs/BD28_4211.0034.wfrmcpc.fits'
target_url = 'https://drive.google.com/uc?export=download&id=1lkZi4p6ZGeeyDf_Z0eexMy0GHnr92_dv'
spectroscopic_standard_url = 'https://drive.google.com/uc?export=download&id=1YiY1DP5Ec4mumvzjWj4u5DmFiEyn9MgH'

target_path = download_file(target_url)
standard_path = download_file(spectroscopic_standard_url)
Expand Down

0 comments on commit caba506

Please sign in to comment.