-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parsing ng-spice output #3
Comments
We are actually getting all node voltages and node current from ngspice. Our parser is capable to parse this value for ac,dc and tran analysis. The result we got from the parser is in the form of dictionary having key as node/branch name and value as list of voltage/current value for each iteration. You can easily use this dictionary in your plot. Now this is up to you how you reflect it in your front end. You can just show the value or just plot branch current or node voltage. I am not aware of any other open source ngspice output parser library. But if you are planning to write your own parser then I would suggest to use rawfile generated in ngspice instead of content of 'print allv' and 'print alli' By the way you can check https://www.circuitlab.com/ I think they are using ngspice at the backend. |
Can you please refer to the dictionary in the source code in where you store the result? Also, using rawfile generated in ngspice will not consume memory as ngspice will write to the rawfile directly? |
Yes, ngSpice will directly write it to the file. Just like 'print allv > file.txt' there is command for raw file as well. We have written a parser in python which can be found under scripts directory. It takes the analysis,file details and after parsing ,it store the result in dictionary. We call this parser from nodeJS using python-shell module. Here is the code for calling parser.py from nodeJS. `function parsePlotData(){
|
Thanks Fahimkhan, is there any social network I can follow you on? Twitter maybe? |
Here is my twitter profile https://twitter.com/bitwisenoise |
Thanks Fahim, but where is |
Its there under scripts directory. |
Ah, sorry didn't notice! |
Wow, thank you for all of your efforts! Much helpful! Such an useful project! |
Hi, whatever, thanks for your efforts! I found that in ngspice27 there's a command
So, I think it's easier to parse :) |
As you have tried to parse ng-spice, I would like to ask please, do you think I can fully parse the ng-spice output to power a simulator features like this one as I would need to cast the current value for each component including wires, do you encourage me to start such a parser? Do you know any good ng-spice output parser library there?
The text was updated successfully, but these errors were encountered: