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