Homogeneity study of proton and carbon ion scanning beams using combinations of different spot sizes and grid sizes