  In this article we consider asymptotics for the spectral function of
Schr\"odinger operators on the real line. Let $P:L^2(\mathbb{R})\to
L^2(\mathbb{R})$ have the form $$ P:=-\tfrac{d^2}{dx^2}+W, $$ where $W$ is a
self-adjoint first order differential operator with certain modified almost
periodic structure. We show that the kernel of the spectral projector,
$\mathbb{1}_{(-\infty,\lambda^2]}(P)$ has a full asymptotic expansion in powers
of $\lambda$. In particular, our class of potentials $W$ is stable under
perturbation by formally self-adjoint first order differential operators with
smooth, compactly supported coefficients. Moreover, it includes certain
potentials with dense pure point spectrum. The proof combines the gauge
transform methods of Parnovski-Shterenberg and Sobolev with Melrose's
scattering calculus.
