## Abstract

The Very Fast Inversion of the Stokes Vector (VFISV) is a Milne–Eddington spectral line inversion code used to determine the magnetic and thermodynamic parameters of the solar photosphere from observations of the Stokes vector in the 6173 Å Fe i line by the *Helioseismic and Magnetic Imager* (HMI) onboard the *Solar Dynamics Observatory* (SDO). We report on the modifications made to the original VFISV inversion code in order to optimize its operation within the HMI data pipeline and provide the smoothest solution in active regions. The changes either sped up the computation or reduced the frequency with which the algorithm failed to converge to a satisfactory solution. Additionally, coding bugs which were detected and fixed in the original VFISV release are reported here.

This is a preview of subscription content, access via your institution.

## Notes

- 1.
- 2.
The expressions used to calculate the noise for the Stokes parameters come from accounting for the gain, the exposure time, the temporal averaging and the number of filtergrams that go into calculating each Stokes parameter. The latter results in different values of

*σ*for the intensity and the polarization: \(\sigma_{I}=0.118\cdot\sqrt{I_{\mathrm{C}}}\) and \(\sigma_{Q,U,V}=0.204\cdot\sqrt{I_{\rm C}}\). This arises as a consequence of the chosen polarization modulation scheme, described in Hoeksema*et al.*(2014, in preparation). - 3.
- 4.
Assuming ± 3.5 km s

^{−1}line-of-sight velocity between the Sun and spacecraft, ± 2 km s^{−1}of solar rotation and ± 1.5 km s^{−1}of photospheric plasma motions, the possible induced Doppler shift can amount up to ± 0.144 Å. Under typical photospheric conditions, the spectral line is less than 1 Å wide (*i.e.*, less than 0.5 Å at each side of the position of the core), so the entire profile will always be contained in a ± 0.65 Å range around the central wavelength, in the absence of a magnetic field that would induce a Zeeman splitting. - 5.
Note that the algorithm used to produce the

*gold standard*was not a viable one for the HMI pipeline processing due to its high computation expense.

## References

Barnes, G., Leka, K.D., Crouch, A.D., Sun, X., Wagner, E.D., Schou, J.: 2014,

*Solar Phys.*, in press.Bevington, P.R.: 1969,

*Data Reduction and Error Analysis for the Physical Sciences*, McGraw-Hill, New York, 164.Borrero, J.M., Kobel, P.: 2011,

*Astron. Astrophys.***527**, A29.Borrero, J.M., Tomczyk, S., Norton, A.A., Darnell, T., Schou, J., Scherrer, P., Bush, R., Liu, Y.: 2007,

*Solar Phys.***240**, 177.Borrero, J.M., Tomczyk, S., Kubo, M., Socas-Navarro, H., Schou, J., Couvidat, S., Bogart, R.: 2011,

*Solar Phys.***273**, 267.Couvidat, S., Schou, J., Shine, R., Bush, R.I., Miles, J.W., Scherrer, P.H., Rairden, R.L.: 2012,

*Solar Phys.***275**, 285.Hoeksema, J.T., Liu, Y., Hayashi, K., Sun, X., Schou, J., Couvidat, S., Norton, A., Bobra, M., Centeno, R., Leka, K.D., Barnes, G., Turmon, M.: 2014,

*Solar Phys.*, in press.Leka, K.D., Barnes, G.: 2012,

*Solar Phys.***277**, 89.Lites, B.W., Skumanich, A.: 1990,

*Astrophys. J.***348**, 747.Lites, B.W., Casini, R., Garcia, J., Socas-Navarro, H.: 2007,

*Mem. Soc. Astron. Ital.***78**, 148.Liu, Y., Hoeksema, J.T., Scherrer, P.H., Schou, J., Couvidat, S., Bush, R.I., Duvall, T.L., Hayashi, K., Sun, X., Zhao, X.: 2012,

*Solar Phys.***279**, 295.Martínez González, M.J., Collados, M., Ruíz Cobo, B.: 2006,

*Astron. Astrophys.***456**, 1159.Martínez Pillet, V., Lites, B.W., Skumanich, A.: 1997,

*Astrophys. J.***474**, 810.Pesnell, W.D., Thompson, B.J., Chamberlin, P.C.: 2012,

*Solar Phys.***275**, 3.Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: 1992,

*Numerical Recipes in C*, 2nd edn. Cambridge University Press, Cambridge, 678.Rachkovsky, D.N.: 1962,

*Izv. Krym. Astrofiz. Obs.***28**, 259.Scherrer, P.H., Schou, J., Bush, R.I., Kosovichev, A.G., Bogard, R.S., Hoeksema, J.T.,

*et al.*: 2012,*Solar Phys.***275**, 207.Schou, J., Scherrer, P.H., Bush, R.I., Wachter, R., Couvidat, S., Rabello-Soares, M.C.,

*et al.*: 2012,*Solar Phys.***275**, 229.Skumanich, A., Lites, B.W.: 1987,

*Astrophys. J.***322**, 473.Unno, W.: 1956,

*Publ. Astron. Soc. Japan***8**, 108.

## Acknowledgements

Much of the reported effort was supported by Stanford University NASA Grant NAS5-02139 for SDO/HMI commissioning and pipeline code implementation; KDL and GB also acknowledge PO# NNG12PP28D/C# GS-23F-0197P from NASA/Goddard Space Flight Center. The National Center for Atmospheric Research is sponsored by the National Science Foundation.

## Author information

### Affiliations

### Corresponding author

## Additional information

The Many Scales of Solar Activity in Solar Cycle 24 as seen by SDO

Guest Editors: Aaron Birch, Mark Cheung, Andrew Jones, and W. Dean Pesnell

## Appendix

### Appendix

This section reports some coding mistakes that have been spotted in VFISV since its original release and that have been fixed in the fd10 HMI data pipeline version. This version can be found through the JSOC (Joint Science Operations Center) CVS tree at Stanford.

### A.1 Voigt Function

The Voigt function is a computationally intensive part of the forward modeling of the spectral line. In order to speed up the calculation, the actual Voigt function is only computed for small parts of the spectral range, close to the line core and far into the wings. In the intermediate wavelength regime the Voigt function is approximated by a Taylor expansion using a lookup table for the Taylor coefficients as a function of the central wavelength of the Voigt profile. Two bugs were found in the coding of the Voigt function of the spectral line.

An error in the wavelength indexing for the lookup table (inside the voigt_
taylor.f90 routine) resulted in sudden unphysical changes in the integrated area of the Voigt profile as a function of the central wavelength. This led to a periodic roughness pattern of the *χ*
^{2}-surface that resulted in the appearance of multiple local minima along the magnetic field direction when the algorithm was approaching the solution. Instead of being evenly spread (due to the effect of the photon noise), the solutions would preferentially fall along ridges with an 11 gauss periodicity in the magnetic field.

A second coding mishap in the calculation of the Voigt profile was a missing factor of two in the computation of the imaginary part of the Taylor expansion of the Voigt function, which affected the magneto-optical effects in strong field regions. This error is heritage of the same missing factor of 2 in a FORTRAN routine (voigt.f, originally developed by Harvey and Nordlund), which calculates the Voigt function. This routine has been used in a number of spectral line inversion codes for the calculation of the line profiles. Albeit small, the effect on the synthetic Stokes profiles lead to inhomogeneous patterns in the inverted magnetic fields inside sunspot umbrae.

### A.2 Uncertainties

The photon noise in the observed Stokes profiles propagates to the atmospheric model inferred by the inversion. When the algorithm has converged and the optimal model has been found, VFISV computes the formal uncertainties corresponding to each physical parameter. The variance associated with the retrieved model parameter *a*
_{
j
} is taken to be proportional to the corresponding diagonal element of the inverse of the curvature matrix \(\alpha_{jj}^{-1}\) (see, for instance, Bevington, 1969):

where the curvature matrix is the second cross-partial derivative of *χ*
^{2} with respect to combinations of two of the model parameters:

The non-diagonal elements of the inverse of the curvature matrix, \({\bf \alpha}^{-1}_{jk}\), are proportional to the covariances, \(\sigma ^{2}_{jk}\), between each pair, *a*
_{
j
} and *a*
_{
k
}. These elements give a sense of the degeneracy between any two given parameters of the model atmosphere.

An index switch inside the nested loop that calculates the elements of the covariance matrix (subroutine get_err of the inv_utils.f90 module) led to huge uncertainty values that were many orders of magnitude too large. After correcting for this problem, the magnitudes of these formal uncertainties lie within reasonable values and compare to those obtained through a Monte Carlo experiment.

## Rights and permissions

## About this article

### Cite this article

Centeno, R., Schou, J., Hayashi, K. *et al.* The Helioseismic and Magnetic Imager (HMI) Vector Magnetic Field Pipeline: Optimization of the Spectral Line Inversion Code.
*Sol Phys* **289, **3531–3547 (2014). https://doi.org/10.1007/s11207-014-0497-7

Received:

Accepted:

Published:

Issue Date:

### Keywords

- Helioseismic and Magnetic Imager
- Solar Dynamics Observatory
- Photosphere
- Sun, magnetic fields
- Techniques, polarimetric