Modal decomposition of measured near-field and far-field beams with partial coherence based on SPGD algorithm