See the documentation of treams.lattice.diffr_orders_circle().
treams.lattice.diffr_orders_circle()
treams.lattice.cython_lattice
treams.lattice.cython_lattice.dsumcw1d