fant.close()
ftot.close()

#only LNB gain:
gainlnb  = gaintot- gainant
#reverse frequency
freq1 = freq1*1000
freq = freq1[::-1]
LOfreq = 5150 # MHz
freq = LOfreq - freq

#get the on board filter normalized attenuation
fref = 1400 # MHz
fname = 'SXBP-1430-75+___Plus25degC.S2P'
data = utils.readminicircuitdata(filterfolder + fname)
freqfilt = data[0]
gainfilt = data[1]
attenatfref = np.interp([fref],freqfilt,gainfilt)
print 'attenat ref = ' , attenatfref
normedgain = gainfilt - attenatfref

#get the cable loss from data
meascable = utils.getjacquesmeas(filterfolder+'/scope_46.csv',filterfolder+'/scope_47.csv')


#interpolate the gains to add them:
newgainlnb = np.interp(freqfilt,freq,gainlnb)
newgaincable =  np.interp(freqfilt,meascable[0],meascable[1])

示例#2
0
typeoffilter = sys.argv[1]
#filtnr = ['1']
#CBP-B1230C+_Plus25DegC.s2p

fref = 1400 #MHz 
################################################
###  for the biasT filter              #########
################################################
if typeoffilter == 'biast':
    filtnr = ['1','2','3','4','5']
    allgain = []
    for filt in filtnr:
        #    fname = 'CBP-B1230C+_Plus25DegC.s2p'
        fname = 'HFCN-1000+ _AP130157_022513_UNIT-'+filt+'.s2p'
        data = utils.readminicircuitdata(basefolder + fname)
        freq = data[0]
        gain = data[1]
        attenatfref = np.interp([fref],freq,gain)
        allgain.append(gain)
        plt.plot(freq,gain,label=filt)
 
    allgainnp = np.ndarray(shape=(len(allgain),len(allgain[0])))
    counter = 0
    for gain in allgain:
        allgainnp[counter] = gain
        counter +=1
    meangain = np.mean(allgainnp,axis=0)
 #print allgain

    measdata = utils.getjacquesmeas(basefolder+'/scope_42.csv',basefolder+'/scope_43.csv')
示例#3
0
basefolder = cwd + '/../../data/filter/'

#first get the LNA gain:
datafolder2 = '../../data/gain2/'
snarray = ['022966','022967','022968','022969','022970','023230','023231','023232']
lnagain = []
for sn in snarray:
    fgainname = datafolder2 + 'wenteqS21'+ sn + '.csv'
    data = utils.readcsv(fgainname)
    lnagain.append(data)


# get the on board filter data (CBP-B1230C+_Plus25DegC.s2p)
fref = 1400 #MHz freq to be normalized to (because resistor calibration was done at this frequency)
fname = '/CBP-B1230C+_Plus25DegC.s2p'
boardfilter = utils.readminicircuitdata(basefolder + fname) # (return [freq,gain])
attenatfref = np.interp([fref],boardfilter[0],boardfilter[1])
boardfilter[1] = boardfilter[1] - attenatfref # normalize the gain to the reference frequency

#get the biasT filter from data
measbiast = utils.getjacquesmeas(basefolder+'/scope_42.csv',basefolder+'/scope_43.csv')

#get the cable loss from data
meascable = utils.getjacquesmeas(basefolder+'/scope_43.csv',basefolder+'/scope_44.csv')

#we interpolate w.r.t. the constructor data:
freq = boardfilter[0]
newmeasbiast = np.interp(freq,measbiast[0]*1000,measbiast[1])
newmeascable = np.interp(freq,meascable[0]*1000,meascable[1])

totgains = []