tracts.legacy_models.models_3pop

Functions

outofbounds_ppx_xxp(*params)

Constraint function evaluating below zero when constraints are not satisfied.

outofbounds_ppx_xxp_fix(params, fracs)

ppx_xxp(*params)

A simple model in which populations 1 and 2 arrive discretely at first generation, 3 at a subsequent generation.

ppx_xxp_fix(times, fracs)

propfrommig(mig)

tracts.legacy_models.models_3pop.outofbounds_ppx_xxp(*params)

Constraint function evaluating below zero when constraints are not satisfied.

tracts.legacy_models.models_3pop.outofbounds_ppx_xxp_fix(params, fracs)
tracts.legacy_models.models_3pop.ppx_xxp(*params)

A simple model in which populations 1 and 2 arrive discretely at first generation, 3 at a subsequent generation. If a time is not integer, the migration is divided between neighboring times proportional to the non-integer time fraction. We’ll assume population 3 still replaces migrants from 1 and 2 after the replacement from population 1 and 2 if they arrive at same generation.

Parameters:

params (tuple) – A 4-tuple (prop1, tstart, prop3, t3), where prop1 is the initial proportion from population 1, prop2=1-prop1, tstart is the arrival times of pops (1,2) and t3 is the arrival time of population 3.

Notes

The two times are measured in units of 100 generations, because some python optimizers work better when all parameters have the same scale.

tracts.legacy_models.models_3pop.ppx_xxp_fix(times, fracs)
tracts.legacy_models.models_3pop.propfrommig(mig)