question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make TargetPixelFile.interact() more reponsive

See original GitHub issue

Problem description

As stated in the doc, TargetPixelFile.interact() could be quite slow / sluggish.

One possibility to make it effectively faster / more responsive is to let user specify a time / cadence range to plot, rather than plotting for the entire file.

Proposal 1: Add an optional cadence_mask argument to interact(), e.g.,

  # handle only 5 days of plot, rather than the entire 20+ days of data
  tpf.interact(cadence_mask=(tpf.time >= 2010) & (tpf.time < 2015))

Proposal 2 Provide a general filter on TargetPixelFile, e.g. add a select(cadence_mask) method to TargetPixelFile

   # a new TPF object with only 5 days of data
   tpf_subset = tpf.select((tpf.time >= 2010) & (tpf.time < 2015))
   tpf_subset.interact()

Environment

  • lightkurve version: v1.11

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
barentsencommented, Aug 26, 2020

I believe we already support this using the following syntax:

tpf[(tpf.time.value >= 2010) & (tpf.time.value < 2015)].interact()

This also works for a LightCurve object, e.g. you can do lc[lc.time.value > 2000].plot().

However the docstring of interact() could certainly be improved by advertising this syntax as a way to speed up the tool!

0reactions
barentsencommented, Aug 27, 2020

Yep. We’ll want to do this using a combination of having more tutorials and having more “Examples” sections in docstrings.

I will go ahead and close this issue, but any and all new issues or PRs related to improving these matters are very welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Target Pixel Files - TESS Science Support Center - HEASARC
In this tutorial we will learn the following, - What a TESS Target Pixel File (TPF) is. - How to obtain a TPF...
Read more >
Using Target Pixel Files with Lightkurve
Be able to download and plot target pixel files from the data archive using Lightkurve. Be able to access target pixel file metadata....
Read more >
Lightkurve/01-target-pixel-files.ipynb at master - GitHub
Target Pixel Files (TPFs) are a file common to Kepler/K2 and the TESS mission. They contain movies of the pixel data centered on...
Read more >
Support different pixel densities - Android Developers
Support different pixel densities · More videos on YouTube · Use density-independent pixels · Provide alternative bitmaps · Use vector graphics ...
Read more >
Uploaded display ads specifications - Google Ads Help
Google Ads gives you several ways to create responsive display ads and custom uploaded ... Learn more about how to create your own...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found