new function to measure 2 dimensional beamwidth
scaratchpad