We provide optimized recursion relations for homodyne tomography. We improve previous methods by mitigating the divergences intrinsic in the calculation of the pattern functions used previously, and detail how to implement the data analysis through Monte Carlo simulations. Our refinements are necessary for the reconstruction of excited quantum states which populate a high-dimensional subspace of the electromagnetic field Hilbert space. (C) 2022 Elsevier B.V. All rights reserved.