opticam.timing.timeseries ========================= .. py:module:: opticam.timing.timeseries Functions --------- .. autoapisummary:: opticam.timing.timeseries.get_lc opticam.timing.timeseries.split_timeseries_on_gaps opticam.timing.timeseries.segment_timeseries opticam.timing.timeseries.get_segment_size opticam.timing.timeseries.infer_gtis Module Contents --------------- .. py:function:: get_lc(light_curves, key) Given a table of light curves, extract the light curve for a single key. Parameters ---------- light_curves : TimeSeries The table of light curves. key : str The camera:filter key (e.g., "1:g" for camera 1 with a g filter). Returns ------- TimeSeries The light curve for the filter. .. py:function:: split_timeseries_on_gaps(ts, threshold = 1.5) Split a time series into a list of contiguous time series. Similar to `stingray`'s `split_by_gti()` method. Parameters ---------- ts : TimeSeries The time series, assumed to contain gaps. threshold : float, optional The gap detection threshold, by default 1.5 times the median time delta. Returns ------- list[TimeSeries] The list of strictly contiguous time series. .. py:function:: segment_timeseries(ts, segment_size) Split a time series into equal length, contiguous segments. Parameters ---------- ts : TimeSeries The time series. segment_size : Quantity The segment size. Returns ------- list[TimeSeries] The time series segments. .. py:function:: get_segment_size(ts, segment_size) Get the number of time series rows per segment. Parameters ---------- ts : TimeSeries The time series. segment_size : Quantity The segment size. Returns ------- int The number of rows per segment. .. py:function:: infer_gtis(time, threshold = 1.5) Infer the Good Time Intervals from a time array. Parameters ---------- time : NDArray | Time | Quantity The time array. If this array has units, the resulting GTIs will have the same units. threshold : float, optional The gap detection threshold, by default 1.5 times the minimum time delta. Returns ------- NDArray The inferred GTIs.