Esempio n. 1
0
    #cbar.set_clim([-90,-50])

    for radius_deg in [20, 40, 60, 80]:
        r = np.sin(radius_deg * np.pi / 180.)
        x = np.linspace(-r, r, 100)
        beam_plot.plot(x, np.sqrt(r**2 - x**2), 'w-', linewidth=3)
        beam_plot.plot(x, -np.sqrt(r**2 - x**2), 'w-', linewidth=3)

    # Cuts plot initialization
    cuts_plot = fig.add_subplot(gsr[1])

    #receiver coordinates
    ell = np.linspace(-np.pi / 2, np.pi / 2)
    az = np.zeros_like(ell)
    xticks = [-90, -60, -40, -20, 0, 20, 40, 60, 90]
    beam_slice_E = get_interp_val(hpx_beam, ell, az)
    beam_slice_E_err = get_interp_val(hpx_rms, ell, az)
    beam_slice_H = get_interp_val(hpx_beam, ell, az + np.pi / 2)
    beam_slice_H_err = get_interp_val(hpx_rms, ell, az + np.pi / 2)

    cuts_E_line = cuts_plot.errorbar(ell * 180 / np.pi,
                                     beam_slice_E,
                                     beam_slice_E_err,
                                     fmt='b.',
                                     label='ECHO [E]')
    cuts_H_line = cuts_plot.errorbar(ell * 180 / np.pi,
                                     beam_slice_H,
                                     beam_slice_H_err,
                                     fmt='r.',
                                     label='ECHO [H]')
    cuts_plot.legend(loc='lower center')
Esempio n. 2
0
    #cbar.set_clim([-90,-50])

    for radius_deg in [20,40,60,80]:
        r = np.sin(radius_deg*np.pi/180.)
        x = np.linspace(-r,r,100)
        beam_plot.plot(x,np.sqrt(r**2-x**2),'w-',linewidth=3)
        beam_plot.plot(x,-np.sqrt(r**2-x**2),'w-',linewidth=3)

    # Cuts plot initialization
    cuts_plot = fig.add_subplot(gsr[1])

    #receiver coordinates
    ell = np.linspace(-np.pi/2,np.pi/2)
    az = np.zeros_like(ell)
    xticks = [-90,-60,-40,-20,0,20,40,60,90]
    beam_slice_E = get_interp_val(hpx_beam,ell,az)
    beam_slice_E_err = get_interp_val(hpx_rms,ell,az)
    beam_slice_H = get_interp_val(hpx_beam,ell,az+np.pi/2)
    beam_slice_H_err = get_interp_val(hpx_rms,ell,az+np.pi/2)

    cuts_E_line = cuts_plot.errorbar(ell*180/np.pi,
                                     beam_slice_E,
                                     beam_slice_E_err,
                                     fmt='b.',
                                     label='ECHO [E]')
    cuts_H_line = cuts_plot.errorbar(ell*180/np.pi,
                                     beam_slice_H,
                                     beam_slice_H_err,
                                     fmt='r.',
                                     label='ECHO [H]')
    cuts_plot.legend(loc='lower center')
Esempio n. 3
0
ell = np.linspace(-np.pi/2,np.pi/2)
az = np.zeros_like(ell)
xticks = [-90,-60,-40,-20,0,20,40,60,90]

# Setup figure
fig = figure(figsize=(18,10))
gs = gridspec.GridSpec(2,4)


# Setup base_beam(rms)
base_beam = hp.read_map(opts.base_beam)
base_beam = hp.ma(base_beam,badval=badval)
base_rms = hp.read_map(opts.base_beam.replace('beam','rms'))
base_rms = hp.ma(base_rms,badval=badval)
base_slice_H = get_interp_val(base_beam,ell,az)
base_slice_H_err = get_interp_val(base_rms,ell,az)
base_slice_E = get_interp_val(base_beam,ell,az+np.pi/2)
base_slice_E_err = get_interp_val(base_rms,ell,az+np.pi/2)
base_coll = make_polycoll(base_beam,nsides=opts.nsides)


# Setup adj_beam(rms)
adj_beam = hp.read_map(opts.adjusted_beam)
adj_beam = hp.ma(adj_beam,badval=badval)
adj_rms = hp.read_map(opts.adjusted_beam.replace('beam','rms'))
adj_rms = hp.ma(adj_rms,badval=badval)
adj_slice_H = get_interp_val(adj_beam,ell,az)
adj_slice_H_err = get_interp_val(adj_rms,ell,az)
adj_slice_E = get_interp_val(adj_beam,ell,az+np.pi/2)
adj_slice_E_err = get_interp_val(adj_rms,ell,az+np.pi/2)