small library to perform the direct scattering transform