jnkepler.nbodytransit package

Submodules

jnkepler.nbodytransit.nbodytransit module

class jnkepler.nbodytransit.nbodytransit.NbodyTransit(t_start, t_end, dt, tcobs, p_init, errorobs=None, print_info=True, nitr_kepler=3, transit_time_method='newton-raphson', nitr_transit=5)[source]

Bases: JaxTTV

main class for photodynamical analysis.

Note

Unlike in JaxTTV class, non-transiting objects are not yet supported.

get_flux(par_dict)[source]

compute nbody flux

Parameters:

par_dict (dict) – dict containing input parameters: - TTV parameters - srad: stellar radius (in units of solar radius) - radius_ratio: planet-to-star radius ratio (Norbit,) - u1, u2: quadratic limb-darkening coefficients

Returns:

  • transit light curve (len(times_lc),)

  • transit times (1D flattened array)

Return type:

tuple

get_flux_and_rv(par_dict, times_rv)[source]

compute nbody flux and RV

Parameters:
  • par_dict (dict) – dict containing input parameters: - TTV parameters - srad: stellar radius (in units of solar radius) - radius_ratio: planet-to-star radius ratio (Norbit,) - u1, u2: quadratic limb-darkening coefficients

  • times_rv – times at which RVs are evaluated

Returns:

  • transit light curve (len(times_lc),)

  • transit times (1D flattened array)

  • stellar RVs at times_rvs (m/s), positive when the star is moving away

Return type:

tuple

get_xvsky_tc(par_dict)[source]

compute sky-plane positions and velocities at transit centers

Parameters:

par_dict (dict) – dict containing TTV parameters

Returns:

  • transit centers (Ntransit)

  • astrocentric positions in the sky plane at transit centers (Ntransit, xy)

  • astrocentric velocities in the sky plane at transit centers (Ntransit, xy)

  • times

  • mass array (star+planets, solar unit)

Return type:

tuple

set_lcobs(times_lc, overlapping_transit=False, exposure_time=0.020416666666666666, supersample_factor=10, print_info=True)[source]

initialization

Parameters:
  • times_lc – times in the light curve

  • overlapping_transit – if True, the code accounts for simultaneous transits; overlap between the planets is not yet supported

  • exposure_time – exposure time (same unit as times_lc)

  • supersample_factor – flux is computed at intervals given by exposure_time / supersample_factor and then summed

  • print_info – if True, show the parameters

jnkepler.nbodytransit.nbodytransit.b_to_cosi(b, period, ecosw, esinw, rstar, mstar)[source]

convert b into cosi following Eq.7 of Winn (2010), arXiv:1001.2010

Parameters:
  • b – impact parameter (normalized to stellar radius)

  • period – orbital period

  • ecosw – eccentricity * cos(argument of periastron)

  • esinw – eccentricity * sin(argument of periastron)

  • rstar – stellar radius (solar unit)

  • mstar – stellar mass (solar unit)

Returns:

cosine of inclination

Return type:

float

jnkepler.nbodytransit.nbodytransit.q_to_u(q1, q2)[source]

convert q1, q2 into u1, u2

Parameters:
  • q1 – quadratic limb-darkening coefficients as parameterized in Kipping, D. M. 2013, MNRAS, 435, 2152

  • q2 – quadratic limb-darkening coefficients as parameterized in Kipping, D. M. 2013, MNRAS, 435, 2152

Returns:

quadratic limb-darkening coefficients u1, u2

Return type:

tuple

jnkepler.nbodytransit.transit module

routines to compute transit light curves

jnkepler.nbodytransit.transit.compute_nbody_flux(rstar, prad, u1, u2, tc, xsky_tc, vsky_tc, times, times_transit_idx, times_planet_idx)[source]

compute light curve given N-body model

Note

This function can handle simultaneous transits but is slightly slower than compute_nbody_flux_nooverlap. Overlap between the planets during a transit is not yet considered.

Parameters:
  • rstar – stellar radius (solar unit)

  • prad – planet-to-star radius ratios (Nplanet,)

  • u1 – quadratic limb-darkening coefficients

  • u2 – quadratic limb-darkening coefficients

  • tc – transit times (Ntransit,)

  • xsky_tc – astrocentric posistions in the sky plane at transit centers (Ntransit,)

  • xsky_tc – astrocentric velocities in the sky plane at transit centers (Ntransit,)

  • times – times at which fluxes are evaluated (Ntime,)

  • times_transit_idx – indices of nearest transit centers (Nplanet, Ntime)

  • times_planet_idx – indices of planets (Nplanet, Ntime)

Returns:

relative flux loss

Return type:

array

jnkepler.nbodytransit.transit.compute_nbody_flux_nooverlap(rstar, prad, u1, u2, tc, xsky_tc, vsky_tc, times, times_transit_idx, times_planet_idx)[source]

compute light curve given N-body model

Note

This function assumes that the data do not include simultaneous transits of two planets.

Parameters:
  • rstar – stellar radius (solar unit)

  • prad – planet-to-star radius ratios (Nplanet,)

  • u1 – quadratic limb-darkening coefficients

  • u2 – quadratic limb-darkening coefficients

  • tc – transit times (Ntransit,)

  • xsky_tc – astrocentric posistions in the sky plane at transit centers (Ntransit,)

  • xsky_tc – astrocentric velocities in the sky plane at transit centers (Ntransit,)

  • times – times at which fluxes are evaluated (Ntime,)

  • times_transit_idx – indices of nearest transit centers (Ntime,)

  • times_planet_idx – indices of planets (Ntime,)

Returns:

relative flux loss

Return type:

array

jnkepler.nbodytransit.transit.get_xvast_map(xcm, vcm, pidxarr)[source]

astrocentric positions and velocities at transit centers

Parameters:
  • xcm – center-of-mass positions (Nbody, xyz)

  • vcm – center-of-mass velocities (Nbody, xyz)

  • pidxarr – array of planet numbers starting from 1 (1D array)

Returns:

astrocentric positions and velocities at transit centers in the sky plane (Ntransit, xy)

Return type:

array

Module contents