  We investigate the creation of a relative phase between two Bose-Einstein
condensates, initially in number states, by detection of atoms and show how the
system approaches a coherent state. Two very distinct time scales are found:
one for the creation of the interference is of the order of the detection time
for a few single atoms and another, for the preparation of coherent states, of
the order of the detection time for a significant fraction of the total number
of atoms. Approximate analytic solutions are derived and compared with exact
numerical results.
