eztaox.ts_utils
Utility functions for time series processing.
Functions
|
Get the index of the nearest value in tIn to x. |
|
Downsample tIn to match the time points in tOut. |
|
Transform light curves in dictionary to EzTaoX friendly format. |
Module Contents
- _get_nearest_idx(tIn, x) int[source]
Get the index of the nearest value in tIn to x.
- Parameters:
tIn (JAXArray) – Array of time values.
x (float) – The value to find the nearest index for.
- downsampleByTime(tIn, tOut) tinygp.helpers.JAXArray[source]
Downsample tIn to match the time points in tOut.
- Parameters:
tIn (JAXArray) – Array of time values to be downsampled.
tOut (JAXArray) – Array of target time values.
- Returns:
Downsampled array of time values.
- Return type:
JAXArray
- formatlc(ts: dict[str, numpy.typing.NDArray | tinygp.helpers.JAXArray], ys: dict[str, numpy.typing.NDArray | tinygp.helpers.JAXArray], yerrs: dict[str, numpy.typing.NDArray | tinygp.helpers.JAXArray], band_order: dict[str, int]) tuple[tuple[tinygp.helpers.JAXArray, tinygp.helpers.JAXArray], tinygp.helpers.JAXArray, tinygp.helpers.JAXArray][source]
Transform light curves in dictionary to EzTaoX friendly format.
- Parameters:
ts (dict[str, NDArray | JAXArray]) – Time stamps for observation in each band.
ys (dict[str, NDArray | JAXArray]) – Observed values in each band.
yerrs (dict[str, NDArray | JAXArray]) – Uncertainties in observed values for each band.
band_order (dict[str, int]) – Mapping of band names to band indices.
- Returns:
- Light curves formatted as
((time stamps, band indices), observed values, uncertainties).
- Return type:
tuple[tuple[JAXArray, JAXArray], JAXArray, JAXArray]