EHN: TOA function revised

Bugs with tilt. Better comments
EHN: Complete database of Xray energy