  The evolution of an interacting two-component Bose-Einstein condensate from
an initial phase state leads to a spin squeezed state that may be used in
atomic clocks to increase the signal-to-noise ratio, opening the way to quantum
metrology. The efficiency of spin squeezing is limited by the finite
temperature of the gas, as was shown theoretically in a spatially homogeneous
system. Here we determine the limit of spin squeezing in the realistic trapped
case, with classical field simulations, and with a completely analytical
treatment that includes the quantum case.
