See the documentation of treams.lattice.realsumsw1d().
treams.lattice.realsumsw1d()
treams.lattice.cython_lattice.realsumcw1d
treams.lattice.cython_lattice.recsumcw1d