This routine currently works on files containing an extension with events with the column PI stored as a 16 byte Integer. Which is the default produced by the XMM-Newton pipeline and SAS software. It will not work on files where PI is stored as a 32 byte integer or a REAL number.