convolution_by_sampling module
Routines for convolution-by-sampling
initial idea with simple situation
sfr [Msun /yr], global fixed Z
partially grid-like
with a SFR evaluated in lookback time in bins, with t_l,i lookback times and dt_l,i binsize and edges t_l,i-0.5, t_l,i+0.5
in a given bin we have the total mass formed in stars sfr(t_l=t_l,i) * dt_l,i = m_tot,i
now, we have some systems of interest (e.g. dwd), gained through pop-synth simulations. these have a.o. the property normalized yield, i..e number per formed solar mass
Y_j [Msun]
total number of system j sampled; Y_j * M_tot,i = N_j
if N_j > 1: - take X systems where X = floor(N_j) - N_j-x is then < 1 - take random number from uniform dist, P. if P < N_j-x: accept, else not
then we have a bunch of systems (which can include the same system) but in that array, assign random lookback time between the bin edges
assign radnom position
this sampling stategy can be multiprocssed easily (lookback time bins) can
also easily be extended to include metallicity naturally handles unequal
yield per systems
Notes: - this method does not turn things around like the others do. We start at a given lookback time bin for all systems. We sample a set of systems based on the total starformation within that lookback time bin, and the normalized yields of the systems. We then assign a birth lookback time to the systems (taken randomly between the bin edges)
- syntheticstellarpopconvolve.convolution_by_sampling.convolution_by_sampling_post_convolution_hook_wrapper(config, sfr_dict, data_dict, time_bin_info_dict, convolution_instruction, convolution_results, persistent_data=None, previous_convolution_results=None)[source]
Function to wrap the post-convolution function call for event-convolution by sampling.
rules: - additional data can be added to the result_dict - the number of systems can lower than before the call