Example #1
0
for subdirname, subdir in zip(subdirnames, subdirs):

    figure()
    ccount = 0
    patches = []
    labels = []

    for simname in simnames:

        simdat = data[simname]

        if simname == 'BCC':

            zlow = simdat[subdir]['redshifts'] < 0.36
            massbin, ratiobin, ratioerr = bbb.summary2DMass(simdat[subdir],
                                                            selection=zlow)
            fill_between(massbin,
                         ratiobin + ratioerr,
                         ratiobin - ratioerr,
                         alpha=0.3,
                         color=c[ccount],
                         label='{0} z < 0.36'.format(simname))
            patches.append(Rectangle((0, 0), 1, 1, fc=c[ccount], alpha=0.3))
            labels.append('{0} z < 0.36'.format(simname))
            ccount += 1

            zlow = np.logical_and(simdat[subdir]['redshifts'] > 0.36,
                                  simdat[subdir]['redshifts'] < 0.5)
            massbin, ratiobin, ratioerr = bbb.summary2DMass(simdat[subdir],
                                                            selection=zlow)
            fill_between(massbin,
Example #2
0
#####
## Bias
#
for mcr in mcrs:

    figure()

    linecount = 0
    ccount = 0

    for strategy in strategies:

        axhline(1.0, c='DimGray', linestyle='--')

        simdat = mxxldata[mcr][strategy]
        massbin, ratiobin, ratioerr = bbb.summary2DMass(simdat)
        plot(massbin,
             ratiobin,
             color=c[ccount],
             linestyle=linestyle[linecount],
             label=strategy)

        ccount += 1

    xlabel(r'Mass $M_{200}$', fontsize=16)
    ylabel(r'Ratio $M_{\mathrm{lensing}} / M_{\mathrm{true}}$', fontsize=16)
    axis([14.1, 15.2, 0.7, 1.3])
    legend(loc='upper left')
    title('MC Relation: {0}'.format(mcr))
    tight_layout()
    savefig('piscoproposal_{0}.png'.format(mcr))
Example #3
0
        if key not in data:
            print 'Missing %s' % ' '.join(key)
            continue

        simdat = data[key]

        print
        print key


        if simname == 'BCC':


            zlow = simdat['redshifts'] < 0.36
            massbin, massedge, ratiobin, ratioerr = bbb.summary2DMass(simdat, selection = zlow)

            

            print len(simdat['redshifts'][zlow]), len(massbin)

#            errorbar(massbin, ratiobin, ratioerr, massedge, marker='None', color=c[ccount], linestyle='None')
            xpoints, y_low, y_high = fillerrs(massbin, massedge, ratiobin, ratioerr)
#            fill_between(massbin, ratiobin + ratioerr, ratiobin - ratioerr, alpha=0.3, color = c[ccount], label='{0} z < 0.36'.format(simname))
            fill_between(xpoints, y_low, y_high, alpha=0.8, color = c[ccount], label='{0} z < 0.36'.format(simname))
            patches.append(Rectangle((0, 0), 1, 1, fc=c[ccount], alpha=0.8))
            labels.append('{0} z < 0.36'.format(simname))
            ccount += 1