  We present a very efficient and accurate method to simulate scanning
tunneling microscopy images and spectra from first-principles density
functional calculations. The wave-functions of the tip and sample are
calculated separately on the same footing, and propagated far from the surface
using the vacuum Green's function. This allows to express the Bardeen matrix
elements in terms of convolutions, and to obtain the tunneling current at all
tip positions and bias voltages in a single calculation. The efficiency of the
method opens the door to real time determination of both tip and surface
composition and structure, by comparing experiments to simulated images for a
variety of precomputed tips. Comparison with the experimental topography and
spectra of the Si(111)-(7x7) surface show a much better agreement with Si than
with W tips, implying that the metallic tip is terminated by silicon.
