$ show nunobrum/PyLTSpice
PyLTSpice is a Python library and CLI toolkit for automating LTspice circuit simulations. It exposes programmatic editing of .asc netlists (AscEditor/SpiceEditor), reading of LTspice .raw binary output files (RawRead), histogram generation for Monte Carlo analysis, and command-line utilities (ltsteps, histogram, raw_convert, rawplot, run_server, asc_to_qsch). The codebase is primarily a compatibility layer over the spicelib package: many modules are thin re-exports that emit deprecation notices and delegate to spicelib, while preserving legacy class names such as SimCommander and LTSpiceRawRead. The repository includes unit tests with sample .raw/.log/.asc files, Sphinx documentation, and examples. Although it processes simulation data, this is an application/library rather than a data-research repository. Maintenance is active, but the tight dependency on spicelib and the presence of legacy shims create moderate drift risk.
The LLM identified 3 files worth highlighting for reuse:
Provides AscEditor, a high-level editor for LTspice .asc netlists. It exposes methods to set component values, update parameters, add SPICE instructions, and save netlists, delegating to the underlying spicelib implementation behind a stable public API. This is the primary entry point for programmatic schematic manipulation and can be reused as a facade pattern for other EDA netlist formats.
Implements RawRead, a parser for LTspice .raw simulation output files. It handles the structured header, variable definitions, and binary data sections, supporting real and complex data types for transient and AC analyses. The parser pattern is self-contained and could be extracted to process LTspice raw files in other projects.
Provides histogram generation from LTspice simulation results, commonly used for Monte Carlo analysis. It encapsulates binning and frequency computation for simulation data, making it a reusable data-analysis utility for circuit design workflows.