We demonstrate a modal approach to simultaneous recovery of a sample transmission function and coherence properties of an illuminating X-ray beam that works from a single measurement. The approach based on coherence diffractive imaging, does not depend on a particular model for the coherence function. This single shot imaging method separates the effects of partial coherence in the illuminating beam from the sample, allowing the recovery of high quality sample information.