import skrf from skrf.media import CPW, Coaxial import numpy as np import matplotlib.pyplot as plt skrf.stylely() #load all measurement data into a dictionary data = skrf.read_all_networks('C:/Users/mercy/OneDrive - Georgia Institute of Technology/TestBench Design/') # pull out measurements by name into an ordered list measured_names = ['TRL_Thru025','TRL_Reflect1mm', 'TRL_Line1pthru', 'TRL_Line2pthru'] measured = [data[k] for k in measured_names] #data['MIcrostrip_086'].plot_s_db(m=1,n=1) # DUT #dut_meas= data['Microstrip_2mm_0hz'] dut_meas= data['TRL_corr2mm'] # define the line lengths in meters (including thru) l = [0, 0.861e-3, 4.95e-3] #Do the calibration cal = skrf.NISTMultilineTRL( measured = measured, #Measured standards Grefls = [-1], #Reflection coefficient of the reflect, -1 for short l = l, #Lengths of the lines er_est = 2.3218, #Estimate of transmission line effective permittivity ) #Correct the DUT using the above calibration corrected = cal.apply_cal(dut_meas) #dut_meas.s11.plot_s_db() #data['TRL_Meas1mm'].plot_s_db(m=0, n=1) data['075'].plot_s_db(m=0, n=1) corrected.plot_s_db(m=0, n=1)