def get_data(): """Get the population data.""" # Construct population pop = CosmicPopulation(SIZE, days=1, name='standard_candle', H_0=67.74, W_m=0.3089, W_v=0.6911, dm_host_model='gaussian', dm_host_mu=100, dm_host_sigma=0, dm_igm_index=1000, dm_igm_sigma=None, dm_mw_model='ne2001', emission_range=[10e6, 10e9], lum_range=[1e36, 1e36], lum_index=0., n_model='sfr', alpha=-1.5, w_model='uniform', w_range=[1., 1.], w_mu=0.1, w_sigma=0., si_mu=0., si_sigma=0., z_max=2.5) # Survey population pops = {} for b in BEAMPATTERNS: n_s = 0 bp = b if b.startswith('airy'): bp, n_s = b.split('-') n_s = int(n_s) survey = Survey(name='perfect-small') survey.gain_pattern = bp survey.n_sidelobes = n_s surv_pop = SurveyPopulation(pop, survey) pops[b] = surv_pop return pops
n_model='sfr', w_model='uniform', w_range=[1., 1.], w_mu=1., w_sigma=0., si_mu=0., si_sigma=0., z_max=2.5) pop_obs = {} survey = Survey('perfect-small', gain_pattern='airy') for sidelobe in SIDELOBES: survey.n_sidelobes = sidelobe # Observe populations pop_obs[sidelobe] = SurveyPopulation(pop, survey) pop_obs[sidelobe].name = f'obs-{sidelobe}' pop_obs[sidelobe].rates() pop_obs[sidelobe].save() plot_aa_style() f, (ax1) = plt.subplots(1, 1) for p in SIDELOBES: pop = pop_obs[p] limit = 1e-9