Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Fix representation deprecation in astropy
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsm committed Apr 7, 2022
1 parent f26bd00 commit 2745fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grblc/convert/sfd/json_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@ def serialize_skycoord(o):
Returns:
A dictionary that can be passed to :obj:`json.dumps`.
"""
representation = o.representation.get_name()
representation = o.representation_type.get_name()
frame = o.frame.name

r = o.represent_as('spherical')

d = dict(
_type='astropy.coordinates.SkyCoord',
frame=frame,
representation=representation,
representation_type=representation,
lon=r.lon,
lat=r.lat)

Expand All @@ -276,7 +276,7 @@ def deserialize_skycoord(d):
return coords.SkyCoord(
*args,
frame=d['frame'],
representation='spherical')
representation_type='spherical')


def get_encoder(ndarray_mode='b64'):
Expand Down

0 comments on commit 2745fb8

Please sign in to comment.