Power exhaust by SOL and pedestal radiation at ASDEX Upgrade and JET