A Python tool to analyze and visualize LTSpice measurement logs that contain step information. The tool automatically parses .log files generated by LTSpice's .meas command, extracts step parameters and measurement values (including dB and phase information), and creates plots for each measurement set.
- Automatically detects step parameters and values
- Parses measurement sets including magnitude (dB) and phase (degrees)
- Creates individual plots for each measurement set
- Handles special characters (degree symbol °) and different encodings
- Interactive matplotlib plots with grid
- Python 3.x
- matplotlib library
- Clone this repository:
git clone https://github.com/bauergeorg/analyzeSpiceLog.git
cd analyzeSpiceLog- Install required dependencies:
pip install -r requirements.txtBasic usage:
python analyzeSpiceLog.py your_spice_logfile.logThe script will:
- Read and parse the log file
- Display step parameter information
- List all measurement sets found
- Create interactive plots for each measurement
The tool expects LTSpice log files containing:
- Step information (e.g.,
.step param R1=1k) - Measurement results with optional dB/phase information
- Format:
<step_number> <value>or - Format:
<step_number> (<magnitude>dB,<phase>°)
- Format:
- AC Analysis with frequency sweep:
python analyzeSpiceLog.py ac1.log- Transient Analysis with component variation:
python analyzeSpiceLog.py trans1.log- The tool automatically handles UTF-8 encoded files with degree symbols (°)
- For each measurement set, two types of values may be present:
- Simple numeric values
- Complex measurements in dB/degrees format: (42.15dB, -38.69°)
- Plots are displayed interactively and can be saved using matplotlib's save button
This project is licensed under the terms specified in the LICENSE file.