Rarefied gas dynamic effects on mass spectrometric studies of upper planetary atmospheres