New in lightkurve: inspecting pixel data using tpf.interact()

News article posted on by Michael Gully-Santiago

The new lightkurve Python package for Kepler and K2 data analysis, which we first announced in March, contains a new feature: interact().

The tool strives to solve a common stumbling block in Kepler data analysis: "I see a blip in my lightcurve. Is it real or instrumental?" interact() alleviates the guesswork by providing users with an easy-to-use Python notebook widget to interactively inspect the pixel data along a lightcurve.

A user can move a slider to rifle through cadences, while seeing the postage stamp images update in real time. A red vertical bar highlights the moment in the lightcurve. Mousing-over individual lightcurve points flashes up a hover-over tool tip with ancillary metadata about that particular cadence (e.g. quality flags). The tool offers many avenues for customization, including zooming, panning, and screen stretch.

Lightkurve tpf.interact() tool

The command interact() is a method of the KeplerTargetPixelFile class, meaning that you can simply load in a target pixel file and append .interact() to the file as follows:

from lightkurve import KeplerTargetPixelFile
tpf = KeplerTargetPixelFile.from_archive(target="Trappist-1")

You will need to upgrade your installation of lightkurve to the latest version (v1.0b5) for this to work. This can be done via the command line as follows:

$ pip install lightkurve --upgrade

We invite you to try out interact() today and let us know if you have any problems by opening a GitHub Issue.

A YouTube screencast and a tutorial in the documentation further illustrate the features of the tool.