kilopop.kilonovae.bns_kilonovae_population_distribution
- class kilopop.kilonovae.bns_kilonovae_population_distribution(population_size=50000, only_draw_parameters=True, chunksize=500, **kwargs)[source]
Bases:
object
Class to construct population from Setzer et al. 2022.
This class holds attributes which are vectors of each parameter of the population.
The user can generate a new population, based on size, otherwise the population from the paper is imported.
- Returns:
bns_kilonovae_population_distribution – Attributes of the class object are self.paramsi where i is in range(12) and are arrays of the distributions corresponding to each parameter.
- Return type:
class instance
- __init__(population_size=50000, only_draw_parameters=True, chunksize=500, **kwargs)[source]
- Parameters:
population_size (int) – The size of the population to be drawn from the population. Default is 50000.
only_draw_parameters (boolean (optional)) – Flag whether to generate only the parameter distributions, or to also simulate the lightcurves and derive the properties presented in the paper. Default is True.
chunksize (int (optional)) – If computing properties from the lightcurves this option will batch the computation into chunks for multiprocessing. Default is 500.
- __call__(**kwargs)
Call self as a function.
Methods
__init__
([population_size, ...])- param population_size:
The size of the population to be drawn from the population. Default is 50000.
Wrapper function to execute the per-kilonova population draws and computation of light curve properties in parallel.
- compute_lightcurve_properties_per_kilonova(id, **kwargs)[source]
Wrapper function to execute the per-kilonova population draws and computation of light curve properties in parallel.
- Parameters:
id (int) – The id of the transient being generated for record keeping
- Returns:
parameter_dict – Dictionary construct containing all the parameters set for the population.
- Return type:
dict