Refocusing pulses and excitation pulses for nmr logging