  Space-borne low-to medium-resolution (R~10^2-10^3) transmission spectroscopy
of atmospheres detect the broadest spectral features (alkali doublets,
molecular bands, scattering), while high-resolution (R~10^5), ground-based
observations probe the sharpest features (cores of the alkali lines, molecular
lines).The two techniques differ by:(1) The LSF of ground-based observations is
10^3 times narrower than for space-borne observations;(2)Space-borne
transmission spectra probe up to the base of thermosphere, while ground-based
observations can reach pressures down to 10^(-11);(3)Space-borne observations
directly yield the transit depth of the planet, while ground-based observations
measure differences in the radius of the planet at different wavelengths.It is
challenging to combine both techniques.We develop a method to compare
theoretical models with observations at different resolutions.We introduce
PyETA, a line-by-line 1D radiative transfer code to compute transmission
spectra at R~10^6 (0.01 A) over a broad wavelength range.An hybrid forward
modeling/retrieval optimization scheme is devised to deal with the large
computational resources required by modeling a broad wavelength range (0.3-2
$\mu$m) at high resolution.We apply our technique to HD189733b.Here, HST
observations reveal a flattened spectrum due to scattering by aerosols, while
high-resolution ground-based HARPS observations reveal the sharp cores of
sodium lines.We reconcile these results by building models that reproduce
simultaneously both data sets, from the troposphere to the thermosphere. We
confirm:(1)the presence of scattering by tropospheric aerosols;(2)that the
sodium core feature is of thermospheric origin.Accounting for aerosols, the
sodium cores indicate T up to 10000K in the thermosphere.The precise value of
the thermospheric temperature is degenerate with the abundance of sodium and
altitude of the aerosol deck.
