Angular effects in the energy loss of slow protons and helium ions transmitted through thin Al and Au films