  The low energy properties of a trapped bose gas split by a potential barrier
are determined over the whole range of barrier heights. We derive a
self-consistent two-mode model which reduces, for large $N$, to a Bogoliubov
model for low barriers and to a Josephson model for any (asymmetric) double
well potential, with explicitly calculated tunneling and pair interaction
parameters. We compare the numerical results to analytical results that
precisely specify the role of number squeezing and finite temperatures in the
loss of coherence.
