本文整理汇总了Python中ctapipe.instrument.CameraGeometry.get_known_camera_names方法的典型用法代码示例。如果您正苦于以下问题:Python CameraGeometry.get_known_camera_names方法的具体用法?Python CameraGeometry.get_known_camera_names怎么用?Python CameraGeometry.get_known_camera_names使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ctapipe.instrument.CameraGeometry
的用法示例。
在下文中一共展示了CameraGeometry.get_known_camera_names方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_known_camera_names
# 需要导入模块: from ctapipe.instrument import CameraGeometry [as 别名]
# 或者: from ctapipe.instrument.CameraGeometry import get_known_camera_names [as 别名]
def test_known_camera_names():
cams = CameraGeometry.get_known_camera_names()
assert len(cams) > 4
assert 'FlashCam' in cams
assert 'NectarCam' in cams
for cam in cams:
geom = CameraGeometry.from_name(cam)
geom.info()
示例2: test_construct
# 需要导入模块: from ctapipe.instrument import CameraGeometry [as 别名]
# 或者: from ctapipe.instrument.CameraGeometry import get_known_camera_names [as 别名]
import numpy as np
from astropy import units as u
from ctapipe.instrument import CameraGeometry
import pytest
cam_ids = CameraGeometry.get_known_camera_names()
def test_construct():
x = np.linspace(-10, 10, 100)
y = np.linspace(-10, 10, 100)
geom = CameraGeometry(cam_id=0, pix_id=np.arange(100),
pix_x=x * u.m, pix_y=y * u.m,
pix_area=x * u.m**2,
pix_type='rectangular',
pix_rotation="10d",
cam_rotation="12d")
assert geom.cam_id == 0
assert geom.pix_area is not None
assert (geom.pix_rotation.deg - 10) < 1e-5
assert (geom.cam_rotation.deg - 10) < 1e-5
def test_known_camera_names():
cams = CameraGeometry.get_known_camera_names()
assert len(cams) > 4
assert 'FlashCam' in cams
assert 'NectarCam' in cams
for cam in cams:
示例3: test_known_cameras
# 需要导入模块: from ctapipe.instrument import CameraGeometry [as 别名]
# 或者: from ctapipe.instrument.CameraGeometry import get_known_camera_names [as 别名]
def test_known_cameras():
cams = CameraGeometry.get_known_camera_names()
assert 'FlashCam' in cams
assert len(cams) > 3