<@U04DYPN230A> You could do that in 2 different wa...
# sky130
a
@mohamed hassan You could do that in 2 different ways: 1. FFT in ngspice, please refer to documentation. 2. Run ngspice transient simulation and read the data as a vector in numpy and apply fft on it: https://numpy.org/doc/stable/reference/routines.fft.html
m
I tried to run fft in NGspice for an output signal but it seems to perform the fft for only one value of the signal, do you have any idea what may be the issue here?
a
@mohamed hassan What do you mean by one value?
I personally, prefer option 2, run ngspice, get the vectors and do whatever I want in Numpy + Scipy
@mohamed hassan such questions #analog-design is the right channel for that.
s
Remember to run the ngspice
linearize
command on vectors you want to export for python fft. By default ngspice raw files are not constant time step. They are after applying
linearize
.
👍 1
r
I use .option INTERP to get equidistant sample points. The period is the time step specified in .tran For example, in “.tran 1u 100n”, the 100n will specify the period of samples.