We study the measurement of the position of atoms as a means to estimate the
relative phase between two Bose-Einstein condensates. First, we consider N
atoms released from a double-well trap, forming an interference pattern, and
show that a simple least-squares fit to the density gives a shot-noise limited
sensitivity. The shot-noise limit can instead be overcome by using correlation
functions of order N or larger. The measurement of the
Nth-order correlation function allows to estimate the relative phase
at the Heisenberg limit. Phase estimation through the measurement of the
center-of-mass of the interference pattern can also provide sub-shot-noise
sensitivity. Finally, we study the effect of the overlap between the two clouds
on the phase estimation, when Mach-Zehnder interferometry is performed in a
double-well.Comment: 20 pages, 6 figure