New technique accurately measures how 2D materials expand when heated