stftdata§

typed_lisa_toolkit.stftdata(mapping: Mapping[str, reps.STFT[GridT]], /, *, name: str | None = None) STFTData[GridT][source]§
typed_lisa_toolkit.stftdata(*, frequencies: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType] | Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, times: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType] | Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, entries: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], channels: tuple[str, ...], sparse_indices: None = None, name: str | None = None) STFTData[Grid2DCartesian[Axis[Linspace, ModuleType], Axis[Linspace, ModuleType]]]
typed_lisa_toolkit.stftdata(*, frequencies: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType] | Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, times: Axis[Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, ModuleType] | Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]] | Linspace, entries: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], channels: tuple[str, ...], sparse_indices: Array[Any, ModuleType] | ndarray[tuple[Any, ...], dtype[Any]], name: str | None = None) STFTData[Grid2DSparse[Axis[Linspace, ModuleType], Axis[Linspace, ModuleType]]]

Construct STFTData.

This function provides two mutually exclusive construction ways:

First, from a positional-only mapping argument:

Parameters:
  • mapping – A mapping from channel names to STFT with Grid2D or Linspace axes.

  • name (str, optional) – Name of the data.

Second, from several keyword arguments:

Parameters:
  • frequencies (Axis) – A uniform array of shape (n_freqs,) or a Linspace object representing the frequency grid of the data.

  • times (Axis) – A uniform array of shape (n_times,) or a Linspace object representing the time grid of the data.

  • entries (AnyArray) – An array of shape (n_batch, n_channels, n_harmonics, n_features, n_freqs, n_times) or (n_batch, n_channels, n_harmonics, n_features, n_sparse). See the convention for more details.

  • channels – A tuple of channel names in the data.

  • sparse_indices (AnyArray, optional) – An array of shape (n_sparse, 2) containing the indices of the non-zero entries in the sparse grid. See indices for more details. If not provided, the data is treated as dense.

  • name (str, optional) – Name of the data.