示例#1
0
    xticks = ax.get_xticks()
    yticks = ax.get_yticks()

    # xlabels = np.round(xticks * evn38.pixel_scale * 3600e3, 1)
    # ylabels = np.round(yticks * evn38.pixel_scale * 3600e3, 1)
    # ax.set_xticklabels(xlabels)
    # ax.set_yticklabels(ylabels)

    if i in[0, 1]:
        # ax = func.draw_beam(ax,
        #                     evn38.beam_size[0] / evn38.pixel_scale, 
        #                     evn38.beam_size[1] / evn38.pixel_scale, 
        #                     evn38.beam_PA)
        ax = func.draw_beam(ax,
                            vlba.beam_size[0] / vlba.pixel_scale, 
                            vlba.beam_size[1] / vlba.pixel_scale, 
                            vlba.beam_PA)
        xlabels = np.round(xticks * vlba.pixel_scale * 3600e3, 1)
        ylabels = np.round(yticks * vlba.pixel_scale * 3600e3, 1)
        ax.set_xticklabels(xlabels)
        ax.set_yticklabels(ylabels)
    elif i in [2, 3]:
        ax = func.draw_beam(ax,
                            evn38.beam_size[0] / evn38.pixel_scale, 
                            evn38.beam_size[1] / evn38.pixel_scale, 
                            evn38.beam_PA)
        xlabels = np.round(xticks * evn38.pixel_scale * 3600e3, 1)
        ylabels = np.round(yticks * evn38.pixel_scale * 3600e3, 1)
        ax.set_xticklabels(xlabels)
        ax.set_yticklabels(ylabels)
    elif i in [4, 5]:
示例#2
0
for i, data in enumerate(datas):
    levels = measure.contour_levels(data["rms"], data["data"].max(), base = data["base"], step=math.sqrt(2))
    axA = axs[i*2]
    cnt = axA.contour(
        np.arange(data["left"], data["right"], data["scale"]),
        np.arange(data["top"], data["bottom"], data["scale"]),
        data["data"],
        levels = levels, colors=colors[i], lw=3
    )
    lines.append(cnt.collections[0])
    axA.set_xlim(-30, 10)
    axA.set_ylim(-10, 10)
    axA.set_aspect("equal")
    axA.set_ylabel("x2 (mas)")
    axA.set_xlabel("x1 (mas)")
    axA = func.draw_beam(axA, data["beam_size"][0]*3600e3, data["beam_size"][1]*3600e3, data["beam_PA"], x1=-28, x2=-7)

## Image B
datas = []
for dataset in datasets:
    if not hasattr(dataset, "filenameB"):
        dataset.filenameB = dataset.filename
    if not hasattr(dataset, "beam_size_B"):
        dataset.beam_size_B = dataset.beam_size
    if not hasattr(dataset, "beam_PA_B"):
        dataset.beam_PA_B = dataset.beam_PA
    if not hasattr(dataset, "rms_B"):
        dataset.rms_B = dataset.rms
    if not hasattr(dataset, "base_B"):
        dataset.base_B = dataset.base
    pixels = pf.getdata(dataset.filenameB)[0,0,:,:]