How do we prevent astronauts in space from inhaling hazardous gases? A hi-tech optical gas sensor provides a solution.