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.

Default arguments for flatten overfit in TESS light curves

See original GitHub issue

Problem description

While removing long term trends of TESS light curves, I’ve noticed that the current default arguments for flatten usually overfit transits.

Example

import lightkurve as lk

pixels = pixels = lk.search_targetpixelfile("wasp-124b").download()
lightcurve = pixels.to_lightcurve()
flat_lightcurve, trend  = lightcurve.flatten(return_trend = True)
trend.plot()
exoplanet = flat_lightcurve.fold(period=3.372)
exoplanet.plot()

Screen Shot 2019-07-12 at 8 31 02 PM

Expected behavior

Increasing the break_tolerance and the window length helps a lot:

flat_lightcurve, trend  = lightcurve.flatten(window_length = 1001, break_tolerance = 50, return_trend = True)
trend.plot()
exoplanet = flat_lightcurve.fold(period=3.372)
exoplanet.plot()

Screen Shot 2019-07-12 at 8 31 20 PM I didn’t see this overfit behavior in Kepler/K2 lightcurves.

Environment:

  • platform (e.g. Linux, OSX, Windows): OSX
  • lightkurve version (e.g. 1.0b6): I’m living on the bleeding edge (1.1.dev) 😄
  • installation method (e.g. pip, conda, source): source

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
gullycommented, Aug 19, 2019

Note this is near-duplicate of #486

0reactions
orionleecommented, Nov 1, 2019

On a related note, some other methods’ default parameters might be tailored to Kepler as well.

  1. transit_duration for LightCurve.estimate_cdpp() https://docs.lightkurve.org/api/lightkurve.lightcurve.LightCurve.html#lightkurve.lightcurve.LightCurve.estimate_cdpp
Read more comments on GitHub >

github_iconTop Results From Across the Web

Removing noise from K2 and TESS light curves using Pixel ...
We can create an uncorrected SAP light curve from this target pixel file using a threshold mask. The dominant trend in the SAP...
Read more >
A Data-driven Approach to Detrending TESS Full-frame Image ...
We present unpopular, an open-source Python package to obtain detrended TESS FFI light curves optimized for variable sources.
Read more >
Noise Removal - TESS Science Support Center - HEASARC
In this tutorial, we will teach the user how to remove scattered light and noise from a TESS light curve. The splinter session...
Read more >
Fitting TESS data — exoplanet 0.1.5 documentation
This aperture produces the following light curve: ... the data one more time with the transits masked so that the de-trending doesn't overfit...
Read more >
Exoplanet Detection using Machine Learning - arXiv
Transiting Exoplanet Survey Satellite (TESS) data, we found our method can classify light curves with an accuracy of 0.98, and is able to ......
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