Debugging code that extracts a specular path through a beam to get phase information