A general effective approach to the synthesis of shaped beams for arbitrary fixed-geometry arrays