High-resolution THz gain measurements in optically pumped ammonia.