In combination with a traveling wave maser of the folded comb type having an input-output end and a turn-around end, and having an external magnetic field that is uniform across the full length of the folded comb structure, a set of two magnetic field shaping figure-eight coils, one a bandwidth-control figure-eight coil covering the full length of the comb structure with the direction of current and coil windings at the turn-around end of the folded-comb structure selected to aid the external field and the direction of current and coil windings at the input-output end of the folded comb structure selected to buck the external field, and the other a gain control figure-eight coil covering the central half of the comb structure with the direction of current and coil windings at the turn-around end of the folded comb stucture selected to aid the external field and the direction of current and coil windings for said current at the input-output end of the folded comb structure selected to buck the external field, and separate adjustable current sources for providing said currents to said set of figure-eight coils, one current source for each figure-eight coil.