Skip to content

Updating population redshift models - #5301

Open
sum33it wants to merge 8 commits into
gwastro:masterfrom
sum33it:population_models_development
Open

Updating population redshift models#5301
sum33it wants to merge 8 commits into
gwastro:masterfrom
sum33it:population_models_development

Conversation

@sum33it

@sum33it sum33it commented Mar 13, 2026

Copy link
Copy Markdown
Member

This PR is restructuring the population redshift models using a class. It is also restructured keeping in mind a future update for population inference code. There are some improvements for existing code such as getting rid of hard coded cosmology functions like here.

Standard information about the request

This is a: new feature, and efficiency update,

This change affects: It should not affect any other pipelines.

This change changes:

This change: has appropriate unit tests, follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

This change will: break current functionality, require additional dependencies, require a new release, other (please describe)

Motivation

Contents

Including a base class for redshift evolution models which can then be inherited by other classes to create redshift distribution.

Links to any issues or associated PRs

Testing performed

Additional notes

  • The author of this pull request confirms they will adhere to the code of conduct

Co-authored-by: WuShichao <shichao.wu@aei.mpg.de>

@WuShichao

Copy link
Copy Markdown
Member

Summary of Updates for PyCBC Population Models

  • High-Performance Numerical Engine Transition: Replaced the legacy SymPy-based symbolic integration with a blazing-fast object-oriented numerical framework, reducing model evaluation time to fractions of a second.
  • Resolved Numerical Artifacts (Wiggles/Spikes): Completely eliminated grid aliasing and unphysical spikes in time-delay models (inverse and power_law).
  • Robust Singularity Handling: Implemented a highly stable scipy.integrate.quad integration scheme backed by $C^2$-continuous CubicSpline interpolation. Added targeted integration points guidance to force the integrator to flawlessly resolve extremely narrow peaks and step discontinuities without dropping to zero.
  • Fixed Unphysical Convolution Behavior: Addressed a mathematical bug in the legacy inverse model where integrating a divergent $1/\tau$ singularity caused the integrator to fail and artificially mimic an un-delayed SFR. The new framework computes the true, mathematically rigorous time-delay convolution for any physical td_min.
  • Backward Compatibility & Flexibility: Updated the merger_rate_density wrapper to automatically scale maxz based on the provided z_array bounds, and enabled passing td_min/td_max via **kwargs without breaking Astropy cosmology initialization.

@sum33it
sum33it force-pushed the population_models_development branch from 27f2eb8 to 696b2d3 Compare June 4, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants