histastro.planets module

Planet functions for HistAstro.

histastro.planets.computeLBR(jde, lonTerms, latTerms, radTerms)[source]

Compute the heliocentric ecliptical coordinates for a planet from its VSOP87D periodic terms.

Parameters:
  • jde (float) – Julian Day in dynamical time, i.e., corrected for Delta T (days).

  • lonTerms (float) – Numpy array containing VSOP87D periodic terms for heliocentric ecliptical longitude.

  • latTerms (float) – Numpy array containing VSOP87D periodic terms for heliocentric ecliptical latitude.

  • radTerms (float) – Numpy array containing VSOP87D periodic terms for heliocentric distance.

Returns:

Tuple containing (lon, lat, rad):

  • lon (float): Heliocentric ecliptical longitude (rad).

  • lat (float): Heliocentric ecliptical latitude (rad).

  • rad (float): Heliocentric distance (km).

Return type:

tuple (float,float,float)

References

histastro.planets.hc2gc(le, be, re, lp, bp, rp)[source]

Convert the heliocentric spherical coordinates of an object to geocentric spherical coordinates.

Parameters:
  • le (float) – Heliocentric ecliptical longitude of the Earth (rad).

  • be (float) – Heliocentric ecliptical latitude of the Earth (rad).

  • re (float) – Heliocentric ecliptical distance of the Earth (km).

  • lp (float) – Heliocentric ecliptical longitude of the other object (rad).

  • bp (float) – Heliocentric ecliptical latitude of the other object (rad).

  • rp (float) – Heliocentric ecliptical distance of the other object (km).

Returns:

Tuple containing (lon, lat, rad):

  • lon (float): Geocentric ecliptical longitude (rad).

  • lat (float): Geocentric ecliptical latitude (rad).

  • rad (float): Geocentric distance (km).

Return type:

tuple (float,float,float)

Note

  • The heliocentric spherical coordinates of the Earth and the other object are first converted to rectangular coordinates. Then the difference between the two sets is taken, yielding geocentric rectangular coordinates. Finally, this difference is converted back to geocentric spherical coordinates.

  • When the coordinates of the Earth are replaced by those of a different object, the coordinates of the second object are computed, as seen from the centre of the first object.

  • This function is useful when using the VSOP87D files.

histastro.planets.magnPlanet(pl, distPS, distPE, distSE)[source]

Compute the apparent visual magnitude of a planet.

Parameters:
  • pl (int) – Planet ID (1-2, 4-9 for Mercury-Venus, Mars-Pluto).)

  • distPS – Heliocentric distance of the planet (AU).

  • distPE – Geocentric distance of the planet (AU).

  • distSE – Heliocentric distance of the Earth (AU).

Returns:

Apparent visual magnitude of the planet.

Return type:

float

References

histastro.planets.magnSatRing(JD, lon, lat)[source]

Compute the apparent visual magnitude of Saturn’s rings.

Parameters:
  • JD (float) – Julian Day (days).

  • lon (float) – Geocentric ecliptical longitude of Saturn (rad).

  • lat (float) – Geocentric ecliptical latitude of Saturn (rad).

Returns:

magnSatRing: Apparent visual magnitude of the planet.

Return type:

float

References

Note

  • This is a simplified expression, which uses phi instead of Delta U. The mean absolute deviation from the full expression: is 0.014m, the maximum deviation found: 0.041m in 10^5 trials, over the last 5000 years.

histastro.planets.readVSOP(dataDir, pl)[source]

Read the periodic terms for a heliocentric ecliptical planet position from a VSOP87D.* file.

Parameters:
  • dataDir (str) – Directory where the VSOP87D.* files are located.

  • pl (int) – Planet ID: 1-8 = Mercury - Neptune.

Returns:

Tuple containing (lonTerms, latTerms, radTerms):

  • lonTerms (float): Numpy array containing VSOP87D periodic terms for heliocentric ecliptical

    longitude.

  • latTerms (float): Numpy array containing VSOP87D periodic terms for heliocentric ecliptical latitude.

  • radTerms (float): Numpy array containing VSOP87D periodic terms for heliocentric distance.

Return type:

tuple (float,float,float)

References

histastro.planets.xyz_hc2lbr_gc(xe, ye, ze, xp, yp, zp)[source]

Convert the heliocentric rectangular coordinates of an object to geocentric spherical coordinates.

Parameters:
  • xe (float) – Heliocentric ecliptical x-coordinate of the Earth.

  • ye (float) – Heliocentric ecliptical y-coordinate of the Earth.

  • ze (float) – Heliocentric ecliptical z-coordinate of the Earth.

  • xp (float) – Heliocentric ecliptical x-coordinate of the other object.

  • yp (float) – Heliocentric ecliptical y-coordinate of the other object.

  • zp (float) – Heliocentric ecliptical z-coordinate of the other object.

Returns:

Tuple containing (lon, lat, rad):

  • lon (float): Geocentric ecliptical longitude (rad).

  • lat (float): Geocentric ecliptical latitude (rad).

  • rad (float): Geocentric distance (km).

Return type:

tuple (float,float,float)

Note

  • The distance units of the arguments must all be the same.

  • When the coordinates of the Earth are replaced by those of a different object, the coordinates of the second object are computed, as seen from the centre of the first object.

  • This function is useful when using the VSOP87C files.