lightkurve.LightCurve.normalize#

LightCurve.normalize(unit='unscaled')[source]#

Returns a normalized version of the light curve.

The normalized light curve is obtained by dividing the flux and flux_err object attributes by the median flux. Optionally, the result will be multiplied by 1e2 (if unit='percent'), 1e3 (unit='ppt'), or 1e6 (unit='ppm').

Parameters
unit‘unscaled’, ‘percent’, ‘ppt’, ‘ppm’

The desired relative units of the normalized light curve; ‘ppt’ means ‘parts per thousand’, ‘ppm’ means ‘parts per million’.

Returns
normalized_lightcurveLightCurve

A new light curve object in which flux and flux_err have been divided by the median flux.

Warns
LightkurveWarning

If the median flux is negative or within half a standard deviation from zero.

Examples

>>> import lightkurve as lk
>>> lc = lk.LightCurve(time=[1, 2, 3], flux=[25945.7, 25901.5, 25931.2], flux_err=[6.8, 4.6, 6.2])
>>> normalized_lc = lc.normalize()
>>> normalized_lc.flux
<Quantity [1.00055917, 0.99885466, 1.        ]>
>>> normalized_lc.flux_err
<Quantity [0.00026223, 0.00017739, 0.00023909]>