When unity reflectance is approached, the Fourier-transform method of calculating the reflectance spectrum of an optical grating modulated by a slowly varying envelope becomes unacceptably inaccurate. The modified Fourier transform method of Bovard [Appl. Opt. 29, 24 (1990)] can achieve complete accuracy for quarter-wave gratings. We report herein the extension of Bovard's method to non-quarter-wave gratings. We demonstrate the accurate deployment of our simplified modified Fourier-transform method to apodized linear gratings and optically apodized nonlinear gratings.