  Optical lightcurves can be used for the shape and spin reconstruction of
asteroids. Due to unknown albedo, these models are scale-free. When thermal
infrared data are available, they can be used for scaling the shape models and
for deriving thermophysical properties of the surface by applying a
thermophysical model. We introduce a new method of simultaneous inversion of
optical and thermal infrared data that allows the size of an asteroid to be
derived along with its shape and spin state. The method optimizes all relevant
parameters (shape and its size, spin state, light-scattering properties,
thermal inertia, surface roughness) by gradient-based optimization. The thermal
emission is computed by solving the 1-D heat diffusion equation. Calibrated
optical photometry and thermal fluxes at different wavelengths are needed as
input data. We demonstrate the reliability and test the accuracy of the method
on selected targets with different amount and quality of data. Our results in
general agree with those obtained by independent methods. Combining optical and
thermal data into one inversion method opens a new possibility for processing
photometry from large optical sky surveys with the data from WISE. It also
provides more realistic estimates of errors of thermophysical parameters.
