A method for measuring the spatial profile of the content of a gas compound from a gas mixture, the method comprising - generating a light beam, wherein the light beam comprises photons having a beam wavelength (λ b), and - guiding at least part of the light beam to a first optical path such that at least part of the photons of the light beam travel the first optical path in a first direction, wherein - the first optical path runs through a space containing the gas mixture comprising the gas compound, whereby the light beam is attenuated to an attenuated light beam, characterized by - generating at least a last light pulse (710, 710a), wherein the last light pulse (710, 710a) comprises photons (515, 515b) having a first pulse wavelength (λ p1), - dividing, using the last light pulse (710, 710a) or a sequence of light pulses (710, 710a, 710b, 710c), at least part of the gas compound atoms, molecules, ions, or radicals, to a first part and a second part, wherein the sequence of light pulses (710, 710a, 710b, 710c) comprises at least the last light pulse (710, 710a), - selecting the beam wavelength (λ b) such that the beam wavelength (λ b) corresponds to an absorption profile of the first part, - guiding at least part of the last light pulse (710, 710a) or at least part of a light pulse (710, 710a, 710b, 710c) of the sequence of light pulses to the first optical path, such that the photons (515, 515b) of the guided part of the light pulse travel in a second direction, wherein - the second direction is reverse to the first direction, - detecting a first profile (I k (t)) indicative of the intensity of the attenuated light beam as function of time, and - determining, using the first profile (I k (t)) indicative of the intensity of the attenuated light beam as function of time, the spatial profile (ξ G (x)) of content of the gas compound on the first optical path. - generating a light beam, wherein the light beam comprises photons having a beam wavelength (λ b), and - guiding at least part of the light beam to a first optical path such that at least part of the photons of the light beam travel the first optical path in a first direction, wherein - the first optical path runs through a space containing the gas mixture comprising the gas compound, whereby the light beam is attenuated to an attenuated light beam, - generating at least a last light pulse (710, 710a), wherein the last light pulse (710, 710a) comprises photons (515, 515b) having a first pulse wavelength (λ p1), - dividing, using the last light pulse (710, 710a) or a sequence of light pulses (710, 710a, 710b, 710c), at least part of the gas compound atoms, molecules, ions, or radicals, to a first part and a second part, wherein the sequence of light pulses (710, 710a, 710b, 710c) comprises at least the last light pulse (710, 710a), - selecting the beam wavelength (λ b) such that the beam wavelength (λ b) corresponds to an absorption profile of the first part, - guiding at least part of the last light pulse (710, 710a) or at least part of a light pulse (710, 710a, 710b, 710c) of the sequence of light pulses to the first optical path, such that the photons (515, 515b) of the guided part of the light pulse travel in a second direction, wherein - the second direction is reverse to the first direction, - detecting a first profile (I k (t)) indicative of the intensity of the attenuated light beam as function of time, and - determining, using the first profile (I k (t)) indicative of the intensity of the attenuated light beam as function of time, the spatial profile (ξ G (x)) of content of the gas compound on the first optical path.