lightkurve.FoldedLightCurve.bin#
- FoldedLightCurve.bin(time_bin_size=None, time_bin_start=None, aggregate_func=None, bins=None, n_bins=None)[source]#
Bins a FoldedLightCurve in equally-spaced bins in phase. Binning always occurs in time units (not normalized phase units)
If the original light curve contains flux uncertainties (
flux_err
), the binned lightcurve will report the root-mean-square error. If no uncertainties are included, the binned curve will return the standard deviation of the data.- Parameters
- time_bin_size
Quantity
,`~astropy.time.TimeDelta`, or scalar (optional) The time interval for the binned time series - this is either a scalar value (in which case all time bins will be assumed to have the same duration) or as an array of values (in which case each phase bin can have a different duration). In cases where the lightcurve is phase-normalized, a scalar input will be assumed to be in normalized phase units (u.dimensionless_unscaled) (Default: 0.5 days; default unit: days.)
- time_bin_startTime like value, optional
The start phase for the binned time series. This can also be a scalar value if
time_bin_size
is provided. Defaults to the first time in the sampled time series.- aggregate_funccallable, optional
The function to use for combining points in the same bin. Defaults to np.nanmean.
- binsint, optional
int which gives the number of bins to divide the lightkurve into. This adjusts the length of
time_bin_size
to accommodate the input time series length.- n_bins:
This functionality is deprecated for FoldedLightCurves. If provided, asserts bins=n_bins
- time_bin_size
- Returns
- binned_lc
FoldedLightCurve
A new folded light curve which has been binned, with the ‘time’ column phase in days
- binned_lc