英文:
how can output data from a rawfile or svg?
问题
I'm using Ngspice to do circuit simulations and plot a vector, but I don't know how to export data from an SVG or raw file. The circuit is as follows.
The netlist is as follows:
ivdd 0 nd_pkg_pad 0 ac 1.0
.ac dec 100 10meg 10g
.save vm(nd_pkg_pad)
.control
set filetype=ascii
run
plot vm(nd_pkg_pad) xlog ylog
.endc
.end
To run the netlist on Linux 20.04, use the following command:
ngspice
ngspice-> source circuit1.sp
It outputs a plot that can be saved in SVG format. I want to know how to extract data from this plot and export it to Excel, selecting 1000 points of frequency and their corresponding voltage values. It's better to use Python code because there are many plots to be handled. Thanks a lot!
英文:
there! I'm using Ngspice to do circuit simulations. and plot a vector,but i don't know how to export data from an svg or raw file.The circuit is like below.
and the netlist is below
ivdd 0 nd_pkg_pad 0 ac 1.0
.ac dec 100 10meg 10g
.save vm(nd_pkg_pad)
.control
set filetype=ascii
run
plot vm(nd_pkg_pad) xlog ylog
.endc
.end
Then run the netlist on Linux 20.04
The command is
ngspice
ngspice-> source circuit1.sp
Then it outputs a plot as below:
it can be saved in SVG format. but I wanna know how to extract data from this plot and export it to excel like choosing 1000 points of frequency and their corresponding voltage value.
it's better to use python code because a lot of plots to be handled.Thanks a lot!!!
答案1
得分: 1
The method to transform voltage plot to data is using "wrdata"
for example, in a .cir or .sp file, a circuit netlist file, the command is:
wrdata filename(like test.txt) vm(node1)
<----(vm represent voltage, and node1 is a node name)
then test.txt will be generated and you can see the voltage data when do ac analysis.
英文:
The method to transform voltage plot to data is using "wrdata"
for example,in a .cir or .sp file ,a circuit netlist file,the command is:
wrdata filename(like test.txt) vm(node1)
<----(vm represent voltage,and node1 is a node name)
then test.txt will be generated and you can see the voltage data when do ac analysis.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论