This paper presents a new diagnostic tool for the inference of the thermal,
dynamic, and magnetic properties of the solar chromosphere. It consists of
a non-LTE inversion code of Stokes profiles induced by the Zeeman effect i
n magnetized stellar atmospheres. This code is the generalization, to the n
on-LTE Stokes transfer case, of the inversion code for unpolarized line pro
files of Socas-Navarro, Ruiz Cobo, & Trujillo Bueno. It is based upon a ful
l non-LTE multilevel treatment of Zeeman line transfer in which the thermal
, magnetic, and dynamic properties of the atmospheric model are adjusted au
tomatically by means of nonlinear least-squares-fitting techniques until a
best fit to the observed Stokes profiles is obtained. Our non-LTE inversion
approach is based on the concept of response functions, which measure the
emergent Stokes profiles' first-order reaction to changes in the atmospheri
c parameters. We generalize our fixed departure coefficients (FDC) approxim
ation in order to allow fast computation of such response functions in the
present non-LTE Zeeman line transfer context. We present several numerical
tests showing the reliability of our inversion method for retrieving the in
formation about the thermodynamics and the magnetic held vector that is con
tained in the polarization state of the chosen spectral lines. We also expl
ore the limitations of the inversion code by applying it to simulated obser
vations where the physical hypotheses on which it is based on are not met.
Finally, we apply our non-LTE Stokes inversion code to real spectropolarime
tric observations of a sunspot observed in the IR triplet lines of Ca II. A
s a result, a new mean model of the sunspot chromosphere is provided.