{"id":22215808,"url":"https://github.com/rodluger/trappist1","last_synced_at":"2025-07-27T13:32:33.277Z","repository":{"id":78888866,"uuid":"84491715","full_name":"rodluger/trappist1","owner":"rodluger","description":"TRAPPIST-1 photometry with K2","archived":false,"fork":false,"pushed_at":"2017-03-28T00:05:20.000Z","size":25543,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-22T04:33:05.703Z","etag":null,"topics":["everest","k2","planet","transit","trappist-1"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodluger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-03-09T21:47:58.000Z","updated_at":"2023-10-31T18:26:15.000Z","dependencies_parsed_at":"2023-03-13T20:12:17.943Z","dependency_job_id":null,"html_url":"https://github.com/rodluger/trappist1","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodluger%2Ftrappist1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodluger%2Ftrappist1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodluger%2Ftrappist1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodluger%2Ftrappist1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodluger","download_url":"https://codeload.github.com/rodluger/trappist1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227810293,"owners_count":17823176,"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":["everest","k2","planet","transit","trappist-1"],"created_at":"2024-12-02T21:43:05.459Z","updated_at":"2024-12-02T21:43:06.119Z","avatar_url":"https://github.com/rodluger.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width = \"300\" src=\"https://github.com/rodluger/trappist1/blob/master/data/everest_trappist.png\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://arxiv.org/abs/1703.04166\"\u003e\u003cimg src=\"https://img.shields.io/badge/arXiv-1703.04166-blue.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/rodluger/trappist1/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://doi.org/10.5281/zenodo.437876\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.437876.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Release Notes\n\u003cb\u003e[3/23/2017]:\u003c/b\u003e *We noticed that the pseudo-TPFs we used in the original version of the code reported timestamps in geocentric time, NOT BJD. This led to an offset of about 10 minutes, which affected some of our short cadence timing analyses. This issue has since been corrected, and all light curves and plots have been updated to reflect the correct BJD. The Zenodo link to the raw dataset has also been updated.*\n\n\u003cb\u003e[3/15/2017]:\u003c/b\u003e *Several bugs were recently fixed. Please pull again and upgrade your everest installation.*\u003cbr\u003e*Big thanks to Hans Martin Schwengeler.*\n\n## Introduction\nThe planet-hosting star [TRAPPIST-1](https://en.wikipedia.org/wiki/TRAPPIST-1) was recently [observed](https://archive.stsci.edu/k2/trappist1/) with the [*K2* spacecraft](https://keplerscience.arc.nasa.gov/). Recently, [seven transiting planets](http://www.nature.com/nature/journal/v542/n7642/full/nature21360.html) were found around this star, but the outermost of these, TRAPPIST-1 **h**, was only seen in transit once, so its period was not known. While the *K2* observations had the potential to find more transits of **h** (thereby constraining its orbit), there are two major issues difficulting this measurement. First, since TRAPPIST-1 is an [ultracool dwarf](https://en.wikipedia.org/wiki/Ultra-cool_dwarf), it is extremely dim in the band at which *K2* observes. Second, because of its inability to point precisly, *K2* introduces substantial [instrumental noise](https://keplerscience.arc.nasa.gov/k2-observing.html#campaigns) into its light curves, swamping out the small transit signals.\n\nIn a paper recently submitted to [Nature Astronomy](https://arxiv.org/abs/1703.04166), we use the [EVEREST](https://github.com/rodluger/everest) pipeline to de-trend the TRAPPIST-1 *K2* light curve and search for planet **h**. We report on the detection of four transits of planet **h**, constraining its period to be 18.764 days, in agreement with theoretical predictions based on [Laplace relations](https://en.wikipedia.org/wiki/Orbital_resonance#Laplace_resonance).\n\n## What's In Here\nThis repository contains the \u003cb\u003eEVEREST\u003c/b\u003e long cadence light curve ([FITS](output/nPLDTrappist.fits) | [PDF](output/nPLDTrappist.pdf)), segments of the short cadence light curve in the vicinity of each transit of planet \u003cb\u003eh\u003c/b\u003e ([FITS1](output/nPLDTrappisth1.sc.fits) | [PDF1](output/nPLDTrappisth1.sc.pdf) | [FITS2](output/nPLDTrappisth2.sc.fits) | [PDF2](output/nPLDTrappisth2.sc.pdf) | [FITS3](output/nPLDTrappisth3.sc.fits) | [PDF3](output/nPLDTrappisth3.sc.pdf) | [FITS4](output/nPLDTrappisth4.sc.fits) | [PDF4](output/nPLDTrappisth4.sc.pdf)), and all of the code necessary to reproduce and analyze these light curves and plot the figures in our [Nature Astronomy paper](#). If you're interested in using this code to reproduce our results or adapt it to your needs, read on!\n\n## Installation\nIn order to run the scripts and interact with the light curves in this repository, you will need to install the latest \u003cb\u003eEVEREST\u003c/b\u003e release (\u003e=2.0.8):\n\u003cpre\u003e\u003ccode\u003epip install everest-pipeline\u003c/code\u003e\u003c/pre\u003e\nIf you alread have \u003cb\u003eEVEREST\u003c/b\u003e installed, please upgrade it:\n\u003cpre\u003e\u003ccode\u003epip install everest-pipeline --upgrade\u003c/code\u003e\u003c/pre\u003e\nFor more information on installing and using \u003cb\u003eEVEREST\u003c/b\u003e, check out the [project github page](https://github.com/rodluger/everest).\nNext, you have a choice: you can either **(1)** use the pre-existing FITS files in the [output](output) folder to reproduce our figures, conduct planet searches, etc., or **(2)** you can generate them all from scratch.\n\n### 1. Use Existing FITS Files\nThis one is easy. If you simply run [trappist1.py](trappist1.py), it will automatically copy the FITS files over to the **EVEREST** directory for TRAPPIST-1 and run the scripts to generate all the figures. You can then peek at the code and tailor it to your needs. \n\n### 2. De-trend from Scratch\nThis one is a little more involved. First, you'll have to download the raw TPF data for TRAPPIST-1 and its neighbors from [this Zenodo link](https://doi.org/10.5281/zenodo.437876) and place them in the [data folder](data/). Next, comment out [these lines in trappist1.py](https://github.com/rodluger/trappist1/blob/166c9d880761fcba0fa7083dd6b31126bcc99020/trappist1.py#L452-L454) to force the code to generate new FITS files. As the TPFs are ingested into **EVEREST**, you will be asked to manually select apertures for each target. Do this by clicking and dragging along the pixels you want in the aperture. Please note that the targets move around a lot over the course of the campaign (slide the bar at the bottom to see the postage stamp at different points in time). You'll have to define an aperture that's large enough to contain virtually all of the flux from the target, but not *too* large as to compromise the background subtraction routine. For saturated stars, add a little padding at the top and bottom of saturated columns just in case.\n\n## The Code\nThe methods in [trappist1.py](trappist1.py) allow users to plot and interact with the \u003cb\u003eEVEREST\u003c/b\u003e light curve for TRAPPIST-1, as well as to reproduce several of the figures in the \u003ca href=\"#\"\u003epaper\u003c/a\u003e.\n\n### trappist1.PlotFolded()\nFolded long cadence plots for each of the seven planets transiting TRAPPIST-1:\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/folded.png\" width=\"50%\"/\u003e\n\u003c/p\u003e\n\n### trappist1.ShortCadence()\nThe long cadence data folded on the period of planet \u003cb\u003eh\u003c/b\u003e:\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/sc_folded.png\" width=\"80%\"/\u003e\n\u003c/p\u003e\nEach of the individual four transits of planet \u003cb\u003eh\u003c/b\u003e, with a simultaneous transit of \u003cb\u003eb\u003c/b\u003e and a near-simultaneous flare removed in the bottom panels:\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/sc_transits.png\" width=\"60%\"/\u003e\n\u003c/p\u003e\nA closer look at what's going on during the third transit:\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/transit_3.png\" width=\"50%\"/\u003e\n\u003c/p\u003e\nA closer look at what's going on during the fourth transit, with a flare fit based on [Davenport et al. (2014)](http://adsabs.harvard.edu/abs/2014ApJ...797..122D):\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/transit_4.png\" width=\"50%\"/\u003e\n\u003c/p\u003e\n\n### trappist1.DeltaChisq()\nThe delta-chi squared long cadence plot (top) and the delta-chi squared conditioned on the true depth of planet \u003cb\u003eh\u003c/b\u003e (bottom):\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/deltachisq.png\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n### trappist1.PowerSpectrum()\nThe delta-chi squared long cadence power spectrum, where the period of \u003cb\u003eh\u003c/b\u003e and its aliases are clearly visible:\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"output/powerspec.png\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n## Attribution\nIf you make use of the light curves, code, or images in this repository, please cite this repository and the following papers:\n\n1. [Luger et al. (2017)](https://arxiv.org/abs/1703.04166) - A Terrestrial-sized Planet at the Snow Line of TRAPPIST-1\n2. [Luger et al. (2017)](http://adsabs.harvard.edu/abs/2017arXiv170205488L) - An Update to the EVEREST Pipeline\n3. [Luger et al. (2016)](http://adsabs.harvard.edu/abs/2016AJ....152..100L) - EVEREST: Pixel Level Decorrelation of K2 Light Curves\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodluger%2Ftrappist1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodluger%2Ftrappist1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodluger%2Ftrappist1/lists"}