本文整理汇总了Python中matplotlib.patches.Ellipse.pflux方法的典型用法代码示例。如果您正苦于以下问题:Python Ellipse.pflux方法的具体用法?Python Ellipse.pflux怎么用?Python Ellipse.pflux使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.patches.Ellipse
的用法示例。
在下文中一共展示了Ellipse.pflux方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: plotresults
# 需要导入模块: from matplotlib.patches import Ellipse [as 别名]
# 或者: from matplotlib.patches.Ellipse import pflux [as 别名]
#.........这里部分代码省略.........
island_offsets_x += xb.tolist()
island_offsets_y += yb.tolist()
marker = ax.text(N.max(xb)+2, N.max(yb), str(isl.island_id),
color='#afeeee', clip_on=True)
marker.set_visible(not marker.get_visible())
markers.append(marker)
# draw the gaussians with one colour per source or island
# (if gaul2srl was not run)
if hasattr(img, 'nsrc'):
nsrc = len(isl.sources)
for isrc in range(nsrc):
col = colours[isrc % 6]
style = styles[isrc/6 % 3]
src = isl.sources[isrc]
for g in src.gaussians:
if hasattr(g, 'valid'):
valid = g.valid
else:
valid = True
if g.jlevel == 0 and valid and g.gaus_num >= 0:
gidx = g.gaus_num
e = Ellipse(xy=g.centre_pix, width=g.size_pix[0],
height=g.size_pix[1], angle=g.size_pix[2]+90.0)
ax.add_artist(e)
e.set_picker(3)
e.set_clip_box(ax.bbox)
e.set_facecolor(col)
e.set_alpha(0.5)
e.gaus_id = gidx
e.src_id = src.source_id
e.jlevel = g.jlevel
e.isl_id = g.island_id
e.tflux = g.total_flux
e.pflux = g.peak_flux
e.centre_sky = g.centre_sky
if len(img.islands) > 0:
island_offsets = zip(N.array(island_offsets_x), N.array(island_offsets_y))
isl_borders = collections.AsteriskPolygonCollection(4, offsets=island_offsets, color=border_color,
transOffset=ax.transData, sizes=(10.0,))
ax.add_collection(isl_borders)
if hasattr(img, 'gaussians'):
for atrg in img.gaussians:
if atrg.jlevel > 0 and atrg.gaus_num >= 0:
col = 'r'
style = '-'
gidx = atrg.gaus_num
e = Ellipse(xy=atrg.centre_pix, width=atrg.size_pix[0], height=atrg.size_pix[1], angle=atrg.size_pix[2]+90.0)
ax.add_artist(e)
e.set_picker(3)
e.set_clip_box(ax.bbox)
e.set_edgecolor(col)
e.set_facecolor('none')
e.set_alpha(0.8)
e.gaus_id = gidx
e.src_id = atrg.source_id
e.jlevel = atrg.jlevel
e.isl_id = atrg.island_id
e.tflux = atrg.total_flux
e.pflux = atrg.peak_flux
e.centre_sky = atrg.centre_sky
if 'Flagged' in titles[i]:
for iisl, isl in enumerate(img.islands):
ax = pl.gca()
style = '-'