SAMPEX data analysis code