Experiments that use cold atoms in optical lattices to simulate the behaviour of strongly correlated solid-state systems promise to provide insight into a range of longstanding problems in many-body physics 1-10 . The goal of such 'quantum simulations' is to obtain information about homogeneous systems. Cold-gas experiments, however, are carried out in spatially inhomogeneous confining traps, which leads inevitably to different phases in the sample. This makes it difficult to deduce the properties of homogeneous phases with standard density imaging, which averages over different phases. Moreover, important properties such as superfluid density are inaccessible by standard imaging techniques, and will remain inaccessible even when systems of interest are successfully simulated. Here, we present algorithms for mapping out several properties of homogeneous systems, including superfluid density. Our scheme makes explicit use of the inhomogeneity of the trap, an approach that might turn the source of difficulty into a means of constructing solutions.To deduce the bulk properties of homogeneous systems from the observed properties of non-uniform systems, local density approximation (LDA) naturally comes to mind. In this approximation, the properties of a non-uniform system at a given point are deduced from their bulk values assuming an effective local chemical potential. To the extent that LDA is valid, determining bulk thermodynamic quantities as functions of chemical potentials amounts to determining their spatial dependencies in confining traps. In present experiments with ultracold atomic gases, column-integrated density (or density for two-dimensional (2D) experiments) is the only local property that can be accessed. No other thermodynamic quantities have been measured because there are no clear ways to access them. Here, we show that by studying changes in density caused by external perturbations, one can access the quantities mentioned above from density data. The deduction of superfluid density is particularly important, as it is a fundamental quantity that has eluded measurement since the discovery of Bose-Einstein condensation.Our first step is to use the density near the surface of the quantum gas as a thermometer. Within LDA, the density is n(x) = n(µ(x),T ), where n(µ, T ) is the density of a homogeneous system with temperature T and chemical potential µ, µ(x) = µ − V (x); V (x) = 1/2 M i=x,y,z ω 2 i x 2 i is a harmonic trapping potential with frequencies ω i and M is the mass of the atom. Near the surface, the density is sufficiently low that one can carry out a fugacity expansion to obtain(1) where λ = h/ √ 2πMk B T is the thermal wavelength and k B is the Boltzman constant. For a p-component quantum gas in a single trap, we have α = p. If the quantum gas is in the lowest band of a cubic lattice with hopping integral t and lattice spacing d, then α = p(λ/d) 3 [I 0 (2t /k B T )] 3 , where I 0 (x) is the Bessel function of the first kind (see the Methods section). The corresponding column densityñ(x,y) = ...