docs: def electric_field_amplitude_top(P, a, Omega=1e6, units="ad-hoc"):
      """Return the amplitude of the electric field for a top hat beam.
  
      This is the amplitude of a laser beam of power P (in Watts) and a top-hat\
   intensity distribution of radius a (in meters). The value of E0 is given in\
   rescaled units according to the frequency scale  Omega (in Hertz)\
   understood as absolute frequency (as opposed to angular frequency).
  
      >>> print(electric_field_amplitude_top(0.001, 0.001))
      27.8404157371
  
      """
      e0 = hbar*Omega/(e*a0)  # This is the electric field scale.
      E0 = sqrt((c*mu0*P)/(Pi*a**2))
      if units == "ad-hoc":
          E0 = E0/e0
      return E0