Skip to content

Commit

Permalink
Merge pull request astropy#15790 from eerovaher/trim-angle-formats
Browse files Browse the repository at this point in the history
Remove unused angle conversion helpers
  • Loading branch information
mhvk authored Dec 26, 2023
2 parents b50e9cf + 6440046 commit 6568d90
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions astropy/coordinates/angles/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,22 +414,6 @@ def degrees_to_dms(d):
return np.floor(sign * d), sign * np.floor(m), sign * s


def hours_to_decimal(h):
"""
Convert any parseable hour value into a float value.
"""
from .core import Angle

return Angle(h, unit=u.hourangle).hour


def hours_to_radians(h):
"""
Convert an angle in Hours to Radians.
"""
return u.hourangle.to(u.radian, h)


def hours_to_hms(h):
"""
Convert an floating-point hour value into an ``(hour, minute,
Expand All @@ -444,37 +428,6 @@ def hours_to_hms(h):
return (np.floor(sign * h), sign * np.floor(m), sign * s)


def radians_to_degrees(r):
"""
Convert an angle in Radians to Degrees.
"""
return u.radian.to(u.degree, r)


def radians_to_hours(r):
"""
Convert an angle in Radians to Hours.
"""
return u.radian.to(u.hourangle, r)


def radians_to_hms(r):
"""
Convert an angle in Radians to an ``(hour, minute, second)`` tuple.
"""
hours = radians_to_hours(r)
return hours_to_hms(hours)


def radians_to_dms(r):
"""
Convert an angle in Radians to an ``(degree, arcminute,
arcsecond)`` tuple.
"""
degrees = u.radian.to(u.degree, r)
return degrees_to_dms(degrees)


def sexagesimal_to_string(values, precision=None, pad=False, sep=(":",), fields=3):
"""
Given an already separated tuple of sexagesimal values, returns
Expand Down

0 comments on commit 6568d90

Please sign in to comment.