Doesn't really answer your main question but in my opinion the better approach is to put your control logic in python and interact with ngspice through the shared library interface. PySpice has an implemented python interface.
To my mind putting effort into learning ngspice's quirky way of doing things is wasted effort. If you want to use Xyce or something else you need to throw everything away and start again. It's worth decoupling the analysis from the simulation calculation
👍 5
🌍 1
j
John Kustin
06/02/2021, 5:06 PM
good point
John Kustin
06/02/2021, 5:06 PM
learning curve of PySpice is not bad?
🌍 1
y
yrrapt
06/02/2021, 5:11 PM
There are some subtleties.
I've got some working libraries in a completely undocumented state here: https://github.com/yrrapt/yaaade/tree/main/yaaade/spice
That may be useful for you either to use directly or take as inspiration for your own scripts since the syntax is shown already
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.