Automated near-field measurements to obtain far-field patterns of aperture antennas and phased arrays