Spatially resolved diagnostics for optimization of large ion beam sources.