Materials analysis using ion beam techniques