本文整理汇总了Python中pyview.lib.datacube.Datacube.filename方法的典型用法代码示例。如果您正苦于以下问题:Python Datacube.filename方法的具体用法?Python Datacube.filename怎么用?Python Datacube.filename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyview.lib.datacube.Datacube
的用法示例。
在下文中一共展示了Datacube.filename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: IqOptimization
# 需要导入模块: from pyview.lib.datacube import Datacube [as 别名]
# 或者: from pyview.lib.datacube.Datacube import filename [as 别名]
#.........这里部分代码省略.........
if frequencyRange==None:
frequencyRange=[self._mwg.frequency()]
try:
self.setup()
params = dict()
params["power"] = self._mwg.power()
params["channels"] = self._awgChannels
params["mwg"] = self._mwg.name()
params["awg"] = self._awg.name()
params["fsp"] = self._fsp.name()
self.offsetCalibrationData().setParameters(params)
self._mwg.turnOn()
for channel in [1,2,3,4]:
self._awg.setWaveform(channel,"IQ_Offset_Calibration")
for frequency in frequencyRange:
self._mwg.setFrequency(frequency)
(voltages,minimum) = self.optimizeIQMixerPowell()
minimum = self.measurePower(voltages)
print "Optimum value of %g dBm at offset %g V, %g V" % (minimum,voltages[0],voltages[1])
rows = self._offsetCalibrationData.search(frequency = frequency)
if rows != []:
self._offsetCalibrationData.removeRows(rows)
self._offsetCalibrationData.set(frequency = frequency,lowI = voltages[0],lowQ = voltages[1],minimum = minimum)
self._offsetCalibrationData.commit()
self._offsetCalibrationData.sortBy("frequency")
self._offsetCalibrationData.savetxt()
except StopThread:
pass
except:
traceback.print_exc()
finally:
self.teardown()
self.updateOffsetCalibrationInterpolation()
return self._offsetCalibrationData.filename()
def calibrateSidebandMixing(self,frequencyRange = None,sidebandRange = arange(-0.5,0.51,0.1)):
"""
Calibrate the IQ mixer sideband generation.
"""
if frequencyRange==None:
frequencyRange=[self._mwg.frequency()]
try:
self.setup()
params = dict()
params["power"] = self._mwg.power()
params["channels"] = self._awgChannels
params["mwg"] = self._mwg.name()
params["awg"] = self._awg.name()
params["fsp"] = self._fsp.name()
self.sidebandCalibrationData().setParameters(params)
self._mwg.turnOn()
channels = self._awgChannels
self.loadSidebandWaveforms()
for f_c in frequencyRange:
#We round the center frequency to an accuracy of 1 MHz
f_c = round(f_c,3)
self._mwg.setFrequency(f_c)
self._awg.setAmplitude(channels[0],4.5)
self._awg.setAmplitude(channels[1],4.5)
self._awg.setOffset(channels[0],self.iOffset(f_c))
self._awg.setOffset(channels[1],self.qOffset(f_c))
data = Datacube("f_c = %g GHz" % f_c)
rowsToDelete = []
try:
for i in range(0,len(self._sidebandCalibrationData.column("f_c"))):
if abs(self._sidebandCalibrationData.column("f_c")[i]-f_c) < 0.1: