本文整理汇总了Python中astrodata.AstroData.extname方法的典型用法代码示例。如果您正苦于以下问题:Python AstroData.extname方法的具体用法?Python AstroData.extname怎么用?Python AstroData.extname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astrodata.AstroData
的用法示例。
在下文中一共展示了AstroData.extname方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_method_extname_3
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import extname [as 别名]
def test_method_extname_3():
ad = AstroData(TESTFILE)
with pytest.raises(SingleHDUMemberExcept):
ad.extname()
示例2: test_method_extname_2
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import extname [as 别名]
def test_method_extname_2():
ad = AstroData(TESTFILE2)
assert ad.extname() == 'SCI'
示例3: test_method_rename_ext_4
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import extname [as 别名]
def test_method_rename_ext_4():
ad = AstroData(TESTFILE2)
ad.rename_ext("FOO", ver=99)
assert ad.extname() == "FOO"
assert ad.extver() == 99
示例4: test_method_extname_1
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import extname [as 别名]
def test_method_extname_1():
ad = AstroData(TESTFILE2) # Single 'SCI' ext
assert isinstance(ad.extname(), str)
示例5: test_method_rename_ext_3
# 需要导入模块: from astrodata import AstroData [as 别名]
# 或者: from astrodata.AstroData import extname [as 别名]
def test_method_rename_ext_3():
ad = AstroData(TESTFILE2) # Single 'SCI' ext
ad.rename_ext("FOO")
assert ad.extname() == "FOO"