Paper 1 API reference
These are the entry points for the workflows in Paper 1 science workflows. The signatures come from the installed 0.1.0 wheel. Research interfaces may change between snapshots.
Impulse, survival and remnant physics
Use phase_state to obtain separation and radial and tangential relative
velocity from an eccentric orbit. Supply a kick vector in the radial,
tangential and orbital-normal frame to post_sn_state. It returns specific
orbital energy and squared specific angular momentum. Negative energy
indicates survival. Convert bound results to semi-major axis and squared
eccentricity with eps_h2_to_a_e2.
- ad_sn_popsyn.orbit.phase_state(a, e, E, m_total)
- ad_sn_popsyn.orbit.post_sn_state(r, v_r, v_t, w_vec, m_total_new)
- ad_sn_popsyn.orbit.eps_h2_to_a_e2(eps, h2, m_total_new)
For an isotropic direction at fixed speed, p_bound_fixed_phase returns
the bound probability. p_bound_phase_marginal also averages over the time
spent at each orbital phase. For mass and kick atoms in the COSMIC-like
prescription, use engine_cosmic.sn_atoms. Match its remnant model and the
kick law to the intended experiment.
- ad_sn_popsyn.kernels.p_bound_fixed_phase(w, r, v2, m_total_new)
- ad_sn_popsyn.kernels.p_bound_phase_marginal(w, a, e, m_total, m_total_new, n_phase=32)
- ad_sn_popsyn.engine_cosmic.sn_atoms(m_co, m_he, m_total, companion_mass, sep_rsun, metallicity, p, n_gh=5, stripped=1.0, x_c=nan)
Progenitor support and archive
extract reduces COSMIC evolution records and initial conditions to a
chronological stage record. The archive predicates distinguish the
pre-collapse state from the subsequent outcome. load_tables constructs
the empirical pre-SN2 arrival input from archived tables. prior_weights
applies a period tilt and renormalizes across the retained arrivals.
configurations reads a saved bounded pre-SN1 prior and places integration
nodes for evolving fits. These inputs represent different stages and
answer different inference questions.
- ad_sn_popsyn.stage_archive.extract(bpp, initial, kick_info=None)
- ad_sn_popsyn.stage_archive.circular_arrival(t, minimum_exploder=1.4, tolerance=0.001)
- ad_sn_popsyn.presn2_prior.load_tables(paths, *, minimum_exploder=1.4, circular_tolerance=0.001)
- ad_sn_popsyn.presn2_prior.prior_weights(prior, eta=0.0)
- ad_sn_popsyn.presn_inference.configurations(path, power=7, seed=20261109)
Two-collapse endpoint likelihood
two_sn_atoms exposes the evolution and collapse nodes. The inference
wrapper binary_measure uses tier 1.5 and defaults to the enclosed
second-collapse core prescription. It returns endpoint values,
weight and efficiency. The latter is the total selected measure.
The conditional control last_sn_measure accepts a reference atom bank
and changes only SN2. Use the same upstream reference for its core and
remnant inputs. Freeze derivatives explicitly if defining a derivative
control.
- ad_sn_popsyn.trajectory.two_sn_atoms(params, binary, n_gh=5, n_cos=12, n_chi=8, tau_merge=0.15, tier=0, kappa_c=1.0, loga1_ref=None, dns_box=None, sys_target=None, sys_target1=None, intersn_mode='gated', intersn_kw=None, channel_mean=True, spin_quad=(3, 3), sn2_core_model='frozen', azimuth_rule='midpoint', kick_quad=(0, 0), sn2_speed_breaks=())
- ad_sn_popsyn.two_sn_inference.binary_measure(params, binary, *, endpoint_n_cos=12, endpoint_n_chi=8, **kw)
- ad_sn_popsyn.two_sn_inference.last_sn_measure(params, binary, reference_atoms, *, n_gh=5, endpoint_n_cos=12, endpoint_n_chi=8, sn2_core_model='enclosed_collapse', azimuth_rule='midpoint')
- ad_sn_popsyn.two_sn_inference.ensemble_measure(params, configurations, prior_weights, **kw)
The data and positive standard errors have four columns in the order
(log10(P/day), eccentricity, m1/Msun, m2/Msun). The joint log density
integrates over the selected measure and both mass assignments. Evaluate
the count-conditioned catalog likelihood only on populations with positive
selected efficiency. configuration_posterior returns weights over the
given pre-SN1 configurations for one datum. The dense population evaluator
batches configurations. The linear evaluator compacts endpoint groups
and exposes numerical capacity and threshold controls.
- ad_sn_popsyn.two_sn_inference.log_joint_density(measure, data, errors)
- ad_sn_popsyn.two_sn_inference.catalog_log_likelihood(measure, data, errors)
- ad_sn_popsyn.two_sn_inference.configuration_posterior(measures, prior_weights, datum, errors)
- ad_sn_popsyn.two_sn_population.evaluate(params, configurations, prior_weights, data, errors, *, config_batch=None, **kw)
- ad_sn_popsyn.two_sn_scaling_linear.evaluate(params, configurations, prior_weights, data, errors, *, capacity=4096, threshold=1e-20, batch_size=8, config_batch=None, **kw)
Native survey response and count models
See Generate a pulsar survey estimate for the native generator, archive inputs, rate conversion and response axis conventions.
read_response takes a response NPZ and loads its adjacent JSON
manifest. It checks the file digest, native builder provenance and
probability arrays and returns those arrays plus a receipt.
validate_catalog checks the toy campaign’s prior, response and
physical scope. Use require_native_record before reusing cached rows.
It requires a consistent identity and verifiable native provenance.
- ad_sn_popsyn.survey_response.read_response(path, *, expected_sha256=None)
- ad_sn_popsyn.survey_response.validate_catalog(catalog, *, prior_sha256, response_sha256, all_ns_origins=True)
- ad_sn_popsyn.survey_record_contract.require_native_record(record, *, response_path=None, project_root=None)
profile_two_rates profiles two nonnegative rate components against
Poisson counts using supplied component shapes and bounds.
profile_class_visibility profiles class intensity calibration with
the specified uncertainty width. Check the statistical model and units
before interpreting a rate or a confidence region.
- ad_sn_popsyn.poisson_mixture.profile_two_rates(a, b, count, lower, upper, iterations=250)
- ad_sn_popsyn.count_calibration.profile_class_visibility(class_shape, class_counts, width)