STFTData§
- class typed_lisa_toolkit.types.STFTData[GridT: Grid2D][source]§
Multi-channel short-time Fourier transform data container.
Note
To construct a
STFTData, use the factory functionstftdata().- 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(*, frequencies: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType], times: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType], entries: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], channels: tuple[str, ...], sparse_indices: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | None = None, name: str | None = None) Self§
Construct from raw time-frequency 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_kernel() Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]]§
Return kernel entries in conventional shape.
- get_subset(*, time_interval: tuple[float, float] | None = None, freq_interval: tuple[float, float] | None = None, slices: tuple[slice, slice] | None = None, copy: bool = True) Self§
Return the subset as a new instance.
- 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.
- 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 grid§
Return the grid.
- property kind: str§
Semantic kind of the data.
- property xp§
The underlying array namespace (numpy-like module).