Skip to content

[enhancement] Refactor of independent_sampling.py#797

Open
maxbriel wants to merge 14 commits intov2.3from
mb_initial_conditions_sampling
Open

[enhancement] Refactor of independent_sampling.py#797
maxbriel wants to merge 14 commits intov2.3from
mb_initial_conditions_sampling

Conversation

@maxbriel
Copy link
Collaborator

@maxbriel maxbriel commented Feb 9, 2026

This refactors independent_sampling to use the distributions and IMFs for sampling.

This additionally adds:

  1. A sampling function per class
  2. support for the RNG in inverse_sampler and rejection_sampler
  3. Add eccentricity and period classses to distributions.

I have tested this within the context of the unit tests. Not within initial population sampling. However, the norm_pop unit tests contain quite a few tests where the initial samplers are used. These seem to function similarly to before.

This PR does not make any functional changes.

This is the first step to solving issues related the initial sampling, including the difference between setting $m_2$ or $q$ boundaries.

@maxbriel maxbriel marked this pull request as draft February 9, 2026 07:49
@maxbriel maxbriel self-assigned this Feb 9, 2026
@maxbriel maxbriel added the enhancement New feature or request label Feb 9, 2026
@maxbriel maxbriel requested review from a team, astroJeff and sgossage February 9, 2026 11:09
@maxbriel maxbriel marked this pull request as ready for review February 9, 2026 11:09
@maxbriel maxbriel changed the title Refactor of independent_sampling.py [enhancement] Refactor of independent_sampling.py Feb 9, 2026
@maxbriel maxbriel added this to the v2.3 milestone Feb 13, 2026
@maxbriel
Copy link
Collaborator Author

maxbriel commented Feb 13, 2026

Here are distributions. I ran it on the v2.3 branch and this branch.
It's just a bunch of different IMFs, period/separation distributions, and other initial parameters, directly generated using generate_independent_samples.

I didn't see any major differences between the distributions.

population_synthesis_analysis_v2.3.pdf
population_synthesis_analysis_mb_branch.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments