  Flexible and fast control of the phase and amplitude of coherent light,
enabled by digital micromirror devices (DMDs) and spatial light modulators
(SLMs), has been a driving force for recent advances in optical tweezers,
nonlinear microscopy, and wavefront shaping. In contrast, engineering spatially
partially coherent light remains widely elusive due to the lack of tools
enabling a joint analysis and control sequence. Here, we report an approach to
coherence engineering that combines a quasi-monochromatic, thermal source and a
DMD together with a ptychographic scanning microscope. The reported method
opens up new routes to low-cost coherence control, with applications in
micromanipulation, nanophotonics, and quantitative phase contrast imaging.
