X-Ray data analysis routines