Exemple #1
0
def main():
    np.random.seed(42)

    data = json.load(open('../models/l035_scores.json'))

    stamps = np.array(data['stamps'])
    scores = np.array(data['scores'])

    l = stamps[:, 1]
    b = stamps[:, 2]

    good = (scores > .1) & (l < 34.8) & (l > 34.6) & (b > -.4) & (b < -0.2)
    assert good.sum() > 0

    stamps = stamps[good]
    scores = scores[good]

    merged, ms = merge(stamps, scores)

    f = get_field(35)
    g = scale(f.i4, limits=[70, 99])
    r = scale(f.mips, limits=[70, 99])
    b = r * 0

    im = np.dstack((r, g, b))

    plt.figure(dpi=200, tight_layout=True)
    plt.imshow(im, extent=[36, 34, -1, 1], interpolation="bicubic")

    plot_stamps(stamps, linewidth=1, edgecolor='white', label='Raw',
                alpha=1)
    plot_stamps(merged, edgecolor='red', alpha=1, linewidth=2,
                label='Merged')

    plt.xlim(34.795, 34.695)
    plt.ylim(-.365, -.265)


    plt.xlabel("$\ell$ ($^\circ$)")
    plt.ylabel("b ($^\circ$)")
    leg = plt.legend(loc='upper left', frameon=False)
    for text in leg.get_texts():
        text.set_color('white')

    plt.savefig('cluster.eps')
def main():

    data = json.load(open('../models/l035_scores.json'))

    stamps = np.array(data['stamps'])
    scores = np.array(data['scores'])

    l = stamps[:, 1]
    b = stamps[:, 2]

    good = (scores > .1) & (l < 35.17) & (l > 34.9) & (b > -.9) & (b < -0.6)

    stamps = stamps[good]
    scores = scores[good]

    merged = merge(stamps, scores)
    mwp = np.array(bubble_params())
    mwp  = mwp[(mwp[:, 1] < 35.3) & (mwp[:, 1] > 35)]

    f = get_field(35)
    bad = f.mips == 0
    g = scale(f.i4, limits=[30, 99.8])
    r = scale(f.mips, limits=[30, 99.7])
    r[bad] = 255
    b = r * 0

    im = np.dstack((r, g, b))

    plt.figure(dpi=200, tight_layout=True)
    plt.imshow(im, extent=[36, 34, -1, 1], interpolation="bicubic")

    plot_stamps(merged, edgecolor='#7570b3', linewidth=2, label='Brut')
    plot_stamps(mwp, edgecolor='#e7298a', linewidth=2, label='MWP')

    plt.xlim(35.2, 35)
    plt.ylim(-.825, -.625)
    plt.legend(loc='upper right')

    plt.xlabel("$\ell$ ($^\circ$)")
    plt.ylabel("b ($^\circ$)")

    plt.savefig('cluster_confusion.eps')
Exemple #3
0
def main():
    np.random.seed(42)

    data = json.load(open('../models/l035_scores.json'))

    stamps = np.array(data['stamps'])
    scores = np.array(data['scores'])

    l = stamps[:, 1]
    b = stamps[:, 2]

    good = (scores > .1) & (l < 34.8) & (l > 34.6) & (b > -.4) & (b < -0.2)
    assert good.sum() > 0

    stamps = stamps[good]
    scores = scores[good]

    merged, ms = merge(stamps, scores)

    f = get_field(35)
    g = scale(f.i4, limits=[70, 99])
    r = scale(f.mips, limits=[70, 99])
    b = r * 0

    im = np.dstack((r, g, b))

    plt.figure(dpi=200, tight_layout=True)
    plt.imshow(im, extent=[36, 34, -1, 1], interpolation="bicubic")

    plot_stamps(stamps, linewidth=1, edgecolor='white', label='Raw', alpha=1)
    plot_stamps(merged, edgecolor='red', alpha=1, linewidth=2, label='Merged')

    plt.xlim(34.795, 34.695)
    plt.ylim(-.365, -.265)

    plt.xlabel("$\ell$ ($^\circ$)")
    plt.ylabel("b ($^\circ$)")
    leg = plt.legend(loc='upper left', frameon=False)
    for text in leg.get_texts():
        text.set_color('white')

    plt.savefig('cluster.eps')
Exemple #4
0
def main():

    data = json.load(open('../models/l035_scores.json'))

    stamps = np.array(data['stamps'])
    scores = np.array(data['scores'])

    l = stamps[:, 1]
    b = stamps[:, 2]

    good = (scores > .1) & (l < 35.17) & (l > 34.9) & (b > -.9) & (b < -0.6)

    stamps = stamps[good]
    scores = scores[good]

    merged = merge(stamps, scores)
    mwp = np.array(bubble_params())
    mwp = mwp[(mwp[:, 1] < 35.3) & (mwp[:, 1] > 35)]

    f = get_field(35)
    bad = f.mips == 0
    g = scale(f.i4, limits=[30, 99.8])
    r = scale(f.mips, limits=[30, 99.7])
    r[bad] = 255
    b = r * 0

    im = np.dstack((r, g, b))

    plt.figure(dpi=200, tight_layout=True)
    plt.imshow(im, extent=[36, 34, -1, 1], interpolation="bicubic")

    plot_stamps(merged, edgecolor='#7570b3', linewidth=2, label='Brut')
    plot_stamps(mwp, edgecolor='#e7298a', linewidth=2, label='MWP')

    plt.xlim(35.2, 35)
    plt.ylim(-.825, -.625)
    plt.legend(loc='upper right')

    plt.xlabel("$\ell$ ($^\circ$)")
    plt.ylabel("b ($^\circ$)")

    plt.savefig('cluster_confusion.eps')