Scan through beam in order to obtain a cross-sectional profile of the beam