  In the Gaia era, understanding the effects of perturbations of the Galactic
disc is of major importance in the context of dynamical modelling. In this
theoretical paper, we extend previous work in which, making use of the
epicyclic approximation, the linearized Boltzmann equation had been used to
explicitly compute, away from resonances, the perturbed distribution function
of a Galactic thin disc population in the presence of a non-axisymmetric
perturbation of constant amplitude. Here we improve this theoretical framework
in two distinct ways in the new code that we present. First, we use better
estimates for the action-angle variables away from quasi-circular orbits,
computed from the AGAMA software, and we present an efficient routine to
numerically re-express any perturbing potential in these coordinates with an
accuracy well below the percent level. The use of more accurate action
estimates allows us to identify resonances such as the outer 1:1 bar resonance
at larger azimuthal velocities than the outer Lindblad resonance, and to extend
our previous theoretical results well above the Galactic plane, where we
explicitly show how they differ from the epicyclic approximation. In
particular, the displacement of resonances in velocity space as a function of
height can in principle constrain the 3D structure of the Galactic potential.
Second, we allow the perturbation to be time-dependent, thereby allowing us to
model the effect of transient spiral arms or of a growing bar. The theoretical
framework and tools presented here will be useful for a thorough analytical
dynamical modelling of the complex velocity distribution of disc stars as
measured by past and upcoming Gaia data releases.
