def standard_candle_pop(self): """Generate a standard candle population.""" pop = CosmicPopulation(self.n, days=1, name=self.name, H_0=67.74, W_m=0.3089, W_v=0.6911, dm_host_model='normal', 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, pulse_model='uniform', pulse_range=[1., 1.], pulse_mu=0.1, pulse_sigma=0., si_mu=0., si_sigma=0., z_max=2.5) pop.save() return pop
def gamma_pop(self): """Generate a population varying with spectral index.""" pop = CosmicPopulation(self.n, days=1, name=self.name, H_0=67.74, W_m=0.3089, W_v=0.6911, dm_host_model='normal', dm_host_mu=0., dm_host_sigma=0., dm_igm_index=0., dm_igm_sigma=None, dm_mw_model='zero', emission_range=[10e6, 10e9], lum_range=[10**42.5, 10**42.5], lum_index=0., n_model='vol_co', alpha=-1.5, pulse_model='uniform', pulse_range=[10, 10], pulse_mu=0.1, pulse_sigma=1., si_mu=self.gamma, si_sigma=0., z_max=2.5) pop.save() return pop
def alpha_simple_pop(self): """Generate a simple local population varying with alpha.""" pop = CosmicPopulation(self.n, days=1, name=self.name, H_0=67.74, W_m=0.3089, W_v=0.6911, dm_host_model='normal', dm_host_mu=0., dm_host_sigma=0., dm_igm_index=0., dm_igm_sigma=None, dm_mw_model='zero', emission_range=[10e6, 10e9], lum_range=[1e38, 1e38], lum_index=0., n_model='vol_co', alpha=self.alpha, pulse_model='uniform', pulse_range=[10, 10], pulse_mu=0.1, pulse_sigma=1., si_mu=0., si_sigma=0., z_max=0.01) pop.save() return pop
def alpha_pop(self): """Generate a population varying with alpha.""" pop = CosmicPopulation(self.n, days=1, name=self.name, H_0=67.74, W_m=0.3089, W_v=0.6911, dm_host_model='normal', dm_host_mu=100, dm_host_sigma=200, dm_igm_index=1000, dm_igm_sigma=None, dm_mw_model='ne2001', emission_range=[10e6, 10e9], lum_range=[1e40, 1e45], lum_index=0., n_model='vol_co', alpha=self.alpha, pulse_model='lognormal', pulse_range=[1., 1.], pulse_mu=0.1, pulse_sigma=0.5, si_mu=-1.4, si_sigma=1., z_max=2.5) pop.save() return pop
dm_igm_index=1200, dm_igm_sigma=0, dm_mw_model='zero', emission_range=[10e6, 10e9], lum_range=[1e36, 1e36], lum_index=0, n_model='sfr', pulse_model='uniform', pulse_range=[1., 1.], pulse_mu=1., pulse_sigma=0., repeat=0., si_mu=0., si_sigma=0., z_max=2.5) pop.save() pop_obs = {} if OBSERVE: if not CREATE: pop = unpickle(f'simple') for pattern in BEAMPATTERNS: # Create Survey survey = Survey('perfect-small', gain_pattern=pattern, n_sidelobes=0) # Observe populations pop_obs[pattern] = SurveyPopulation(pop, survey)
# Generate population following star forming rate pop_sfr = CosmicPopulation(n_per_day * days, days=days, z_max=3., n_model='sfr', name='sfr') # Generate population following stellar mass density pop_smd = CosmicPopulation(n_per_day * days, days=days, z_max=3., n_model='smd', name='smd') pop_cst.save() pop_sfr.save() pop_smd.save() else: pop_cst = unpickle('vol_co') pop_sfr = unpickle('sfr') pop_smd = unpickle('smd') fig = plt.figure() ax = fig.add_subplot(111) # Get redshift of population zs = {} zs['sfr'] = pop_sfr.frbs.z zs['smd'] = pop_smd.frbs.z