本文整理汇总了Python中hftools.dataset.DataBlock.Ycor方法的典型用法代码示例。如果您正苦于以下问题:Python DataBlock.Ycor方法的具体用法?Python DataBlock.Ycor怎么用?Python DataBlock.Ycor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hftools.dataset.DataBlock
的用法示例。
在下文中一共展示了DataBlock.Ycor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: noise_parameters
# 需要导入模块: from hftools.dataset import DataBlock [as 别名]
# 或者: from hftools.dataset.DataBlock import Ycor [as 别名]
def noise_parameters(self, partial=False):
db = DataBlock()
db.S = SArray(self.N)
if isinstance(self.N, ABCDArray):
CA = self.C / (2 * k * 290)
CA11 = CA[..., 0, 0]
CA12 = CA[..., 0, 1]
CA22 = CA[..., 1, 1]
Rn = CA11.real
Yopt = (np.sqrt(CA22 / CA11 - (CA12.imag / CA11) ** 2) +
1j * (CA12.imag / CA11))
Fmin = 1 + (CA12 + CA11 * Yopt.conj()).real
if partial:
db.CA = CA
db.Rn = Rn
db.Yopt = Yopt
db.Fmin = Fmin
db.Gopt = (1 / 50. - Yopt) / (1 / 50. + Yopt)
return db
N = self.convert(YArray)
Y11 = N.N[..., 0, 0]
Y21 = N.N[..., 1, 0]
C = N.C / (4 * k * 290)
CY11 = C[..., 0, 0]
CY12 = C[..., 0, 1]
CY22 = C[..., 1, 1]
Rn = (CY22 / abs(Y21) ** 2).real
Ycor = Y11 - CY12 / CY22 * Y21
Gn = (CY11 - abs(Y11 - Ycor) ** 2 * Rn).real
Yopt = np.sqrt(Gn / Rn + Ycor.real ** 2) - 1j * Ycor.imag
Fmin = 1 + 2 * Rn * (Ycor.real + Yopt.real)
db.CY = C
db.Gn = Gn
db.Ycor = Ycor
db.S = SArray(self.N)
db.Rn = Rn
db.Fmin = Fmin
db.Gopt = (1 / 50. - Yopt) / (1 / 50. + Yopt)
db.Yopt = Yopt
return db