  The evolution of a modulated positron beam in a planar crystal channel is
investigated within the diffusion approach. A detailed description of the
formalism is given. A new parameter, the demodulation length, is introduced,
representing the quantitative measure of the depth at which the channelling
beam preserves its modulation in the crystal. It is demonstrated that there
exist crystal channels with the demodulation length sufficiently large for
using the crystalline undulator as a coherent source of hard X rays. This
finding is a crucial milestone in developing a new type of lasers radiating in
the hard X ray and gamma ray range.
