Thermal behaviour of a laser diode