opticam.timing.timeseries
Functions
|
Given a table of light curves, extract the light curve for a single key. |
|
Split a time series into a list of contiguous time series. Similar to stingray's split_by_gti() method. |
|
Split a time series into equal length, contiguous segments. |
|
Get the number of time series rows per segment. |
|
Infer the Good Time Intervals from a time array. |
Module Contents
- opticam.timing.timeseries.get_lc(light_curves, key)
Given a table of light curves, extract the light curve for a single key.
Parameters
- light_curvesTimeSeries
The table of light curves.
- keystr
The camera:filter key (e.g., “1:g” for camera 1 with a g filter).
Returns
- TimeSeries
The light curve for the filter.
- Parameters:
light_curves (astropy.timeseries.TimeSeries)
key (str)
- Return type:
astropy.timeseries.TimeSeries
- opticam.timing.timeseries.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
- tsTimeSeries
The time series, assumed to contain gaps.
- thresholdfloat, optional
The gap detection threshold, by default 1.5 times the median time delta.
Returns
- list[TimeSeries]
The list of strictly contiguous time series.
- Parameters:
ts (astropy.timeseries.TimeSeries)
threshold (float)
- Return type:
list[astropy.timeseries.TimeSeries]
- opticam.timing.timeseries.segment_timeseries(ts, segment_size)
Split a time series into equal length, contiguous segments.
Parameters
- tsTimeSeries
The time series.
- segment_sizeQuantity
The segment size.
Returns
- list[TimeSeries]
The time series segments.
- Parameters:
ts (astropy.timeseries.TimeSeries)
segment_size (astropy.units.Quantity)
- Return type:
list[astropy.timeseries.TimeSeries]
- opticam.timing.timeseries.get_segment_size(ts, segment_size)
Get the number of time series rows per segment.
Parameters
- tsTimeSeries
The time series.
- segment_sizeQuantity
The segment size.
Returns
- int
The number of rows per segment.
- Parameters:
ts (astropy.timeseries.TimeSeries)
segment_size (astropy.units.Quantity)
- Return type:
int
- opticam.timing.timeseries.infer_gtis(time, threshold=1.5)
Infer the Good Time Intervals from a time array.
Parameters
- timeNDArray | Time | Quantity
The time array. If this array has units, the resulting GTIs will have the same units.
- thresholdfloat, optional
The gap detection threshold, by default 1.5 times the minimum time delta.
Returns
- NDArray
The inferred GTIs.
- Parameters:
time (numpy.typing.NDArray | astropy.time.Time | astropy.units.Quantity)
threshold (float)
- Return type:
numpy.typing.NDArray