A gas sensor and manufacturing method thereof. In the method, a) the transmission signal to be digitally clipped is divided into real and imaginary parts, b) magnitudes of the real and imaginary part signals are divided into a plurality clipping levels, and c) the transmission signal is respectively clipped by comparing the real and imaginary part signals with the plurality of clipping levels while allowing phase errors. Viewing apertures or slots are then defined in the data file to the tolerance limits of features to be checked.