Field emission pattern of carbon nanotubes and phase distribution of wave function in the end cap structure