Appendix. Weierstrass :math:`\wp` function and lattice sums =========================================================== .. note:: This section is under constant development. Its content will change and improve over time. .. code:: ipython3 import numpy as np .. code:: ipython3 from basicsums.weierstrass import Weierstrass from basicsums.eisenstein import E_numeric .. code:: ipython3 w1 = 1 w2 = 1j .. code:: ipython3 wp = Weierstrass(w1/2, w2/2) .. code:: ipython3 wp.wp(0.1+0.1j) # Weierstrass P function .. parsed-literal:: (-4.440892098500626e-15-49.81116546459035j) .. code:: ipython3 wp.wpp(0.1+0.1j) # derivative of th Weierstrass P function .. parsed-literal:: (501.88358442957417+501.8835844295741j) Eisenstein functions and Eisenstein-Rayleigh lattice sums --------------------------------------------------------- .. code:: ipython3 from basicsums.eisenstein import lattice_sums .. code:: ipython3 S = lattice_sums(w1, w2, 6) .. code:: ipython3 S[2] .. parsed-literal:: 3.1415926535897927 .. code:: ipython3 from basicsums.eisenstein import E .. code:: ipython3 E(3), E(4) .. parsed-literal:: (-P'(z)/2, P(z)**2 - 5*S(4)) .. code:: ipython3 E(10) .. parsed-literal:: (8*P(z)**5 - 76*P(z)**3*S(4) + 5*P(z)**2*P'(z)**2 + 180*P(z)*S(4)**2 - 11*P'(z)**2*S(4))/28 .. code:: ipython3 from basicsums.eisenstein import E_numeric .. code:: ipython3 E2 = E_numeric(2, w1, w2) E2(0.1 + 0.5j) .. parsed-literal:: (-2.8498259468658538-6.84841378126949e-16j) .. code:: ipython3 E3 = E_numeric(3, w1, w2) E3(0.1 + 0.5j) .. parsed-literal:: (-8.25402443117664+3.1086244689504383e-15j) .. code:: ipython3 E4 = E_numeric(4, w1, w2) E4(0.1 + 0.5j) .. parsed-literal:: (20.14103683511636+8.206342742542959e-15j)