lightkurve.correctors.
SFFCorrector
(lightcurve)¶Bases: object
Implements the SelfFlatFielding (SFF) systematics removal method.
This method is described in detail by Vanderburg and Johnson (2014). Briefly, the algorithm implemented in this class can be described as follows
 Rotate the centroid measurements onto the subspace spanned by the eigenvectors of the centroid covariance matrix
 Fit a polynomial to the rotated centroids
 Compute the arclength of such polynomial
 Fit a BSpline of the raw flux as a function of time
 Normalize the raw flux by the fitted BSpline computed in step (4)
 Bin and interpolate the normalized flux as a function of the arclength
 Divide the raw flux by the piecewise linear interpolation done in step (6)
 Set raw flux as the flux computed in step (7) and repeat
 Multiply back the fitted BSpline
Parameters: 


Examples
>>> lc = LightCurve(time, flux) # doctest: +SKIP
>>> corrector = SFFCorrector(lc) # doctest: +SKIP
>>> new_lc = corrector.correct(centroid_col, centroid_row) # doctest: +SKIP
Methods Summary
arclength (x1, x) 
Compute the arclength of the polynomial used to fit the centroid measurements. 
bin_and_interpolate (s, normflux, bins, sigma) 

breakpoints (campaign) 
Return a break point as a function of the campaign number. 
correct ([centroid_col, centroid_row, …]) 
Returns a systematicscorrected LightCurve. 
fit_bspline (time, flux[, knotspacing]) 
Returns a scipy.interpolate.BSpline object to interpolate flux as a function of time. 
rotate_centroids (centroid_col, centroid_row) 
Rotate the coordinate frame of the (col, row) centroids to a new (x,y) frame in which the dominant motion of the spacecraft is aligned with the x axis. 
Methods Documentation
arclength
(x1, x)¶Compute the arclength of the polynomial used to fit the centroid measurements.
Parameters: 


Returns: 

bin_and_interpolate
(s, normflux, bins, sigma)¶breakpoints
(campaign)¶Return a break point as a function of the campaign number.
The intention of this function is to implement a smart way to determine the boundaries of the windows on which the SFF algorithm is applied independently. However, this is not implemented yet in this version.
correct
(centroid_col=None, centroid_row=None, polyorder=5, niters=3, bins=15, windows=10, sigma_1=3.0, sigma_2=5.0, restore_trend=False)¶Returns a systematicscorrected LightCurve.
Parameters: 


Returns: 

fit_bspline
(time, flux, knotspacing=1.5)¶Returns a scipy.interpolate.BSpline
object to interpolate flux as a function of time.
rotate_centroids
(centroid_col, centroid_row)¶Rotate the coordinate frame of the (col, row) centroids to a new (x,y) frame in which the dominant motion of the spacecraft is aligned with the x axis. This makes it easier to fit a characteristic polynomial that describes the motion.
Created with ♥ by the Lightkurve developers. Join us on GitHub.