用Signal Hound USB\u SA124B频谱分析仪读取特定频率的功率需要很长时间

2024-05-29 03:53:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用Signal Hound USB_SA124B频谱分析器,并使用QCoDeS框架(https://github.com/QCoDeS/Qcodes)将测量结果读入python代码,该框架具有设备的驱动程序

qcode提供了一个函数,可以让你读取特定频率的功率(\u get \u power \u at \u freq(),在文档中他们说有一个名为power()的函数,但我找不到它)。 问题是,我需要在一个循环中多次读取频率,但使用\u get \u power \u at \u freq()大约需要0.8-0.9秒,这就加起来了。 问题是,这个设备可以在大约一秒钟内扫描大约100MHz的频率范围(使用sweep函数),所以我认为使用\u get \u power \u at \u freq()比它应该需要的时间要长得多,也许还有另一种更快的方法可以做到,但我找不到任何方法。 有人知道改进的方法吗? 谢谢:)

QCoDeS文档示例: -https://qcodes.github.io/Qcodes/examples/driver_examples/Qcodes-example-with-Signal-Hound-USB-SA124B.html -https://qcodes.github.io/Qcodes/examples/driver_examples/Qcodes-example-with-Signal-Hound-USB-SA124B-ParameterWithSetpoints.html

我尝试使用扫描功能,并设置一个小范围,但我没有找到一种方法来读取平均功率扫描

此函数用于设置设备:

def setinstrument(freq, span):
    # Sets instrument drivers and connections
    path = 'C:\\Program Files\\Signal Hound\\Spike\\sa_api.dll'  # device's driver location
    mysa = qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B('mysa', dll_path=path)

    print("-------------------------------------")
    print(mysa.get_idn())  # Prints instrument's details
    print("-------------------------------------")

    mysa.frequency(freq)  # Center of scanned region
    mysa.span(span)  # Width of scan region
    mysa.configure()

    return mysa

我使用:

mysa._get_power_at_freq()

我希望阅读频率的时间更短:/


Tags: 方法函数getsignalexamplesatusb频率

热门问题