# How to read an already existing NgSpice raw file

This has taken me a couple of days to solve. I have a set of NgSpice raw files that I would like to exploit so as to visualize the voltage distributions in different circuits. What is the python command to use or python package to import in order for me to achieve this.

Note: I am a bit familiar with the PySpice python package, but from what I have read and understood it works when you use it to create your netlist and run it, by using the already stored variables in its memory. In my case however, raw files are already generated...

Hope I was clear enough.

• Unless PySpice already has a raw file parser, you'll probably have to write one. But that won't be very difficult. – user_1818839 Mar 3 at 14:46
• @BrianDrummond I tried to look for a PySpice function that reads raw files, I unfortunately did not find one. If I want to use PySpice, I'll have to use it to generate and run the netlist, which is not what I am trying to do. I really have no idea how to write one x) – Wallflower Mar 3 at 16:45

## 1 Answer

I contacted the maintainer of the ltspice python package that was created to read the generated ltspice rawfiles, to take into account the form of the NgSpice rawfiles.

You can now use the ltspice python package to read your NgSpice rawfile as well :)