General method for evaluating the energy distribution function from the observed adsorption isotherm