  The near- and far-field photoluminescence spectra of a gated two-dimensional
electron gas have been measured. Spatial fluctuations in the electron density
are found to be manifested as spatial fluctuations in the emission amplitude of
the negatively charged exciton (X$^{-}$) and in the peak energy of the neutral
exciton (X). Consequently, the far-field X$^{-}$ spectrum is a homogoneously
broadened Lorentzian, while the X lineshape exhibits substantial inhomogenous
broadening. We present a novel and simple technique to extract the electron
density from the X$^{-}$ spectrum. We show that width of the far-field X line
is proportional to the electron density fluctuations; hence it can be used to
characterize the inhomogeneity in the electron density.
