[phenixbb] script to calculate phase error