当前位置: 首页>>代码示例>>Python>>正文


Python CameraGeometry.get_known_camera_names方法代码示例

本文整理汇总了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()
开发者ID:dipierr,项目名称:ctapipe,代码行数:11,代码来源:test_camera.py

示例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:
开发者ID:dipierr,项目名称:ctapipe,代码行数:33,代码来源:test_camera.py

示例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
开发者ID:epuesche,项目名称:ctapipe,代码行数:6,代码来源:test_camera.py


注:本文中的ctapipe.instrument.CameraGeometry.get_known_camera_names方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。