Proton induced X-ray emission (PIXE) analysis on thick samples exemplified on the rare earth elements