A method for controlling a laser includes determining an average component of
a
laser drive current and adjusting a modulation component of the drive current based
on the average component and a threshold current signal at the present temperature.
Determining the average component includes adjusting the drive current until an
output power of the laser is approximately equal to a reference signal that varies
according to temperature. The method further includes calibrating the threshold
current signal, which includes adjusting the drive current until the laser output
power is approximately equal to a second reference signal, and storing the drive
current signal as the threshold current signal at the present temperature. The
method further includes recalibrating the threshold current signal, which includes
storing a difference between a new value and a stored value of the threshold current
signal as an offset for other stored values of the threshold current signal.