{"id":15735667,"url":"https://github.com/simonrw/ttvfast-python","last_synced_at":"2025-03-13T07:31:58.606Z","repository":{"id":27694664,"uuid":"31181321","full_name":"simonrw/ttvfast-python","owner":"simonrw","description":"Python interface to the TTVFast library","archived":false,"fork":false,"pushed_at":"2020-06-11T08:15:47.000Z","size":236,"stargazers_count":14,"open_issues_count":5,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-22T04:32:05.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonrw.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-22T21:24:56.000Z","updated_at":"2024-05-08T07:19:48.000Z","dependencies_parsed_at":"2022-08-07T13:00:59.249Z","dependency_job_id":null,"html_url":"https://github.com/simonrw/ttvfast-python","commit_stats":null,"previous_names":["mindriot101/ttvfast-python"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fttvfast-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fttvfast-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fttvfast-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fttvfast-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonrw","download_url":"https://codeload.github.com/simonrw/ttvfast-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221347628,"owners_count":16802238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T01:14:39.984Z","updated_at":"2024-10-24T20:41:40.047Z","avatar_url":"https://github.com/simonrw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=======\nTTVFast\n=======\n:Author: Simon Walker \u003cs.r.walker101@googlemail.com\u003e\n\n.. image:: https://img.shields.io/pypi/v/ttvfast.svg?maxAge=2592000\n    :target: https://pypi.python.org/pypi/ttvfast\n.. image:: https://travis-ci.org/mindriot101/ttvfast-python.svg?branch=master\n    :target: https://travis-ci.org/mindriot101/ttvfast-python\n\nA Python wrapper around Katherine Deck's TTVFast C program (https://github.com/kdeck/TTVFast)\n\nFor the latest changes, see `the CHANGELOG \u003chttps://github.com/mindriot101/ttvfast-python/blob/master/CHANGELOG.rst\u003e`_.\n\n\nInstallation\n============\n\nFor contributing to the package, see the `Development instructions`_.\n\nInstall from pypi:\n\n    ``pip install ttvfast``\n\nFor the latest development version, install with pip:\n\n    ``pip install git+https://github.com/mindriot101/ttvfast.git``\n\nDevelopment instructions\n------------------------\n\nTo contribute to ``ttvfast``, clone the repository and fetch the submodule::\n\n    git clone https://github.com/mindriot101/ttvfast-python.git\n    cd ttvfast-python\n    git submodule init\n    git submodule update # grabs code from TTVFast\n\ninstall the package, in \"development mode\" into the current python environment::\n\n    pip install -e .\n\nThis way any python code changes made to the current directory will be reflected in the package. Note: any changes to the C code require recompilation by reinstalling the package with ``pip install -e .`` (see the `editable install documentation \u003chttps://pip.pypa.io/en/stable/reference/pip_install/#editable-installs\u003e`_ documentation for more information).\n\nOnce the package is installed, test that everything built properly using::\n\n    $ py.test \n    ============================== test session starts ===============================\n    testing/test_lweiss.py .\n    testing/test_models.py ...\n    testing/test_python_api.py ...\n    testing/test_ttvfast.py ...\n\n\nUsage\n=====\n\nTo compute the TTV properties for one or more planets: \n\n- build a ``ttvfast.models.Planet`` instance (see the class documentation for required parameters)\n- pass a list of the planets in the system to ``ttvfast.ttvfast`` along with:\n\n  - the stellar mass in units of solar mass,\n  - the start point of the integration in days,\n  - the time step for the integration in days,\n  - and the end point for integration in days.\n\nThe function ``ttvfast.ttvfast`` returns a dictionary containing ``positions`` and ``rv``. The ``positions`` entry is a tuple of:\n\n1. a list of integer indices for which values correspond to which planet,\n2. a list of integers defining the epoch,\n3. a list of times,\n4. a list of rsky values, and\n5. a list of vsky values.\n\nThe optional ``rv_times`` parameter takes a list of RV times on which the RV is to be calculated. If so the ``rv`` entry in the output \ndictionary is populated with a list of RV values, and otherwise ``None``.\n\nFor example:\n\n.. code-block:: python\n\n    from ttvfast import models\n\n\n    gravity = 0.000295994511                        # AU^3/day^2/M_sun\n    stellar_mass = 0.95573417954                    # M_sun\n\n\n    planet1 = models.Planet(\n        mass=0.00002878248,                         # M_sun\n        period=1.0917340278625494e+01,              # days\n        eccentricity=5.6159310042858110e-02,\n        inclination=9.0921164935951211e+01,         # degrees\n        longnode=-1.1729336712101943e-18,           # degrees\n        argument=1.8094838714599581e+02,            # degrees\n        mean_anomaly=-8.7093652691581923e+01,       # degrees\n    )\n\n    planet2 = models.Planet(\n        mass=0.00061895914,\n        period=2.2266898036209028e+01,\n        eccentricity=5.6691301931178648e-02,\n        inclination=8.7598285693573246e+01,\n        longnode=4.6220554014026838e-01,\n        argument=1.6437004273382669e+00,\n        mean_anomaly=-1.9584857031843157e+01,\n    )\n\n    planets = [planet1, planet2]\n    Time = -1045                                    # days\n    dt = 0.54                                       # days\n    Total = 1700                                    # days\n\n    results = ttvfast.ttvfast(planets, stellar_mass, Time, dt, Total)\n\n\nFor more details, see the original C module's documentation: https://github.com/kdeck/TTVFast/blob/master/c_version/README\n\nCitations\n=========\n\nIf you use this code, please cite Deck, Agol, Holman, \u0026 Nesvorny (2014),\nApJ, 787, 132, arXiv:1403.1895.\n\n-Katherine Deck, Eric Agol, Matt Holman, \u0026 David Nesvorny\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrw%2Fttvfast-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonrw%2Fttvfast-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrw%2Fttvfast-python/lists"}