1

I am trying to reduce kepler time series data. I decided to use the "untrendy" package. Yet there seems to be a small issue with the outputted data. The points at which original kepler data (lower plot) drop or rise causes "spikes" in the detrended data (top plot). Any ideas what could be causing this and how to remove it?

import untrendy
f_detrend, sigma_detrend = untrendy.untrend(time[0:69000], flux[0:69000], error[0:69000])

Detrended data in top plot. Non-detrended Kepler data in lower plot

Thanks. J

John Dolan
  • 29
  • 5

1 Answers1

1

Found the solution. The gaps in the data caused the error.

Running:

data=data[np.where(np.isnan(data)==False)] 

solved the issue.

John Dolan
  • 29
  • 5