Methods and systems are described to obtain and analyze a gas sample from a desired section of the breath of a person, while accounting for erratic, episodic or otherwise challenging breathing patterns that may otherwise make the capturing of a gas sample from the desired section of breath difficult. These techniques may provide more reliable, accurate and adequate samples of gas such as end-tidal gas, and ultimately an accurate analysis of the sample captured.