yaml2plot.WaveDataset

class yaml2plot.WaveDataset(raw_data, metadata=None)[source]

A dataset container for SPICE simulation data with optional metadata.

This class provides a clean interface for reading SPICE .raw files and accessing signal data with metadata support for the new v0.2.0 API.

__init__(raw_data, metadata=None)[source]

Initialize WaveDataset with raw data and optional metadata.

Parameters:
  • raw_data (RawRead) – Loaded spicelib RawRead object

  • metadata (Optional[Dict[str, Any]]) – Optional metadata dictionary

Methods

__init__(raw_data[, metadata])

Initialize WaveDataset with raw data and optional metadata.

from_raw(raw_file_path[, metadata])

Create WaveDataset from a SPICE .raw file.

get_signal(name)

Get data for a specific signal by name (case-insensitive).

has_signal(name)

Check if a signal exists in the dataset (case-insensitive).

Attributes

metadata

Get metadata dictionary associated with this dataset.

signals

Get list of all available signal names (normalized to lowercase).

__init__(raw_data, metadata=None)[source]

Initialize WaveDataset with raw data and optional metadata.

Parameters:
  • raw_data (RawRead) – Loaded spicelib RawRead object

  • metadata (Optional[Dict[str, Any]]) – Optional metadata dictionary

property signals: List[str]

Get list of all available signal names (normalized to lowercase).

Returns:

List of signal names (trace names) in lowercase

property metadata: Dict[str, Any]

Get metadata dictionary associated with this dataset.

Returns:

Copy of metadata dictionary

get_signal(name)[source]

Get data for a specific signal by name (case-insensitive).

Parameters:

name (str) – Signal name (trace name) - case insensitive

Return type:

ndarray

Returns:

Signal data as numpy array

Raises:

ValueError – If signal name is not found

has_signal(name)[source]

Check if a signal exists in the dataset (case-insensitive).

Parameters:

name (str) – Signal name to check - case insensitive

Return type:

bool

Returns:

True if signal exists, False otherwise

classmethod from_raw(raw_file_path, metadata=None)[source]

Create WaveDataset from a SPICE .raw file.

Parameters:
  • raw_file_path (str) – Path to the SPICE .raw file

  • metadata (Optional[Dict[str, Any]]) – Optional metadata dictionary

Return type:

WaveDataset

Returns:

WaveDataset instance

Raises: