  The Scott rank of a countable structure is a measure, coming from the proof
of Scott's isomorphism theorem, of the complexity of that structure. The Scott
spectrum of a theory (by which we mean a sentence of $\mathcal{L}_{\omega_1
\omega}$) is the set of Scott ranks of countable models of that theory. In $ZFC
+ PD$ we give a descriptive-set-theoretic classification of the sets of
ordinals which are the Scott spectrum of a theory: they are particular
$\boldsymbol{\Sigma}^1_1$ classes of ordinals.
  Our investigation of Scott spectra leads to the resolution (in $ZFC$) of a
number of open problems about Scott ranks. We answer a question of Montalb\'an
by showing, for each $\alpha < \omega_1$, that there is a $\Pi^{\mathtt{in}}_2$
theory with no models of Scott rank less than $\alpha$. We also answer a
question of Knight and Calvert by showing that there are computable models of
high Scott rank which are not computably approximable by models of low Scott
rank. Finally, we answer a question of Sacks and Marker by showing that
$\delta^1_2$ is the least ordinal $\alpha$ such that if the models of a
computable theory $T$ have Scott rank bounded below $\omega_1$, then their
Scott ranks are bounded below $\alpha$.
