fix wavemod_1d bug - ds needs to be calculated from old j0
make wavemod_1d handle multiple inputs (columns)