* (g.band_wavelength[BAND] - params0['extinction_lambda0'])) #params0['extinction_tau0'] = scaled_tau0 params0['extinction_kappa'] = 0. # Load GAMA local optical LF data from Driver et al. (2012) data_gama = [] mag_gama, Phi_gama, err_gama = like.load_gama_lf(band=BAND, h=HUBBLE) # FIXME: Apply magnitude cut to avoid incompleteness effects mag_gama = mag_gama[:-3] Phi_gama = Phi_gama[:-3] err_gama = err_gama[:-3] #data_gama.append([mag_gama, Phi_gama, err_gama]) # Pre-calculate my halo model pkfile = "camb_pk_z0.dat" hm = g.HaloModel(pkfile, h=HUBBLE, om=OMEGA_M) #------------------------------------------------------------------------------- def optical_lumfn(obsmag, band, params, z=0.): """ Calculate optical luminosity function in some band, for a given set of model parameters. """ # Include dust attenuation correction in the optical dndmag_sfms, dndmag_pass = g.optical_mag_fn_atten(hm, obsmag, band, z=z, params=params)
# Best-fit: optical g,z, radio, no SMF #params = {'sfr_sfms_sigma': 0.415595676119, 'mass_mstar_min': 6.0, 'opt_bands': ['u', 'g', 'r', 'i', 'z'], 'fpass_alpha0': 10.839733046599999, 'fpass_alpha1': 0.5, 'sfr_pass_pthres': 0.05, 'fpass_zeta': -0.95027169466200001, 'ms_cen_nu': -0.72, 'mass_mstar_max': 14.0, 'opt_pdf_sigma': [0.28122634653850337, 0.25232918833346546, 0.2468073941298409, 0.25273681573440887, 0.2724513351999828], 'extinction_alpha': -7.57886, 'extinction_beta': 5.3450337472999996, 'sfr_pass_beta': 0.37, 'extinction_diskfac': 10.2412022264, 'mass_mhalo_max': 16.0, 'ms_cen_sigma1': 0.56640755541800003, 'opt_offset': [-27.3176081, -25.9445857, -25.2836569, -24.981922, -24.8096689], 'opt_cross_amp': [-3.61194266, -2.70027825, -2.01635745, -1.72575487, -1.56393268], 'opt_mstar_beta': -0.000242854097, 'mhi_omegaHI': 0.0001, 'ms_cen_mu': 0.019, 'nsamp_mstar': 300, 'ms_cen_norm': 0.015185988130400001, 'opt_cross_beta': -0.262636097, 'ms_cen_gamma0': 0.56119468698499997, 'ms_cen_gamma1': -0.26, 'extinction_amp': 0.33240776116999998, 'mass_mhalo_min': 5.0, 'ms_cen_xi': 4.25, 'opt_cross_gamma': 0.290177366, 'opt_mstar_amp': 3876.55879, 'ms_cen_logM2': 11.8, 'ms_cen_logM1': 12.488922480999999, 'sfr_pass_gamma': 1.9, 'sfr_min': -5.0, 'sfr_pass_mshift': 0.0083967790705399992, 'ms_cen_sigmainf': 0.025222009908500001, 'sfr_pass_sfrmin': 1e-07, 'sfr_sfms_gamma': 1.9, 'sfr_pass_mscale': 1.0, 'sfr_sfms_mscale': 1.0, 'sfr_sfms_beta': 0.99195297218300005, 'nsamp_mhalo': 300, 'sfr_sfms_alpha1': 1.07, 'sfr_sfms_alpha0': -0.0581345697711, 'opt_pdf_mean': [-0.06587481168919591, -0.053777765775930214, -0.01854712885192855, -0.008538656095465969, -0.008732300503716532], 'nsamp_sfr': 300, 'sfr_pass_sigma': 0.011843956765499999, 'ms_cen_beta0': 1.2756497875999999, 'ms_cen_beta1': 0.17, 'opt_mstar_c': -1.0108709, 'sfr_max': 4.0, 'fpass_beta': -2.7139265055099999, 'sfr_pass_type': 'shifted sfms', 'sfr_pass_alpha1': 0.0, 'sfr_pass_alpha0': -5.0, 'mhi_vc1': 200.0, 'mhi_vc0': 50.0} # Best-fit: optical g,z, radio, SMF #params = {'sfr_sfms_sigma': 0.095346928085199997, 'mass_mstar_min': 6.0, 'opt_bands': ['u', 'g', 'r', 'i', 'z'], 'fpass_alpha0': 10.9257522857, 'fpass_alpha1': 0.5, 'sfr_pass_pthres': 0.05, 'fpass_zeta': -0.356976178955, 'ms_cen_nu': -0.72, 'mass_mstar_max': 14.0, 'opt_pdf_sigma': [0.28122634653850337, 0.25232918833346546, 0.2468073941298409, 0.25273681573440887, 0.2724513351999828], 'extinction_alpha': -7.57886, 'extinction_beta': 6.3819123521099996, 'sfr_pass_beta': 0.37, 'extinction_diskfac': -1.0095804421400001, 'mass_mhalo_max': 16.0, 'ms_cen_sigma1': 0.35055806168300002, 'opt_offset': [-27.3176081, -25.9445857, -25.2836569, -24.981922, -24.8096689], 'opt_cross_amp': [-3.61194266, -2.70027825, -2.01635745, -1.72575487, -1.56393268], 'opt_mstar_beta': -0.000242854097, 'mhi_omegaHI': 0.0001, 'ms_cen_mu': 0.019, 'nsamp_mstar': 200, 'ms_cen_norm': 0.021171742042100001, 'opt_cross_beta': -0.262636097, 'ms_cen_gamma0': 0.607698300016, 'ms_cen_gamma1': -0.26, 'extinction_amp': 2.2483719206999999, 'mass_mhalo_min': 5.0, 'ms_cen_xi': 4.25, 'opt_cross_gamma': 0.290177366, 'opt_mstar_amp': 3876.55879, 'ms_cen_logM2': 11.8, 'ms_cen_logM1': 12.0862669462, 'sfr_pass_gamma': 1.9, 'sfr_min': -5.0, 'sfr_pass_mshift': 0.0013389284153300001, 'ms_cen_sigmainf': 0.023304494212900002, 'sfr_pass_sfrmin': 1e-07, 'sfr_sfms_gamma': 1.9, 'sfr_pass_mscale': 1.0, 'sfr_sfms_mscale': 1.0, 'sfr_sfms_beta': 1.5871068530100001, 'nsamp_mhalo': 200, 'sfr_sfms_alpha1': 1.07, 'sfr_sfms_alpha0': -0.455230306503, 'opt_pdf_mean': [-0.06587481168919591, -0.053777765775930214, -0.01854712885192855, -0.008538656095465969, -0.008732300503716532], 'nsamp_sfr': 200, 'sfr_pass_sigma': 0.63368804654999999, 'ms_cen_beta0': 1.0826299856799999, 'ms_cen_beta1': 0.17, 'opt_mstar_c': -1.0108709, 'sfr_max': 4.0, 'fpass_beta': -1.0535586695200001, 'sfr_pass_type': 'shifted sfms', 'sfr_pass_alpha1': 0.0, 'sfr_pass_alpha0': -5.0, 'mhi_vc1': 200.0, 'mhi_vc0': 50.0} # Get current best-fit model params = params_bf MSTAR_MIN = None HUBBLE = 0.67 # Load my halo model pkfile = "camb_pk_z0.dat" hm = g.HaloModel(pkfile, h=0.67, om=0.32) #------------------------------------------------------------------------------- # Set-up gridspec P.figure(figsize=(8, 8)) gs = gridspec.GridSpec(2, 1) gs.update(wspace=0.0, hspace=0.0) #------------------------------------------------------------------------------- # Load SDSS-GALEX stellar mass function mstar_sdss, sf_phi_sdss, sf_errp_sdss, sf_errm_sdss, \ qu_phi_sdss, qu_errp_sdss, qu_errm_sdss \ = like.load_sdss_smf(h=HUBBLE, mstar_min=MSTAR_MIN, convert_errors=True) # Trim low-mass datapoints