We investigate the transfer of coherence from atoms to a cavity field initially in a statistical mixture in a two-photon micromaser arrangement. The field is progressively modified from a maximum entropy state (thermal state) towards an almost pure state (entropy close to zero) due to its interaction with atoms sent across the cavity. We trace over the atomic variables, i.e., the atomic states are not collapsed by a detector after they leave the cavity. We find that by applying an external classical driving field it is possible to substantially increase the field purity without the need of previously preparing the atoms in a superposition of their energy eigenstates. We also discuss some of the nonclassical features of the resulting field.