Spectral formation in compact X-ray sources
The gas flows responsible for X-ray spectral emission in compact X-ray sources are complex and likely to be optically thick. In galactic sources these flows include: stellar wind, accretion disk and corona, magnetosphere, and shock at the compact object surface. Active galactic nuclei are surrounded by many dense clouds responsible for the broad optical and UV emission lines. The nature of these flows can be discovered through observations of their X-ray spectra and time variability. Theoretical models for the formation of line and continuum spectra in these sources are described, emphasizing atomic photoabsorption, line emission, and Comptonization. Current observations of X-ray and UV spectra of compact galactic sources and active galactic nuclei are interpreted in terms of these models. Great advances in the understanding of these systems will result from future missions capable of observing their spectra at higher resolution. Observations of the complex of iron K-alpha lines at 6.4-6.7 keV will be particularly valuable.