vectorized subroutine put_in_ct_rhs over phases