Skip to main content

NATSUME

Near-resonant Analytic TTV Solver for Unknown Mass Estimates (NATSUME) for Python 3.

A python 3 module which aims to quickly estimate non-transiting exoplanet masses in possible near Mean Motion Resonance (MMR) scenarios from approximately sinusoidal Transit Timing Variation (TTV) signals.

TTV mass inversions are transcribed from Lithwick's model for 1st order near MMR (https://doi.org/10.1088/0004-637X/761/2/122) and Deck-Agol's model for higher order near MMRs (https://doi.org/10.3847/0004-637X/821/2/96).

Installation

Install from pypi:

pip install natsume-ttv

Usage Overview

natsume is to be used with the following steps:

  1. Define the orbital elements (orbital periods, eccentricities, longitudes of periastron), TTV signal parameters (amplitudes, superperiods), and MMR scenario (e.g. '2:1', '5:3') of the planet pair. All units are in days or degrees.
  2. Encode complex eccentricity and sinusoidal TTV information into the natsume.classes.ComplexEccentricities and natsume.classes.TTVSineCurve objects using natsume.get_ComplexEccentricities and natsume.get_TTVSineCurve functions.
  3. Estimate inner or outer exoplanet masses using natsume.EstimateInnerMass or natsume.EstimateOuterMass functions.

TTV amplitude and superperiod characterization is left to the user, as multiple valid approaches exist.

Usage Example

To illustrate the steps above, suppose the following planetary parameters for a pair in the Kepler-32 system

# Planetary parameters for Kepler-32b/c
Pb = 5.901    # Inner period (days; Lithwick+12, Table 1)
Pc = 8.752    # Outer period (days; Lithwick+12, Table 1)
Vb = 0.0062   # Inner TTV Amplitude (days; Lithwick+12, Table 1)
Vc = 0.0077	  # Outer TTV Amplitude (days; Lithwick+12, Table 1)
Pttvb = 267.1 # TTV "superperiod" for planet b (days; Holczer+16, Table 5)
Pttvc = Pttvb # TTV "superperiod" for planet c (Assume identical superperiod
              # as inner TTV as Holczer+16 did not report the period)             
mmr = '3:2'   # MMR Scenario

# Eccentricity and arguments of periastron (deg)
# Calculated from Fabrycky+12, Table 6 eccentricity vectors
eb = 0.003822
ec = 0.002384
wb = -166.56
wc = +43.98

Mstar = 0.49  # Host star mass (solar masses; Fabrycky+12, Table 6)

We then encode system complex eccentricity and sinusoidal TTV informations into the ComplexEccentricities object with natsume.get_ComplexEccentricities and TTVSineCurve object with natsume.get_TTVSineCurve

import natsume

# Build sinusoidal TTV object for inner TTV
TTVb = natsume.get_TTVSineCurve(amplitude=Vb, superperiod=Pttvb)
TTVc = natsume.get_TTVSineCurve(amplitude=Vc, superperiod=Pttvc)

# Build complex eccentricity object for Kepler-32b/c pair
z = natsume.get_ComplexEccentricities(e1=eb, w1=wb, e2=ec, w2=wc)

Finally, we calculate exoplanet masses using analytic sinusoidal TTV models

# Estimate outer planet mass relative to the host star
mu_c = natsume.EstimateOuterMass(
	innerTTV=TTVb,
	inner_period=Pb,
	mmr=mmr,
	eccentricity=z,
	outer_period='none'
)
# Estimate inner planet mass relative to the host star
mu_b = natsume.EstimateInnerMass(
	outerTTV=TTVc,
	outer_period=Pc,
	mmr=mmr,
	eccentricity=z,
	inner_period='none'
)

However, through above code, mu_c and mu_b will be numpy arrays containing two possible mass solutions. This is because the perturbing planet's period can be unknown if it is non-transiting, and two periods are possible given the definition of the TTV superperiod (see Lithwick's eqn. 5). If the perturbing planets' orbital periods are already known, we can skip the calculation of perturbing planet's orbital period entirely, and replace the 'none' arguments with appropriate values

# Estimate outer planet mass relative to the host star
mu_c = natsume.EstimateOuterMass(
	innerTTV=TTVb,
	inner_period=Pb,
	mmr=mmr,
	eccentricity=z,
	outer_period=Pc
)
# Estimate inner planet mass relative to the host star
mu_b = natsume.EstimateInnerMass(
	outerTTV=TTVc,
	outer_period=Pc,
	mmr=mmr,
	eccentricity=z,
	inner_period=Pb
)

To which mu_c and mu_b will be floats

Addendum

Conversion from mu_c and mu_b which are relative to host stellar masses to m_c and m_bin Earth masses can also be done with astropy.units

# Convert planet masses relative to host star to Earth masses
from astropy import units as u
m_b = (mu_b * Mstar*u.M_sun).to(u.M_earth).value
m_c = (mu_c * Mstar*u.M_sun).to(u.M_earth).value

Nominal mass calculations, where orbits are assumed with zero eccentricity, can be done by using the following variable z0 in the eccentricity arguments of mass calculation functions

# Build complex eccentricity object for zero eccentricity
z0 = natsume.get_ComplexEccentricities()

to which nominal mass calculations are only possible in near first-order resonance scenarios.

Metadata

Release files for natsume-ttv 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for natsume-ttv 0.1.7
File Size Uploaded Provenance Actions
natsume_ttv-0.1.7.tar.gz 12.9 kB Without provenance Details for natsume_ttv-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for natsume-ttv 0.1.7
File Interpreter ABI Platform Actions
natsume_ttv-0.1.7-py3-none-any.whl Python 3 none any Details for natsume_ttv-0.1.7-py3-none-any.whl

Total release size: 26.5 kB

Release files / natsume_ttv-0.1.7.tar.gz

Download URL natsume_ttv-0.1.7.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d6896e860f7c345bc58f3898c68bfe5e6fe284fe4b8fae8e9518977063ad8506
BLAKE2b-256 checksum
How to use checksums
93438a1b6d92dca90e446b522c4e5a20546fe58da6ad0279cf147c5fbe55531b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Release files / natsume_ttv-0.1.7-py3-none-any.whl

Download URL natsume_ttv-0.1.7-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eec06a2f140ac55236feb8f5feb88440548bdd6341904875711d03362cf2d7c1
BLAKE2b-256 checksum
How to use checksums
27d61c18a6ef7a758304d4ecddcb005334a288cf2820720080ed695926ae804a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Security for natsume-ttv 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page