Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Remove need for setup_spice #899

Merged
merged 4 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/899.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``heliopy.spice.setup_spice`` no longer needs to be manually run to setup common spice files.
4 changes: 0 additions & 4 deletions examples/plot_spice_orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
import astropy.units as u
import numpy as np

###############################################################################
# Setup SPICE. This will download and load commonly needed files
spice.setup_spice()

###############################################################################
# Load the solar orbiter spice kernel. HelioPy will automatically fetch the
# latest kernel
Expand Down
3 changes: 2 additions & 1 deletion heliopy/data/spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import requests

from heliopy import config
from heliopy import spice
import heliopy.data.util as util

data_dir = config['download_dir']
Expand Down Expand Up @@ -183,6 +182,8 @@ def get_kernel(name):
list of `~heliopy.spice.Kernel`
List of loaded kernels.
"""
from heliopy import spice

if name not in kernel_dict:
raise ValueError(
'Provided name {} not in list of available names: {}'.format(
Expand Down
2 changes: 1 addition & 1 deletion heliopy/data/test/test_spice.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import pytest
spice = pytest.importorskip("heliopy.data.spice")
from heliopy.data import spice


@pytest.mark.data
Expand Down
Loading