c** Performs mirror-image linear prediction on the workspace c** to double the size of the FID in the workspace c** FELIX macro, Biosym c** Author: Roger A. Chylla c** Reference: Zhu, G. and Bax, A. (1990) J. Magn. Reson. 90, 405-410 c** def pts 0; Begin initialization... def dpts 0; def lpp 0; def npts 0; def poles 0; def peaks 0; def lpts 0; End initialization c** eva pts (&datsiz); Store data size eva dpts (&pts*2); Get double # complex data pts eva lpp (&pts-1); Get # complex pts for back prediction eva npts (&dpts-1); Get # complex pts for lp after back prediction eva lpts (&dpts+&lpp); Get final # complex pts after lp eva poles (&dpts/4); Get # poles for lp eva peaks (&dpts/4); Get # peaks for lp c** c** The following section uses the workspace and the 1st buffer to c** reflect the current FID 'backwards' in time. This is done by c** taking the complex conjugate of the workspace and reversing c** the direction of the FID. c** Begin backward reflection... c** zf &dpts; Zero fill to double the size of workspace psh; Push workspace onto bufer shr &lpp; Shift right # complex pts for back prediction xsh; Exchange contents of workspace and 1st buffer eva datsiz (&pts); Set size of workspace to original data size cnj; Get complex conjugate of workspace rev; Reverse dir. of workspace so lpt is now fpt eva datsiz (&lpp); Set size of workspace to lpp zf &dpts; Zero fill to double the size of workspace adb 1; Add contents of workspace to 1st buffer pop; Make 1st buffer the workspace eva datsiz (&npts); Set data size of new FID size c** c** End backward reflection... c** lpl &npts &poles &peaks &dpts &lpts; Perform linear prediction shl &lpp; Discard negative time points eva datsiz (&dpts); Set data size to new FID size c** ret; Return to calling function