In this work, a powerful parametric spectral estimation technique, 2D-auto regressive moving average modeling (ARMA), has been applied to contrast transfer function (CTF) detection in electron microscopy. Parametric techniques such as auto regressive (AR) and ARMA models allow a more exact determination of the CTF than traditional methods based only on the Fourier transform of the complete image or parts of it and performing some average (periodogram averaging). Previous works revealed that AR models can be used to improve CTF estimation and the detection of its zeros. ARMA models reduce the model order and the computing time, and more interestingly, achieve increased accuracy. ARMA models are generated from electron microscopy (EM) images, and then a stepwise search algorithm is used to fit all the parameters of a theoretical CTF model in the ARMA model previously calculated. Furthermore, this adjustment is truly two-dimensional, allowing astigmatic images to be properly treated. Finally, an individual CTF can be assigned to every point of the micrograph, by means of an interpolation at the functional level, provided that a CTF has been estimated in each one of a set of local areas. The user need only know a few a priori parameters of the experimental conditions of his micrographs, for turning this technique into an automatic and very powerful tool for CTF determination, prior to CTF correction in 3D-EM. The programs developed for the above tasks have been integrated into the X-Windows-based Microscopy Image Processing Package (Xmipp) software package, and are fully accessible at www.biocomp.cnb.uam.es.