  The spatial distribution of cosmic ray (CR) particles in the interstellar
medium (ISM) is of major importance in radio astronomy, where its knowledge is
essential for the interpretation of observations, and in theoretical
astrophysics, where CR contribute to the structure and dynamics of the ISM.
Local inhomogeneities in interstellar magnetic field strength and structure can
affect the local diffusivity and ensemble dynamics of the cosmic ray particles.
Magnetic traps (regions between magnetic mirrors located on the same magnetic
line) can lead to especially strong and persistent features in the CR spatial
distribution. Using test particle simulations, we study the spatial
distribution of an ensemble of CR particles (both protons and electrons) in
various magnetic field configurations, from an idealized axisymmetric trap to
those that emerge in intermittent (dynamo-generated) random magnetic fields. We
demonstrate that both the inhomogeneity in the CR sources and the energy losses
by the CR particles can lead to persistent local inhomogeneities in the CR
distribution and that the protons and electrons have different spatial
distributions. Our results can have profound implications for the
interpretation of the synchrotron emission from astronomical objects, and in
particular its random fluctuations.
