setup = {'BX': {'colors': ['goldenrod', 'tan', 'y'], 'maglim': 25.5, 'decband': 'R'},\ 'u': {'colors': ['darkblue', 'deepskyblue', 'b'], 'maglim': 24.6, 'decband': 'R'},\ 'g': {'colors': ['darkgreen', 'limegreen', 'g'], 'maglim': 25.8, 'decband': 'i'},\ 'r': {'colors': ['darkred', 'indianred', 'r'], 'maglim': 25.8, 'decband': 'z'}} mlim = setup[band]['maglim'] ## pz = get_pz(band) ## Interloper GP rewrite. _, _, _, _, ngp = gp_pz(band, 'Full', 5.5) pz = np.vectorize(ngp) ## bz = lambda z: bz_callmodel(z, mlim) nbar = get_shot(band, mlim) nbar /= (4. * np.pi / 41253.) ## Sq. deg. to steradian. ## int_frac = 0.06 nbar_wint = (1.0 + int_frac) * nbar decband = setup[band]['decband'] colors = setup[band]['colors'] peakz = _peakz(pz) ## Hard p(z) limits. zmin = 0.01
import numpy as np import pylab as pl from get_bz import bz_callmodel ## Photometric. ## print(bz_callmodel(2.2, 24.0)) print(bz_callmodel(3.0, 24.6)) print(bz_callmodel(4.0, 25.8)) print(bz_callmodel(5.0, 25.8)) print('\n\n') ## Spectroscopic. print(bz_callmodel(2.2, 24.0)) print(bz_callmodel(3.0, 24.0)) print(bz_callmodel(4.0, 25.5)) print(bz_callmodel(5.0, 25.5))
band = 'u' setup = {'BX': {'colors': ['goldenrod', 'tan', 'y'], 'spec-maglim': 24.0, 'phot-maglim': 25.5,'decband': 'R', 'file': 'BXDrop.dat'},\ 'u': {'colors': ['darkblue', 'deepskyblue', 'b'], 'spec-maglim': 24.0, 'phot-maglim': 24.6,'decband': 'R', 'file': 'MalkanDrop.dat'},\ 'g': {'colors': ['darkgreen', 'limegreen', 'g'], 'spec-maglim': 25.5, 'phot-maglim': 25.8,'decband': 'i', 'file': 'gDrop.dat'},\ 'r': {'colors': ['darkred', 'indianred', 'r'], 'spec-maglim': 25.5, 'phot-maglim': 25.8,'decband': 'z', 'file': 'rDrop.dat'}} file = setup[band]['file'] colors = setup[band]['colors'] spec_mlim = setup[band]['spec-maglim'] phot_mlim = setup[band]['phot-maglim'] ## Spectroscopic sample p(z) and b(z). ps = get_pz(band) bs = lambda z: bz_callmodel(z, spec_mlim) ## Get the z percentiles for this dropout p(z). percentiles = percentiles(ps, printit=True) ## Photometric sample p(z). pp = get_pz(band) peakz = _peakz(ps) zmin = peakz - 1.0 zmax = peakz + 1.0 ## Get dropout Schechter photometric sample counts for given band. root = os.environ['LBGCMB'] data = np.loadtxt(root + '/dropouts/schechter/dat/%s' % file)