def _convert_unit(self, rho, eph):
"""Make units match those of self."""
if not self.dim.unit.is_equivalent(rho.unit):
if rho.unit.is_equivalent(u.m):
x = rho_as_angle(rho, eph)
else:
x = rho_as_length(rho, eph)
else:
x = rho
return x
评论列表
文章目录