Absorption of photons in a Townsend discharge