本文整理汇总了Python中astropy.coordinates.builtin_frames.ICRS.blahblah方法的典型用法代码示例。如果您正苦于以下问题:Python ICRS.blahblah方法的具体用法?Python ICRS.blahblah怎么用?Python ICRS.blahblah使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astropy.coordinates.builtin_frames.ICRS
的用法示例。
在下文中一共展示了ICRS.blahblah方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dynamic_attrs
# 需要导入模块: from astropy.coordinates.builtin_frames import ICRS [as 别名]
# 或者: from astropy.coordinates.builtin_frames.ICRS import blahblah [as 别名]
def test_dynamic_attrs():
from astropy.coordinates.builtin_frames import ICRS
c = ICRS(1*u.deg, 2*u.deg)
assert 'ra' in dir(c)
assert 'dec' in dir(c)
with pytest.raises(AttributeError) as err:
c.blahblah
assert "object has no attribute 'blahblah'" in str(err)
with pytest.raises(AttributeError) as err:
c.ra = 1
assert "Cannot set any frame attribute" in str(err)
c.blahblah = 1
assert c.blahblah == 1