  Photonic integrated circuits (PICs) play a pivotal role in many applications.
Particularly powerful are circuits based on meshes of reconfigurable
Mach-Zehnder interferometers as they enable active processing of light. Various
possibilities exist to get light into such circuits. Sampling an
electromagnetic field distribution with a carefully designed free-space
interface is one of them. Here, a reconfigurable PIC is used to optically
sample and process free-space beams so as to implement a spatially resolving
detector of amplitudes and phases. In order to perform measurements of this
kind we develop and experimentally implement a versatile method for the
calibration and operation of such integrated photonics based detectors. Our
technique works in a wide parameter range, even when running the chip off the
design wavelength. Amplitude, phase and polarization sensitive measurements are
of enormous importance in modern science and technology, providing a vast range
of applications for such detectors.
