Picture of a mobile "rail heater" machine to achieve "neutral temperature". (right center)
[www.trainweb.org]
And here is a machine that mechanically stretches lengths of welded rail when it is not at the desired "neutral temperature", in order to weld it properly:
[www.plassertheurer.com]