--Modified-- Unified rawphase matrix generation by using pre-calculated phase differences.