Orbeez Functions
Function to generate .gif animations of exoplanetary systems.
- orbeez.gif_from_archive(system_name, directory, figsize=(8, 8), num_periods=1, gif_duration=10.0, color_list=None, num_frames=100, title=False, dpi=200, planet_r_scale=25)
Generates gif of exoplanet system with user entered name from NASA Exoplanet Archive.
Generates a .gif animation of the orbits of planets in a system architecture defined by data pulled from the Exoplanet Archive chosen by the user by passing the name of a host star.
- Parameters:
system_name (str) – Name of the exoplanet system as found in NASA exoplanet Archive.
directory (str) – Directory where you would like the gif to be saved.
figsize (tuple, optional) – Size of the .gif animation in units of inches. Formatted as (width, height). Default is (8,8).
num_periods (int, optional) – Number of periods of the outermost planet to animate. Default is 1.
gif_duration (float, optional) – Duration of the whole .gif animation in seconds. Default is 10 seconds.
color_list (list, optional) – List of matplotlib colors to loop through when plotting the planets. Default is None, which sets the planets to be black.
num_frames (int, optional) – Number of frames to use in the .gif animation. More frames will make the animation more smooth, but will slow down the creation process. Too many frames may cause the kernel to crash when making the .gif. Default is 100.
title (bool, optional) – Whether or not to include the name as a title above the animation. Default is False.
dpi (int, optional) – Dots per inch to use when saving the frames. If the kernel is crashing, try reducing the dpi. Default is 200.
planet_r_scale (float, optional) – Factor by which to scale up the planet radii. Default is 25.
- orbeez.make_orbit_gif(a_list, p_list, r_list, directory, name, e_list=None, w_list=None, figsize=(8, 8), num_periods=1, gif_duration=10.0, color_list=None, star_color='orange', num_frames=100, title=False, dpi=200, planet_r_scale=25)
Makes a .gif animation of the orbits of the input planetary system.
Generates a .gif animation of the orbits of planets in a system architecture defined by the user.
- Parameters:
a_list (array_like) – List of semimajor axis values for the planets in the system, in units of stellar radii.
p_list (array_like) – List of orbital period values for the planets in the system, in any consistent units.
r_list (array_like) – List of planetary radii values for the planets in the system, in units of stellar radii.
directory (str) – Path to the directory in which to save the resulting .gif animation.
name (str) – Name of the resulting .gif animation.
e_list (array_like, optional) – List of eccentricity values for the planets in the system. If None, default initializes the eccentricities of all planets to 0. Default is None.
w_list (array_like, optional) – List of arguments of periastron for the planets in the system, in units of radians. If None, default initializes the arguments of periastron of all planets to pi/2. Default is None.
figsize (tuple, optional) – Size of the .gif animation in units of inches. Formatted as (width, height). Default is (8,8).
num_periods (int, optional) – Number of periods of the outermost planet to animate. Default is 1.
gif_duration (float, optional) – Duration of the whole .gif animation in seconds. Default is 10 seconds.
color_list (array_like, optional) – List of matplotlib colors to loop through when plotting the planets. Default is None, which sets the planets to be black.
star_color (str, optional) – matplotlib color to use for the star. Default is orange.
num_frames (int, optional) – Number of frames to use in the .gif animation. More frames will make the animation more smooth, but will slow down the creation process. Too many frames may cause the kernel to crash when making the .gif. Default is 100.
title (bool, optional) – Whether or not to include the name as a title above the animation. Default is False.
dpi (int, optional) – Dots per inch to use when saving the frames. If the kernel is crashing, try reducing the dpi. Default is 200.
planet_r_scale (float, optional) – Factor by which to scale up the planet radii. Default is 25.