Skip to content
Open
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
6 changes: 2 additions & 4 deletions gbmgeometry/gbm_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
import numpy as np
from astropy.coordinates import (
SkyCoord,
get_sun,
get_body,
get_body_barycentric,
get_moon,
)
from spherical_geometry.polygon import SphericalPolygon
import astropy.units as u
Expand Down Expand Up @@ -81,7 +79,7 @@ def update_position(self, quaternion, sc_pos=None, time=None):
if self._time is not None:
# we can calculate the sun position
# in GCRS
tmp_sun = get_sun(self._time)
tmp_sun = get_body("sun",self._time)
# in ICRS
self._sun_position_icrs = SkyCoord(
tmp_sun.ra.deg,
Expand Down Expand Up @@ -261,7 +259,7 @@ def moon_position_icrs(self):
"""
:return: moon position as SkyCood object in icrs frame
"""
tmp_moon = get_moon(self._time)
tmp_moon = get_body("moon",self._time)
# in ICRS
return SkyCoord(
tmp_moon.ra.deg,
Expand Down
6 changes: 3 additions & 3 deletions gbmgeometry/position_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import h5py
import numpy as np
import scipy.interpolate as interpolate
from astropy.coordinates import get_body, get_moon, get_sun
from astropy.coordinates import get_body

from gbmgeometry.utils.gbm_time import GBMTime

Expand Down Expand Up @@ -247,7 +247,7 @@ def sun_position(self, t):

"""

return get_sun(self.astro_time(t))
return get_body("sun",self.astro_time(t))

def moon_position(self, t):
"""
Expand All @@ -261,7 +261,7 @@ def moon_position(self, t):

"""

return get_moon(self.astro_time(t))
return get_body("moon",self.astro_time(t))

def body_position(self, t, body="uranus"):
"""
Expand Down
4 changes: 2 additions & 2 deletions versioneer.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ def get_config_from_root(root):
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
# the top of versioneer.py for instructions on writing your setup.cfg .
setup_cfg = os.path.join(root, "setup.cfg")
parser = configparser.SafeConfigParser()
parser = configparser.ConfigParser()
with open(setup_cfg, "r") as f:
parser.readfp(f)
parser.read_file(f)
VCS = parser.get("versioneer", "VCS") # mandatory

def get(parser, name):
Expand Down