Hi Ryan,
I am hoping this is a simple question meriting a simple answer. I am trying to explore models that incorporate discrete admixture events, rather than continuous migration, and am having difficulty understanding the timing of these events. Take for example, the two basic models below:
--------------------------------------------------------------------------------------------
def model1(params, ns, pts):
nu1, nu2, T, f = params
xx = Numerics.default_grid(pts)
phi = PhiManip.phi_1D(xx)
phi = PhiManip.phi_1D_to_2D(xx, phi)
phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)
phi = Integration.two_pops(phi, xx, T, nu1, nu2, m12=0, m21=0)
fs = Spectrum.from_phi(phi, ns, (xx,xx))
return fs
---------------------------------------------------------------------------------------------
def model2(params, ns, pts):
nu1, nu2, T, f = params
xx = Numerics.default_grid(pts)
phi = PhiManip.phi_1D(xx)
phi = PhiManip.phi_1D_to_2D(xx, phi)
phi = Integration.two_pops(phi, xx, T, nu1, nu2, m12=0, m21=0)
phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)
fs = Spectrum.from_phi(phi, ns, (xx,xx))
return fs
--------------------------------------------------------------------------------------------
Is the difference here that the admixture pulse happens immediately after divergence in model1 (and before any drift occurs in interval T), and after divergence and drift occurs during interval T in model2? If so, to place the admixture event somewhere in between, would the solution be to have two integration functions (for intervals T1, T2) and write the admixture function in between?
For example:
phi = Integration.two_pops(phi, xx, T1, nu1, nu2, m12=0, m21=0)
phi = PhiManip.phi_2D_admix_1_into_2(phi, f, xx,xx)
phi = Integration.two_pops(phi, xx, T2, nu1, nu2, m12=0, m21=0)
Let me know if I am on the right track here, I haven't seen too many examples of models with these discrete admixture events. They make more sense for an island system I am working on at the moment, and I am hoping to incorporate them.
Thanks,
Dan