Uranus

Class to model Uranus planet.

Uranus examples

Uranus - VSOP87-Parameters

class pyplanets.planets.uranus.Uranus(epoch)[source]

Class Uranus models that planet.

__init__(epoch)[source]
Initializes an object of type planet for a given date (epoch) with

its orbital parameters (ephemeredes) given by VSOP87.

Parameters

epoch (Epoch) – Epoch to which all computations of this instance refer, as an Epoch object

Raises

TypeError if epoch is of wrong type.

aphelion()pyplanets.core.epoch.Epoch[source]

This method computes the time of Aphelion closer to a given epoch.

Returns

The epoch of the desired Perihelion (or Aphelion)

Return type

Epoch

Note

The solution provided by this method may have several days of error.

>>> epoch = Epoch(2090, 1, 1.0)
>>> e = Uranus(epoch).aphelion()
>>> y, m, d = e.get_date()
>>> print(y)
2092
>>> print(m)
11
>>> print(int(d))
22
conjunction()pyplanets.core.epoch.Epoch[source]

This method computes the time of the conjunction closest to the given epoch.

Returns

The time when the conjunction happens, as an Epoch

Return type

Epoch

Raises

ValueError if input epoch outside the -2000/4000 range.

>>> epoch = Epoch(1993, 10, 1.0)
>>> conj = Uranus(epoch).conjunction()
>>> y, m, d = conj.get_date()
>>> print(y)
1994
>>> print(m)
1
>>> print(round(d, 4))
12.7365
static magnitude(sun_dist, earth_dist)[source]

This function computes the approximate magnitude of Uranus.

Parameters
  • sun_dist (float) – Distance from Uranus to Sun, in Astronomical Units

  • earth_dist (float) – Distance from Uranus to Earth, in Astronomical Units

Returns

Uranus’s magnitude

Return type

float

opposition()pyplanets.core.epoch.Epoch[source]

This method computes the time of the opposition closest to the given epoch.

Returns

The time when the opposition happens, as an Epoch

Return type

Epoch

Raises

ValueError if input epoch outside the -2000/4000 range.

>>> epoch = Epoch(1780, 12, 1.0)
>>> oppo = Uranus(epoch).opposition()
>>> y, m, d = oppo.get_date()
>>> print(y)
1780
>>> print(m)
12
>>> print(round(d, 4))
17.5998
perihelion()pyplanets.core.epoch.Epoch[source]

This method computes the time of Perihelion closer to a given epoch.

Returns

The epoch of the desired Perihelion (or Aphelion)

Return type

Epoch

Note

The solution provided by this method may have several days of error.

>>> epoch = Epoch(1880, 1, 1.0)
>>> e = Uranus(epoch).perihelion()
>>> y, m, d = e.get_date()
>>> print(y)
1882
>>> print(m)
3
>>> print(int(d))
18