Preset hit-definition functions for common DCO selections.

Each preset factory returns a callable with signature (bpp) -> (n_hits, hit_bin_nums) where hit_bin_nums are the bin_num values of systems classified as hits.

cosmic.sample.stroopwafel.presets.any_dco(kstar_1, kstar_2)[source]

Create a hit function selecting DCOs regardless of merge time.

Parameters:
kstar_1list of int

Allowed kstar types for star 1.

kstar_2list of int

Allowed kstar types for star 2.

Returns:
callable

Function with signature (bpp) -> (n_hits, hit_bin_nums) where bpp is a pandas.DataFrame and hit_bin_nums is a numpy.ndarray of bin_num values.

cosmic.sample.stroopwafel.presets.merging_dco(kstar_1, kstar_2, max_merge_time=13.7)[source]

Create a hit function selecting merging double compact objects.

Parameters:
kstar_1list of int

Allowed kstar types for star 1 (e.g., [14] for black holes).

kstar_2list of int

Allowed kstar types for star 2 (e.g., [14] for black holes).

max_merge_timefloat, optional

Maximum merger time in Gyr, by default 13.7 (Hubble time)

Returns:
callable

Function with signature (bpp) -> (n_hits, hit_bin_nums) where bpp is a pandas.DataFrame and hit_bin_nums is a numpy.ndarray of bin_num values.