Understanding the scattering mechanism of single-walled carbon nanotube based gas sensors