The use of partial-pressure mass spectrometry in the thermal analysis study of carbons and graphite