Reconstruction of mode structure of faint light sources and its applications