Black-box model for the complete characterization of the spectral gain and noise in semiconductor optical amplifiers.