  We analyze quantitatively how imaging techniques with single-site resolution
allow to measure thermodynamical properties that cannot be inferred from
time-of-light images for the trapped Bose-Hubbard model. If the normal state
extends over a sufficiently large range, the chemical potential and the
temperature can be extracted from a single shot, provided the sample is in
thermodynamic equilibrium. When the normal state is too narrow, temperature is
low but can still be extracted using the fluctuation-dissipation theorem over
the entire trap range as long as the local density approximation remains valid,
as was recently suggested by Qi Zhou and Tin-Lun Ho [arXiv:0908.3015]. However,
for typical present-day experiments, the number of samples needed is of the
order of 1000 in order to get the temperature at least $10 \%$ accurate, but it
is possible to reduce the variance by 2 orders of magnitude if the
density-density correlation length is short, which is the case for the
Bose-Hubbard model. Our results provide further evidence that cold gases in an
optical lattices can be viewed as quantum analog computers.
