Reparameterizations#

An experimental module for reparameterizations of orbital elements.

jorbit.utils.reparameterizations.orbital_elements_to_unit_cube(orb, a_low, a_high, uniform_inc)[source]#

The inverse mapping of unit_cube_to_orbital_elements.

Again, just one potential mapping from orbital elements to the unit cube.

Parameters:
  • orb (Array) – Orbital elements in a, e, i, Omega, omega, f order.

  • a_low (float) – Lower bound on the semi-major axis.

  • a_high (float) – Upper bound on the semi-major axis.

  • uniform_inc (bool) – Whether to use uniform inclination. If not, uses uniform in cos(i)

Returns:

Six points in the unit cube.

Return type:

Array

jorbit.utils.reparameterizations.square_to_unit_disk(a, b)[source]#

Map two points in the unit square to the unit disk.

Implements the algorithm from Shirley & Chiu 1997.

Parameters:
  • a (float) – x-coordinate in the unit square.

  • b (float) – y-coordinate in the unit square.

Returns:

(r, phi) in the unit disk.

Return type:

tuple[float, float]

jorbit.utils.reparameterizations.unit_cube_to_orbital_elements(u, a_low, a_high, uniform_inc)[source]#

Map six points in the unit cube to orbital elements.

One potential mapping from the unit cube to orbital elements. This particular one samples in sqrt(e)*cos(omega), sqrt(e)*sin(omega), sin(i/2)sin(Omega), sin(i/2)cos(Omega), log(a), and mean longitude. The goal was to a) avoid periodic parameters for mcmc and b) keep everything in the unit cube for nested sampling.

Parameters:
  • u (Array) – Six points in the unit cube.

  • a_low (float) – Lower bound on the semi-major axis.

  • a_high (float) – Upper bound on the semi-major axis.

  • uniform_inc (bool) – Whether to use uniform inclination. If not, uses uniform in cos(i)

Returns:

Orbital elements.

Return type:

Array

jorbit.utils.reparameterizations.unit_disk_to_square(r, phi)[source]#

Map two points in the unit disk to the unit square.

Implements the algorithm from Shirley & Chiu 1997.

Parameters:
  • r (float) – Radius in the unit disk.

  • phi (float) – Angle in the unit disk.

Returns:

(x, y) in the unit square.

Return type:

tuple[float, float]