computes directivity and beam solid angle of g(th) gain
[D, Om] = dmax(th, g)
power gain evaluated at th
(Nth+1) equally-spaced polar angles in [0,pi]
directivity
beam solid angle
dmax(th, g) computes directivity and beam solid angle of g(th) gain. D = 4*pi/Om. g must be normalized to unity maximum