  We present a methodology to calculate radiative carrier capture coefficients
at deep defects in semiconductors and insulators from first principles.
Electronic structure and lattice relaxations are accurately described with
hybrid density functional theory. Calculations of capture coefficients provide
an additional validation of the accuracy of these functionals in dealing with
localized defect states. We also discuss the validity of the Condon
approximation, showing that even in the event of large lattice relaxations the
approximation is accurate. We test the method on
GaAs:$V_\text{Ga}$-$\text{Te}_\text{As}$ and GaN:C$_\text{N}$, for which
reliable experiments are available, and demonstrate very good agreement with
measured capture coefficients.
