def _constructaxisfromphases(K):
    d = K.shape[0]
    n = K.shape[1]
    axes = np.ones((((d * 2) + 1), n))
    for i in range(n):
        F = np.ones((((d * 2) + 1),), dtype='complex')
        F[0:d] = np.exp((1j * K[:, i]))
        F[(- d):] = np.flip(np.conj(F[0:d]))
        F = np.fft.ifftshift(F)
        axes[:, i] = np.fft.ifft(F).real
    return axes
def _constructaxisfromphases(K):
    d = K.shape[0]
    n = K.shape[1]
    axes = np.ones((((d * 2) + 1), n))
    for i in range(n):
        F = np.ones((((d * 2) + 1),), dtype='complex')
        F[0:d] = np.exp((1j * K[:, i]))
        F[(- d):] = np.flip(np.conj(F[0:d]))
        F = np.fft.ifftshift(F)
        axes[:, i] = np.fft.ifft(F).real
    return axes