  Motivated by the analysis of gapped periodic quantum systems in presence of a
uniform magnetic field in dimension $d \le 3$, we study the possibility to
construct spanning sets of exponentially localized (generalized) Wannier
functions for the space of occupied states. When the magnetic flux per unit
cell satisfies a certain rationality condition, by going to the momentum-space
description one can model $m$ occupied energy bands by a real-analytic and
$\mathbb Z^{d}$-periodic family $\{P({\bf k})\}_{{\bf k} \in \mathbb R^{d}}$ of
orthogonal projections of rank $m$. A moving orthonormal basis of $\mathrm{Ran}
P({\bf k})$ consisting of real-analytic and $\mathbb Z^d$-periodic Bloch
vectors can be constructed if and only if the first Chern number(s) of $P$
vanish(es). Here we are mainly interested in the topologically obstructed case.
First, by dropping the generating condition, we show how to algorithmically
construct a collection of $m-1$ orthonormal, real-analytic, and periodic Bloch
vectors. Second, by dropping the linear independence condition, we construct a
Parseval frame of $m+1$ real-analytic and periodic Bloch vectors which generate
$\mathrm{Ran} P({\bf k})$. Both algorithms are based on a two-step logarithm
method which produces a moving orthonormal basis in the topologically trivial
case. A moving Parseval frame of analytic, periodic Bloch vectors corresponds
to a Parseval frame of exponentially localized composite Wannier functions. We
extend this construction to the case of magnetic Hamiltonians with an
irrational magnetic flux per unit cell and show how to produce Parseval frames
of exponentially localized generalized Wannier functions also in this setting.
Our results are illustrated in crystalline insulators modelled by $2d$ discrete
Hofstadter-like Hamiltonians, but apply to certain continuous models of
magnetic Schr\"{o}dinger operators as well.
