Skip to main content

CINEMAS 🎬

Constraining INclinations of Exoplanets and their MAsses by Stability

PyPI version Python 3.10+ License: MIT Ruff

CINEMAS

CINEMAS is a Bayesian framework for constraining the inclinations, and hence the true masses, of exoplanets in compact multi-planet systems detected with the radial velocity (RV) method.

The true mass $M$ of an exoplanet is not measured with the RV method, only the minimum mass $M_{\rm min}=M\sin i$, where $i$ is the (generally unknown) inclination angle. However, if $i$ were too low, this would mean the true masses of the planets ($M_j=M_{{\rm min}, j} / \sin i$) would be so big that the system would be dynamically unstable.

Assuming isotropy, the prior probability distribution on $i$ is $\pi(i)=\sin i$. The probability that a compact system with a given inclination (and hence given masses) is dynamically stable can be calculated quickly using the spock package. CINEMAS uses MCMC to calculate posterior distributions for the inclination, and thus the true masses of these exoplanets in inclined multi-planet systems. The result? Absolute cinema(s).

Installation

Install CINEMAS directly from PyPI:

pip install cinemas

Or, for development, clone the repository and install in editable mode:

git clone https://github.com/xbyrne/cinemas
cd cinemas
pip install -e ".[dev]"

(Note that there is sometimes a bug in SPOCK where its pre-integration step only does one step. You may need to install SPOCK from my fork, or look at this pull request. Sorry I can't ship this updated version of SPOCK directly with the pip package; PyPI doesn't like dependencies from git repos)

Quickstart

Loading observational data

Observational data is loaded from the NASA Exoplanet Archive, using their TAP service. It is then loaded into a SystemObservations object, which includes all the observational data needed for a prior on the configuration parameters.

import cinemas

# Load observational constraints for a system
catalogue = cinemas.download_multiplanet_systems()
system_obs = cinemas.load_system_observations(
    star_name="Barnard's star",
    exoplanet_catalogue=catalogue
)

Running MCMC sampling

import cinemas

# Run MCMC to constrain the inclination and true masses
samples, tau, acceptance_fraction = cinemas.run_mcmc_sampling(
    system_obs,
    nsteps=5000,
    nwalkers=None  # By default, 2*number of params
)

print(f"Autocorrelation time: {tau}")
print(f"Acceptance fraction: {acceptance_fraction}")

References

Metadata

Release files for cinemas 1.0.0

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

Source distribution (sdist)

Source distribution for cinemas 1.0.0
File Size Uploaded Provenance Actions
cinemas-1.0.0.tar.gz 23.5 kB Without provenance Details for cinemas-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cinemas 1.0.0
File Interpreter ABI Platform Actions
cinemas-1.0.0-py3-none-any.whl Python 3 none any Details for cinemas-1.0.0-py3-none-any.whl

Total release size: 39.3 kB

Release files / cinemas-1.0.0.tar.gz

Download URL cinemas-1.0.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ac2bd703eee6ce9093ea43534433f3c4bd345f17fdbb225e1b6646de6da675a5
BLAKE2b-256 checksum
How to use checksums
b96b41a6e221b76cfd2cdf1316dc4ab1ed3c7eee1a57443be1ad26f5b2a9eaea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / cinemas-1.0.0-py3-none-any.whl

Download URL cinemas-1.0.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29f2a317404b46dd0df4e888a8779f1d32d22fbaea9dc96e336a0021e3504b48
BLAKE2b-256 checksum
How to use checksums
8f3df618bf3488e18500bb85645457a8ecaed51f5cd500dca25389de1b1b6951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Security for cinemas 1.0.0

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