LogicalLightCurve

class sunpy.lightcurve.LogicalLightCurve(data, meta=None)[source] [edit on github]

Bases: sunpy.lightcurve.LightCurve

Logical LightCurve with only True and False values.

Examples

>>> import sunpy.lightcurve as lightcurve
>>> import datetime
>>> base = datetime.datetime.today()
>>> dates = [base - datetime.timedelta(minutes=x) for x in range(0, 24 * 60)]
>>> z = [True for x in range(0, 24 * 60)]
>>> light_curve = lightcurve.LogicalLightCurve.create({"param1": z}, index=dates)

Methods Summary

complement() Return the logical complement of the original lightcurve.
times() Returns a list of time ranges where values are True.

Methods Documentation

complement()[source] [edit on github]

Return the logical complement of the original lightcurve.

times()[source] [edit on github]

Returns a list of time ranges where values are True.

Returns:outtr (TimeRange array) – An array of time ranges