celestial.SolarSys - EranOfek/AstroPack GitHub Wiki

Description

The celestial.SolarSys package includes functions to generate Solar System ephemeris. Additional functions are available in the celetial.INPOP class and the celestial.OrbitalEl class, and in the celestial.Kepler package, and the celestial.conjunctions pacakge.

Function list

  • celestial.SolarSys.allFunList - Functions and Classes list for the celestial.SolarSys package
  • celestial.SolarSys.aberrationSolarSystem -
  • celestial.SolarSys.antiSunDirection -
  • celestial.SolarSys.asteroid_magnitude - Calculate the magnitude of minor planets in the HG system
  • celestial.SolarSys.asteroid_radius - Calculate asteroid radius from magnitudes
  • celestial.SolarSys.calc_all_planets_lun_occ - Lunar occultations of planets
  • celestial.SolarSys.calc_vsop87 - Planetary coordinates based on the VSOP87 theory
  • celestial.SolarSys.earthShadowCoo - Calculate the J2000.0 equatorial coordinates of the Earth shadow at a given height
  • celestial.SolarSys.earth_vel_ron_vondrak - Earth barycentric velocity
  • celestial.SolarSys.ec_longlat2cart - Convert Heliocentric ecliptic long/lat/rad referred to mean equinox of date to cartesian coordinates.
  • celestial.SolarSys.elongationZeroAngularSpeed - Estimate the elongation (ang. dist. from Sun on ecliptic) of zero ang. speed points.
  • celestial.SolarSys.equinox_solstice - Approximate time of Equinox and Solstice
  • celestial.SolarSys.get_horizons - Get an ephemerides for a solar system body from JPL horizons
  • celestial.SolarSys.get_moon - Get Moon position (low accuracy)
  • celestial.SolarSys.get_orbit_files - Get asteroids/comets orbital elements from JPL, save locally and read.
  • celestial.SolarSys.get_sun - Get Sun position (low accuracy)
  • celestial.SolarSys.jpl_horizons - Get JPL horizons ephemeris for a solar system body.
  • celestial.SolarSys.jup_meridian - Low accuracy formula for Jupiter central meridian
  • celestial.SolarSys.jup_satcurve - Plot monthly curves of the position of the Galilean satellites
  • celestial.SolarSys.jupiter_map - Plot Jupiter image as observed from Earth at a given time
  • celestial.SolarSys.kuiper_check - Parallax due to Earth and object motion of a solar system object
  • celestial.SolarSys.moon_elp82 - ELP2000-82 ecliptic coordinates of the Moon
  • celestial.SolarSys.moon_ephem - ELP2000-82 Moon ephemeris
  • celestial.SolarSys.moon_illum - Low accuracy Moon illuminated fraction
  • celestial.SolarSys.moon_librations - Moon's librations
  • celestial.SolarSys.moon_phases - Return a list of moon phases in range of dates
  • celestial.SolarSys.moon_sky_brightness - Krisciunas & Schaefer (1991) sky brightness model due to the Moon
  • celestial.SolarSys.mooncool - Low-accuracy topocentric equatorial coordinates of the Moon
  • celestial.SolarSys.moonecool - Low-accuracy geocentric ecliptical coordinate of the Moon
  • celestial.SolarSys.moonlight - Calculate the Moon illumination in Lux on horizontal surface
  • celestial.SolarSys.orbelem2ephem - SHORT DESCRIPTION HERE
  • celestial.SolarSys.orbitIntegration - Calculate the position and velocity evolution for a list of asteroids
  • celestial.SolarSys.pl_rotation - Calculate planetary rotation parameters
  • celestial.SolarSys.planar_sundial - Calculate and plot a planar sundial
  • celestial.SolarSys.planet_lowephem - Low-accuracy ephemeris of the planets (~1 arcmin)
  • celestial.SolarSys.planet_radius - Planet radius and flattening factor and angular diameter.
  • celestial.SolarSys.planets_lunar_occultations - Search and calculates for lunar occultations of the planets
  • celestial.SolarSys.planets_magnitude - Calculate the planet's apparent magnitude
  • celestial.SolarSys.planets_rotation - Planet north pole, rotation rate and the primary meridian
  • celestial.SolarSys.ple_earth - Low-accuracy planetary ephemeris for Earth
  • celestial.SolarSys.ple_force - Calculate the net Sun+planets force on a solar system body.
  • celestial.SolarSys.ple_jupiter - Low accuracy planetary ephemeris for Jupiter.
  • celestial.SolarSys.ple_mars - Low-accuracy planetary ephemeris for Mars
  • celestial.SolarSys.ple_mercury - Low accuracy ephemerides for Mercury
  • celestial.SolarSys.ple_neptune - Low accuracy planetary ephemeris for Neptune
  • celestial.SolarSys.ple_planet - Low accuracy ephemeris for the main planets
  • celestial.SolarSys.ple_saturn - Low accuracy planetary ephemeris for Saturn
  • celestial.SolarSys.ple_uranus - Low accuracy ephemeris for Uranus
  • celestial.SolarSys.ple_venus - Low accuracy ephemeris for Venus
  • celestial.SolarSys.ple_xyzAll - Get approximate cartesian coordinates of major planets in a matrix.
  • celestial.SolarSys.read_mpc_packed_epoch - Convert the MPC packed date format to JD
  • celestial.SolarSys.rise_set - Calculate rise/set times
  • celestial.SolarSys.saturn_rings - Calculate the orientation angles for Saturn's rings
  • celestial.SolarSys.skylight - Calculate the total sky illumination in Lux on a horizontal surface
  • celestial.SolarSys.solarlong2jd - Time in which the Sun is in a given solar longitude
  • celestial.SolarSys.sunAzAlt - Returm/print Sun local Az/Alt data
  • celestial.SolarSys.sun_ephem - Sun ephemeris
  • celestial.SolarSys.sun_rise_set - Calculate Sun rise/set
  • celestial.SolarSys.suncoo - Low-accuracy position of the Sun (0.01 deg in long).
  • celestial.SolarSys.suncoo1 - Low-accuracy coordinates of the Sun (1950-2050 range)
  • celestial.SolarSys.sunlight - Calculate the Sun illumination in Lux on horizontal surface
  • celestial.SolarSys.surfaceAreaFromMag - Given its magnitude, calculate the surface area of a simple solar system reflector
  • celestial.SolarSys.unitTest - Package Unit-Test

Examples

Get ephemeris from JPL horizons

To get ephemeris from the JPL horizons system use the celestial.SolarSys.jpl_horizons function.

Example for generating Geocentric ephemeris:

% Generate ephemeris for asteroid Kulkarni 9804 from 14-6-2018 to 20-6-2018
[Cat]=celestial.SolarSys.jpl_horizons('ObjectInd','9804;','StartJD',[14 6 2018],'StopJD',  [20 6 2018]);
% Note that the ";" after the asteroid number is used to distinguish between asteroid numbers to planets codes.

% Generate ephemeris for Neptune
[Cat]=celestial.SolarSys.jpl_horizons('ObjectInd','899','StartJD',[14 6 2018],'StopJD',  [20 6 2018]);

% The same but with step size of 2h:
[Cat]=celestial.SolarSys.jpl_horizons('ObjectInd','899','StartJD',[14 6 2018],'StopJD',  [20 6 2018], 'StepSizeUnits','h','StepSize',2);

and for Topocentric ephemeris (i.e., long=35 deg, lat=30 deg, height=0.415 km):

[Cat]=celestial.SolarSys.jpl_horizons('ObjectInd','899','StartJD',[14 6 2018],'StopJD',  [20 6 2018],'GeodCoo',[35 30 0.415]);

Moon

To generate low accuracy coordinates of the Moon for a list of JD and Topocentric observer at log=1 rad, lat=1 rad. Notes that several accuracy options are available (see help for options):

[RA,Dec,HP]=celestial.SolarSys.mooncool(2451545+(0:1:10)',[1 1]);
% ALl outputs and inputs in radians.
% HP is the Moon horizontal parallax.

% Another option is to use:
S=celestial.SolarSys.get_moon(2451545, [1 1])
% the return a summary of moon position, Az, ALt, illumination, and phase

To get a list of Moon phases (e.g., full moon) between two dates:

MP=celestial.SolarSys.moon_phases([1 1 2015],[1 1 2016]);
% Output is a two colum vector of [PhaseCode, JD]

Although some high-accuracy codes are available in this package, we recommend using the celestial.INPOP class for high accuracy calculations, or the celestial.SolarSys.jpl_horizons function.

Note that many more functions are available, including for calculating the Moon's illumination on the Earth.

Sun

A few examples to how to use some of the Sun ephemeris related functions:

% Sun low accuracy J2000 coordinates for a list of dates:
[RA,Dec,R,SL,EquationTime]=celestial.SolarSys.suncoo(2451545+[0:1:10]','j');

% Summary of Sun coordinates now (see help):
celestial.SolarSys.get_sun

% Write to fil a Sun Az/Alt as a function of time
celestial.SolarSys.sunAzAlt([1 3 2022],'FileName','NeoSmadarSunAlt.txt');

% List of Sun rise/set times:
[Time,Ang]=celestial.SolarSys.sun_rise_set(2451545+(0:5:365)',[35 32 0].*pi./180,0,0)

For high-accuracy coordinates of the Sun, it is recommended to use the celestial.INPOP class.

Planets ephemeris

Low accuracy

For low-accuracy coordinates of the planets (based on truncated VSOP87 series), see functions that start with: celestial.SolarSys.ple_. By default, these functions return the heliocentric longitude latitude and radius vector referred to mean ecliptic and equinox of date.

[L,B,R]=celestial.SolarSys.ple_mars(2451545+(0:1:10)');

High accuracy

For high-accuracy coordinates of the planets, there are three options:

  1. The celestial.SolarSys.jpl_horizons function.
  2. The celestial.SolarSys.calc_vsop87 function.
  3. The celestial.INPOP class.

Options 1 and 3 are most recommended, and option 2 is kept for backward compatibility.

Jupiter satellites

To plot the Jovian satellite monthly curves (i.e., position in respect to Jupiter):

% For January 2024
celestial.SolarSys.jup_satcurve(1,2024)

Jupiter satellites montly curves

⚠️ **GitHub.com Fallback** ⚠️