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.
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
Get metadata dictionary associated with this dataset.
Get list of all available signal names (normalized to lowercase).
- __init__(raw_data, metadata=None)[source]
Initialize WaveDataset with raw data and optional metadata.
- 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:
- Returns:
Signal data as numpy array
- Raises:
ValueError – If signal name is not found
- classmethod from_raw(raw_file_path, metadata=None)[source]
Create WaveDataset from a SPICE .raw file.
- Parameters:
- Return type:
- Returns:
WaveDataset instance
- Raises:
FileNotFoundError – If the raw file doesn’t exist
Exception – If the file cannot be read by spicelib