1: \begin{abstract}
2: %We describe a new method for determining the equation of state of a homogeneous ultracold gas from \emph{in situ} images of trapped gases. It is based on a measurement of the local pressure inside the gas, In the local density framework,
3: We describe a powerful method for determining the equation of state of an ultracold gas from \emph{in situ} images. The method provides a measurement of the local pressure of an harmonically trapped gas and we give several applications to Bose and Fermi gases. We obtain the grand-canonical equation of state of a spin-balanced Fermi gas with resonant interactions as a function of temperature \cite{nascimbene2009eos}.
4: %We describe the procedure used to obtain the equation of state of a spin-balanced Fermi gas with resonant interactions.
5: We compare our equation of state with an equation of state measured by the Tokyo group in \cite{horikoshi2010measurement}, that reveals a significant difference in the high-temperature regime. The normal phase, at low temperature, is well described by a Landau Fermi liquid model, and we observe a clear thermodynamic signature of the superfluid transition.
6: %At low temperature the equation of state is well described, in the normal phase, as a Landau Fermi liquid, and we observe a thermodynamic signature of the superfluid transition.
7: In a second part we apply the same procedure to Bose gases.
8: From a single image of a quasi ideal Bose gas we determine the equation of state from the classical to the condensed regime. Finally the method is applied to a Bose gas in a 3D optical lattice in the Mott insulator regime. Our equation of state directly reveals the Mott insulator behavior and is suited to investigate finite-temperature effects.
9: \end{abstract}