SpectroItem#

class osekit.core_api.spectro_item.SpectroItem(file: SpectroFile | None = None, begin: Timestamp | None = None, end: Timestamp | None = None)#

SpectroItem corresponding to a portion of a SpectroFile object.

Initialize a SpectroItem from a SpectroFile and begin/end timestamps.

Parameters#

file: osekit.data.spectro_file.SpectroFile

The SpectroFile in which this Item belongs.

begin: pandas.Timestamp (optional)

The timestamp at which this item begins. It is defaulted to the SpectroFile begin.

end: pandas.Timestamp (optional)

The timestamp at which this item ends. It is defaulted to the SpectroFile end.

classmethod from_base_item(item: BaseItem) SpectroItem#

Return a SpectroItem object from a BaseItem object.

get_value(fft: ShortTimeFFT | None = None, sx_dtype: type[complex] = <class 'complex'>) np.ndarray#

Get the values from the File between the begin and stop timestamps.

If the Item is empty, return a single 0.

property time_resolution: Timedelta#

Time resolution of the associated SpectroFile.