** Script originally designed to test real time noise but useful ** for doing averaged plot of repeated RTN runs ** Repeats a run numRuns times then plots an averaged FFT of the ** signal on a node called VOUT. Setup startF endF and numPts for ** frequency range of FFT netlist design.net ** Config Let numRuns=50 Let startF=1meg Let endF=10meg Let numPts=4096 for idx=0 to numRuns Run /file design.net let data = vout - mean1(vout) if idx=0 then let global:result =mag(fft(interp(data,numPts))) else let global:result = global:result+mag(fft(interp(data,numPts))) endif next idx Let refVec = ref(vout) let interval = refVec[length(vout)-1]-refVec[0] Plot /loglog Truncate(global:result, startF, endF)/numRuns/sqrt(2/interval)