当前位置: 首页>>代码示例>>Python>>正文


Python Datacube.removeRows方法代码示例

本文整理汇总了Python中pyview.lib.datacube.Datacube.removeRows方法的典型用法代码示例。如果您正苦于以下问题:Python Datacube.removeRows方法的具体用法?Python Datacube.removeRows怎么用?Python Datacube.removeRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyview.lib.datacube.Datacube的用法示例。


在下文中一共展示了Datacube.removeRows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: IqOptimization

# 需要导入模块: from pyview.lib.datacube import Datacube [as 别名]
# 或者: from pyview.lib.datacube.Datacube import removeRows [as 别名]

#.........这里部分代码省略.........
          coefficient =(pow(10.0,level/10.0)-pow(10.0,zero/10.0))/pow(amp,2.0)
          self._powerCalibrationData.set(frequency = f)
          params = {"power"+name : sqrt(exp(log(10.0)*diff/10.0)),"powerDBM"+name : diff, "zero"+name : zero,"level"+name : level,"coeff"+name : coefficient}
          self._powerCalibrationData.set(**params)
      	self._powerCalibrationData.commit()
    finally:
      self.teardown()
    
  def calibrateIQOffset(self,frequencyRange = None):
    """
    Calibrate the IQ mixer DC offset.
    """
    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:
开发者ID:adewes,项目名称:python-qubit-setup,代码行数:70,代码来源:iq_level_optimization.py


注:本文中的pyview.lib.datacube.Datacube.removeRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。