amax and amin added to spectral_profile()