code: def _transform(self, q):
          
  
          s2p = self._primitive.get_supercell_to_primitive_map()
          p2s = self._primitive.get_primitive_to_supercell_map()
  
          num_s = self._supercell.get_number_of_atoms()
          num_p = self._primitive.get_number_of_atoms()
          v = self._velocities
  
          q_array = np.reshape(q, (-1, 3))
          dtype = "c%d" % (np.dtype('double').itemsize * 2)
          v_q = np.zeros((v.shape[0], num_p, len(q_array), 3), dtype=dtype)
  
          for p_i, s_i in enumerate(p2s):
              for s_j, s2p_j in enumerate(s2p):
                  if s2p_j == s_i:
                      for q_i, pf in enumerate(
                              self._get_phase_factor(p_i, s_j, q_array)):
                          v_q[:, p_i, q_i, :] += pf * v[:, s_j, :]
          return v_q
docs: exp(i q.r(i)) v(i)