sherlockpipe.system_stability.megno.MegnoStabilityCalculator

class sherlockpipe.system_stability.megno.MegnoStabilityCalculator(years, dt, repetitions)

Bases: StabilityCalculator

Runs the stability computations by calculating the MEGNO score.

__init__(years, dt, repetitions)

Methods

__init__(years, dt, repetitions)

init_rebound_simulation(simulation_input)

Initializes the simulation for rebound-based algorithms

log_and_run_simulation(simulation_input)

Logs the simulation input and launches the simulation for the given input.

mass_from_radius(radius)

Computation of mass-radius relationship from Bashi D., Helled R., Zucker S., Mordasini C., 2017, A&A, 604, A83.

plot_simulation(simulation_input_df, ...[, ...])

prepare_planet_params(planet_params)

Fills the planet masses if missing

prepare_star_masses(star_mass_low, ...)

Creates a star masses grid

run(results_dir, star_mass_low, ...[, cpus, ...])

Creates possible scenarios of stellar masses, planet masses and planet eccentricities.

run_simulation(simulation_input)

Runs one simulation scenario using the megno module of rebound.

store_simulation_results(simulation_results, ...)

Stores the megno results in the given directory

init_rebound_simulation(simulation_input)

Initializes the simulation for rebound-based algorithms

Parameters:

simulation_input – the input data for the simulation scenario

Returns:

the rebound initialized simulation scenario

log_and_run_simulation(simulation_input: SimulationInput) dict

Logs the simulation input and launches the simulation for the given input.

Parameters:

simulation_input (SimulationInput)

Return dict:

the resulting dictionary from the simulation

static mass_from_radius(radius)

Computation of mass-radius relationship from Bashi D., Helled R., Zucker S., Mordasini C., 2017, A&A, 604, A83. doi:10.1051/0004-6361/201629922

Parameters:

radius – the radius value in earth radius

Returns:

the mass in earth masses

static prepare_planet_params(planet_params: List[PlanetInput])

Fills the planet masses if missing

Parameters:

planet_params – the planet inputs

Returns:

the planet inputs with the filled masses

static prepare_star_masses(star_mass_low, star_mass_up, star_mass_bins)

Creates a star masses grid

Parameters:
  • star_mass_low – the lowest star mass value

  • star_mass_up – the highest star mass value

  • star_mass_bins – the number of star masses to sample. It will be ignored if star_mass_low == star_mass_up.

Returns:

the star masses grid

run(results_dir, star_mass_low, star_mass_up, star_mass_bins, planet_params: List[PlanetInput], cpus=1, free_params=None)

Creates possible scenarios of stellar masses, planet masses and planet eccentricities. Afterwards a stability analysis is run for each of the scenarios and the results are stored in a file.

Parameters:
  • results_dir – the directory where the results will be written into

  • star_mass_low – the lowest star mass

  • star_mass_up – the highest star mass

  • star_mass_bins – the number of star masses to sample

  • planet_params (List[PlanetInput]) – the planet inputs containing the planets parameters

  • cpus – the number of cpus to be used

  • free_params – the parameters to be sampled entirely

run_simulation(simulation_input: SimulationInput) dict

Runs one simulation scenario using the megno module of rebound.

Parameters:

simulation_input (SimulationInput) – the scenario parameters

Return dict:

the results of the simulation with the rebound-specific megno metric.

store_simulation_results(simulation_results: List[Dict], results_dir: str)

Stores the megno results in the given directory

Parameters:
  • simulation_results (List[Dict]) – the list of results dictionaries

  • results_dir (str) – directory to store the file