  We introduce new variant of $H$-measures defined on spectra of general
algebra of test symbols and derive the localization properties of such
$H$-measures. Applications for the compensated compactness theory are given. In
particular, we present new compensated compactness results for quadratic
functionals in the case of general pseudo-differential constraints. The case of
inhomogeneous second order differential constraints is also studied.
