TSData§
- class typed_lisa_toolkit.types.TSData[source]§
Multi-channel time series data container.
- classmethod from_dict(data_dict: Mapping[str, AnyReps], /, **kwargs: Any) Self§
Create a new instance from a dictionary of channel names to representations.
Warning
This is an expert-level API. Most users should use the top-level factory functions in
typed_lisa_toolkit.
- classmethod from_entries(*, times: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType], entries: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], channels: tuple[str, ...], name: str | None = None) Self[source]§
Construct from raw time-domain entries and explicit channel names.
- classmethod load(file_path: str | Path, *, legacy: bool = False)§
Load the data from an HDF5 file (Deprecated).
Warning
This method is deprecated and will be removed in 0.8.0; use
load_data()instead.
- get(k[, d]) D[k] if k in D, else d. d defaults to None.§
- get_embedded(embedding_grid: Grid1D[Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType]], *, known_slices: tuple[slice, ...] | None = None)§
Return data embedded on a new 1D grid.
- get_kernel() Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]§
Return kernel entries in conventional shape.
- get_subset(*, interval: tuple[float, float] | None = None, slice: slice | None = None) Self§
Return the subset as a new instance.
- get_zero_padded(pad_time: tuple[float, float], tapering: Tapering | None = None) TSData[source]§
Return the zero-padded data.
- items() a set-like object providing a view on D's items§
- keys() a set-like object providing a view on D's keys§
- pick(channels: str | tuple[str, ...]) Self§
Return a new instance containing only the specified channels.
- save(file_path: str | Path)§
Save the data to an HDF5 file.
The data are saved in the following structure:
The root level contains the attribute
typewith the class name.Each channel is saved as a group.
The group contains two datasets:
gridfor the grid.entriesfor the entries.
For
TimedFSData, there will be a datasettimesat the root level containing the time grid.
- set_name(name: str | None) Self§
Set the name of the data container.
The name is only used for labeling the data container in plots.
Note
This method returns self to allow for fluent method chaining.
- to_fsdata(*, keep_times: Literal[False], tapering: tapering.Tapering | None = None) FSData[source]§
- to_fsdata(*, keep_times: Literal[True] = True, tapering: tapering.Tapering | None = None) TimedFSData
Return the frequency series data (Deprecated).
Warning
This method is deprecated and will be removed in 0.8.0; use
time2freq()instead.- Returns:
The frequency series data. If keep_times is True, the time grid is kept.
- Return type:
- values() an object providing a view on D's values§
- property channel_names: tuple[str, ...]§
Return the channel names.
- property domain: Literal['time', 'frequency', 'time-frequency']§
Physical domain shared by all channels.
- property dt: float§
Return the time step.
- property grid§
Return the grid.
- property kind: None§
Semantic kind of the data.
- property t_end: float§
Return the end time.
- property t_start: float§
Return the start time.
- property times§
Return the times.
- property xp§
The underlying array namespace (numpy-like module).