Welcome to solarsysdaily’s documentation!
Utils Functions
Function to perform utils.
- utils.coscalc(planetinfo)
Cosine Angle Calculation
Calculate the angle between earth-planet line and sun-planet line using cosine rules.
- Parameters
-planetinfo – Dictionary. The dictionary of ephemeris information from gen_ephem_today
- Returns
Listed of values of angle theta in radian
- Return type:
list
- utils.gen_ephem_today(date)
Ephemeris generator for given date
Generates the equatorial coordinates and distance to a planet as observed from Earth, and its distance to the Sun.
- Parameters
date (string) – Date to view the Solar System in YYYY-MM-DD format
- Returns
parseData(files)
- Return Type:
list
- utils.parsedata(filelist, date)
Parse Data
Read and parse the relevant data from the Horizons@JPL (https://ssd.jpl.nasa.gov/horizons/app.html#/) curl command
- Parameters
filelist (array of strings) – an array where each element is the name of the file pulled from Horizons for the ith planet
- Returns
allplanets– A list of dictionaries with each planet’s relevant information [RA, DEC, HELRANGE (Sun-Planet distance), EARTHRANGE (Earth-Planet distance)],and each dictionary is stored in this list.
- Return Type:
list
Plotting Functions
Function to perform plotting.
- plotting.plotAll(allplanets, thetas, truedist=True)
The main plotting function. Formatted the same each time, this displays the relative positions of all the planets at the user inputted timestamp.
- Inputs:
- allplanets (list of dictionaries) - Each planet gets a dictionary with its relevant information (JD, RA, DEC, RANGE),
and each dictionary is stored in this list.
thetas (list of floats) - Each planet’s updated RA angle
- truedist (boolean) - True if you want to see the true relative distances to the planets on the planet.
False if you want an evenly spaced system,
- Outupts:
None
- plotting.plotinner(allplanets, thetas)
- Parameters
-allplanets – List of dictionaries. Each planet gets a dictionary with its relevant information (JD, RA, DEC, RANGE), and each dictionary is stored in this list.
-thetas – List of angles generated using utils.coscalc
- Returns
None
- Return Type:
NoneType
- plotting.plotouter(allplanets, thetas)
Only plot the outer 5 planets
- Parameters
-allplanets – List of dictionaries. Each planet gets a dictionary with its relevant information (JD, RA, DEC, RANGE), and each dictionary is stored in this list.
-thetas – List of angles generated using utils.coscalc
- Returns
None
- Return Type:
NoneType