Deconvolution of fluorescence and phosphorescence decay curves. Least-squares method