6.2. Calculation of spectrum function