Optimization of CPMG sequences to measure NMR