2024-11-13 18:36:50 +01:00
|
|
|
function [psi] = setupWavefunction(~,Params,Transf)
|
2024-11-22 00:04:27 +01:00
|
|
|
|
|
|
|
format long
|
|
|
|
|
2024-11-13 18:36:50 +01:00
|
|
|
X = Transf.X;
|
|
|
|
Y = Transf.Y;
|
|
|
|
|
|
|
|
ellx = sqrt(Params.hbar/(Params.m*Params.wx))/Params.l0;
|
2024-11-18 18:06:14 +01:00
|
|
|
elly = sqrt(Params.hbar/(Params.m*Params.wy))/Params.l0;
|
2024-11-13 18:36:50 +01:00
|
|
|
|
2024-11-30 08:26:12 +01:00
|
|
|
Rx = 8*sqrt(2)*ellx;
|
|
|
|
Ry = 8*sqrt(2)*elly;
|
2024-11-13 18:36:50 +01:00
|
|
|
X0 = 0.0*Transf.Xmax;
|
|
|
|
Y0 = 0.0*Transf.Ymax;
|
|
|
|
|
2024-11-18 18:06:14 +01:00
|
|
|
psi = exp(-(X-X0).^2/Rx^2-(Y-Y0).^2/Ry^2);
|
2024-11-30 08:26:12 +01:00
|
|
|
Norm = sum(abs(psi(:)).^2)*Transf.dx*Transf.dy;
|
2024-11-18 18:06:14 +01:00
|
|
|
psi = sqrt(Params.N)*psi/sqrt(Norm);
|
2024-11-13 18:36:50 +01:00
|
|
|
|
|
|
|
end
|