Time-to-energy transform of wavepackets using absorbing potentials. Time-independent wavepacket-Schrödinger and wavepacket-Lippmann—Schwinger equations