Stack Python module¶
The Stack Python module can be downloaded here: Stack module
This module includes three sub-modules:
- The devices module is the main module. It contains all the blocks needed for the simulation of a two channels stacked ADC: Stack2.
- The sources module is dedicated to the input test signal.
- The utils module contains some helper functions and the Spectrum class to analyse signal power from output spectrum.
It is advisable to use this module with the interactive shell Ipython.
code example¶
from Stack.devices import Stack2
# 'ideal' AFE & scaling
S1 = Stack2(afe=0,adf=0)
# designed AFE & scaling
S2 = Stack2(afe=1,adf=0)
# designed AFE with correction filter
S3 = Stack2(afe=1,adf=1)
ftest = 0.00373 # GHz
# sine signal test
waves,pf,sndr = S3.tb_sine(fo=ftest,lev=-30)
# signal to noise ratio vs input level
df1 = S3.sndr(fo=ftest,Pmin=-80,Pmax=0,plot=True)