The MOI (Mutual Optical Intensity) code for propagating partially coherent radiation through beamline optics is updated by including the in-plane wavevector in the wavefield calculation. The in-plane wavevector is a local function and accurately describes the average phase distribution in a partially coherent wavefield. The improved MOI code is demonstrated by beam propagation through free space and non-ideal mirrors. The improved MOI code can provide more accurate results with lower numbers of elements, and thus has a higher calculation efficiency. Knowledge of the in-plane wavevector also enables detailed studies of wavefield information under different coherence conditions. The improved MOI code is available at http://www.moixray.cn.
Keywords: mutual optical intensity; partially coherent light; software; synchrotron beamlines; wavevectors.