Detailed thermal stress analyses of beamline and optical components subject to high heat loads require an accurate determination of the absorbed power profile for accurate prediction of the temperature profile and structural parameters. This is particularly important for high power beams from wigglers and undulators at the third generation synchrotron sources because components must, in general, be designed and maintained with strict mechanical tolerances. The spatial distribution of the power density of an undulator is a rapidly varying function of the energy of the photons suggesting that approximative methods based on a smooth spectral variation may not be valid. In this paper, a fast code for calculating undulator spectra is developed and compared with a wiggler code for approximation of the same spectra. Results from numerical simulations, including the emittance of the stored particle beam, are presented for the absorbed power density in a beryllium window. We find markedly different results for the two models for far off-axis radiation indicating the inadequacy of the wiggler model applied to an undulator spectrum in this case. The wiggler model overestimates the total absorbed power by as much as 82% for the beryllium window.