Changed to Energy modif instead of pt
 Added check on intervals
corrected inversion formulas
undid correction of energy