Example #1
0
                  coord[1],
                  int(num),
                  size=6,
                  ha='center',
                  va='center')
    ellipse = Ellipse(xy=coord,
                      width=2. * axis1 / resolution,
                      height=2. * axis2 / resolution,
                      angle=angle)
    ellipse.fill = False
    if inner > 0 and idx < inner:
        ellipse.fill = True
        ellipse.edgecolor = 'auto'
        inner_idx.append(int(num))
        if idx == 0:
            ellipse.facecolor = '#4169E1'
        else:
            ellipse.facecolor = '#0F52BA'
    axis.add_artist(ellipse)
margin = 1.1 * max(np.sqrt(np.sum(np.square(beam_coordinate), axis=1)))
axis.set_xlim(center[0] - margin, center[0] + margin)
axis.set_ylim(center[1] - margin, center[1] + margin)

if args.extra_source is not None:
    extra_coords = np.genfromtxt(args.extra_source[0], dtype=None)
    if len(extra_coords.shape) == 1:
        extra_coords = extra_coords.reshape(1, -1)
    extra_equatorial_coordinates = SkyCoord(extra_coords[:, 1].astype(str),
                                            extra_coords[:, 2].astype(str),
                                            frame='fk5',
                                            unit=(u.hourangle, u.deg))