コード例 #1
0
ファイル: HD23_P3dB.py プロジェクト: arpuvs/RFG
# Necessary module and instrument imports
import sys, visa, time
sys.path.append('../../Common')
sys.path.append('../../Common/FMB_USB_Python_Files')
from ADI_GPIB.AgilentN5181A import *
from ADI_GPIB.AgilentN9030A import *
from ADI_GPIB.AgilentN6705B import *
from ADI_GPIB.WatlowF4 import *
from FMB import *
from openpyxl import *

# Instrument initialization
Supply = AgilentN6705B(26)
# Source = AgilentN5181A(20)
Source = AgilentN5181A(11)
Analyzer = AgilentN9030A(18)
Oven = WatlowF4(4)
startTime = time.time()

# Filter = FMB('COM3', fmbDict)


# Main body of code, called by GUI
def HD23Main(path, freqlist, vcomlist, templist, dutNumber):
    def HD23():  # Main HD23 measurement function
        # Initializes analyzer
        Analyzer.__SetSpan__(10e3)
        Analyzer.__SetAverage__(50)

        # Initializes all measurement arrays
コード例 #2
0
import sys, visa, time

sys.path.append('../Common')
from ADI_GPIB.AgilentN5181A import *
from ADI_GPIB.AgilentN9030A import *
from ADI_GPIB.AgilentN6705B import *
from ADI_GPIB.WatlowF4 import *

Supply = AgilentN6705B(26)
Source1 = AgilentN5181A(20)
Source2 = AgilentN5181A(11)
Analyzer = AgilentN9030A(18)
Oven = WatlowF4(4)


def IMD3():
    Analyzer.__SetSpan__(10e3)
    Analyzer.__SetAverage__(100)
    lowerPeak = []
    higherPeak = []
    lowCarrier = []
    highCarrier = []
    higherSourceAmp = []
    lowerSourceAmp = []
    supplyI = []

    for freq in freqlist:
        # Set sources
        Source1.__SetState__(0)
        Source2.__SetState__(0)
        Source1.__SetFreq__(freq - 1e6)