Vectorized rejection checking for binary star systems.

Provides fully vectorized numpy operations for ZAMS radius, Roche lobe radius, and physical rejection criteria used to discard unphysical binary systems prior to evolution.

cosmic.sample.stroopwafel.rejection.default_reject(binary_params, SSEDict=None, min_secondary_mass=0.08)[source]

Default rejection function for DCO progenitor systems.

Rejects systems where the secondary mass is below the minimum, the stars are in contact at ZAMS, or either star overflows its Roche lobe at periastron. The orbital separation is computed from the orbital period via Kepler’s third law, and both stars share the binary metallicity.

Parameters:
binary_paramsdict

Assembled binary parameters with keys 'mass_1', 'mass_2' (solar masses), 'porb' (days), 'ecc', and 'metallicity', each an (N,) array.

SSEDictdict, optional

COSMIC single stellar evolution settings. The ZAMS radii are obtained from Sample.set_reff, which depends on the stellar engine (e.g. sse vs METISSE); passing the same SSEDict used for evolution ensures the rejection radii are computed consistently. By default None (COSMIC’s sse engine). AdaptiveSampler wires its own SSEDict into this argument automatically.

min_secondary_massfloat, optional

Minimum allowed secondary mass in solar masses, by default 0.08

Returns:
numpy.ndarray

(N,) boolean mask where True indicates a rejected system.