burnin

Fill in a module description here

source

run_burnin

 run_burnin (key:<function PRNGKey>, sp:chewc.sp.SimParam,
             n_generations:int, n_parents:int, n_progeny:int,
             h2:jaxtyping.Float[Array,'nTraits'], verbose:bool=True)

*Executes a multi-generational burn-in phase using random mating and truncation selection.

This function takes an initial founder population (defined in sp.founderPop) and iterates for a specified number of generations. In each generation, it selects the top parents based on their phenotype and randomly crosses them to produce the next generation. The entire per-generation logic is JIT-compiled for maximum performance.

Args: key: The base JAX random key for the entire burn-in simulation. sp: A fully configured SimParam object, which must include traits and a founder population. n_generations: The number of burn-in generations to simulate. n_parents: The number of top individuals to select as parents each generation. n_progeny: The number of progeny (crosses) to create each generation. h2: The heritability to use for phenotyping in each generation. verbose: If True, prints the mean phenotype for each generation.

Returns: The final Population object after the last burn-in generation.*