Linear envelope detection for pulse NMR