Effects of porosity and particle size on the gas sensing properties of SnO2 films