本文整理汇总了Python中ctapipe.visualization.CameraDisplay.set_limits_minmax方法的典型用法代码示例。如果您正苦于以下问题:Python CameraDisplay.set_limits_minmax方法的具体用法?Python CameraDisplay.set_limits_minmax怎么用?Python CameraDisplay.set_limits_minmax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ctapipe.visualization.CameraDisplay
的用法示例。
在下文中一共展示了CameraDisplay.set_limits_minmax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw_neighbors
# 需要导入模块: from ctapipe.visualization import CameraDisplay [as 别名]
# 或者: from ctapipe.visualization.CameraDisplay import set_limits_minmax [as 别名]
def draw_neighbors(geom, pixel_index, color='r', **kwargs):
"""Draw lines between a pixel and its neighbors"""
neigh = geom.neighbors[pixel_index] # neighbor indices (not pixel ids)
x, y = geom.pix_x[pixel_index].value, geom.pix_y[pixel_index].value
for nn in neigh:
nx, ny = geom.pix_x[nn].value, geom.pix_y[nn].value
plt.plot([x, nx], [y, ny], color=color, **kwargs)
if __name__ == '__main__':
# Load the camera
geom = CameraGeometry.from_name("LSTCam")
disp = CameraDisplay(geom)
disp.set_limits_minmax(0, 300)
disp.add_colorbar()
# Create a fake camera image to display:
model = toymodel.generate_2d_shower_model(centroid=(0.2, 0.0),
width=0.01,
length=0.1,
psi='35d')
image, sig, bg = toymodel.make_toymodel_shower_image(geom, model.pdf,
intensity=50,
nsb_level_pe=1000)
# Apply image cleaning
cleanmask = tailcuts_clean(geom, image, picture_thresh=200,
boundary_thresh=100)