Response of atomic spin-based sensors to magnetic and nonmagnetic perturbations.