55
Luis Bellot Rubio Instituto de Astrofísica de Andalucía (CSIC), Spain The art of Stokes inversions

The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Luis Bellot RubioInstituto de Astrofísica de Andalucía (CSIC), Spain

The art of Stokes inversions

Page 2: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Outline

•  What are inversions? •  How do they work? •  Milne-Eddington inversions •  Accounting for asymmetric Stokes profiles •  Be careful with the choice of model atmosphere! •  Available codes •  Tips and tricks

•  Running SIR –  Control file –  Input files –  Tools for visualization and manipulation

•  SIR exercises

Page 3: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

What is an inversion?

•  In a broad sense, any inference of the physical conditions of the solar atmosphere based on the interpretation of observed Stokes profiles

–  Weak-field approximation, center-of-gravity method... –  Forward modeling –  PCA, artificial neural networks –  Least-squares fitting

•  What we want: vector magnetic field, gas temperature, gas velocity,...

•  What to expect: a model atmosphere capable of reproducing the observations…. nothing else!

Page 4: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Radiative transfer equation

•  The Stokes parameters obey the RTE

(Unno 1956; Rachkovsky 1962)

•  ηI,Q,U,V and ρQ,U,V depend on a ≡ (B, γ, χ, vLOS, T, Pe, vmic) •  This means that

–  Four Stokes parameters needed to understand just one of them –  Proper interpretations of the Stokes vector require a good knowledge

of the atmosphere (a)

Page 5: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Least-square inversions

•  The complete line transfer problem has to be solved •  Self-consistent inferences → least-square inversions

INITIAL MODEL ATMOSPHERE

SPECTRAL SYNTHESIS

PERTURBED MODEL

ATMOSPHERE

Nonlinear, least-squares fit

OBSERVED AND SYNTHETIC PROFILES

FINAL MODEL ATMOSPHERE

–  No simplifying assumptions –  Full Stokes vector fitted –  Complex model atmospheres –  All atmospheric parameters

inferred at the same time

Page 6: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  Inversion driven by χ2-minimization

•  2nd order Levenberg-Marquardt algorithm

•  Matrix A needs to be inverted to find . Two problems: –  A has large dimension –  A is quasi-singular

•  Two solutions: –  Atmosphere perturbed in coarse grid (fewer free parameters) –  Modified SVD method (Ruiz Cobo & del Toro Iniesta 1992)

How do they work?

r�2(a) +A(�2) · �a = 0

�2(a) =1

Nfree

4X

j=1

N�X

i=1

w2ij

�2j

⇥Iobsj (�i)� Isynj (�i,a)

⇤2

�a

Page 7: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Inversions based on ME atmospheres

•  ME atmosphere: –  Source function is linear with optical depth –  Absorption matrix does not vary with optical depth

•  Nine free parameters •  Analytical Stokes profiles •  Very fast inversion •  Smooth maps of physical quantities •  Results are reasonably accurate and easy to interpret

Page 8: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  Fe I 630.1 and 630.2 nm profiles degraded to Hinode/SP resolution and pixel size

MHD simulations (Vögler et al. 2005)

ME inversions of high-spatial resolution profiles

Page 9: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

ME inversions of high-spatial resolution profiles

+ ME inv

ME inv

MHD simulations (Vögler et al. 2005)

•  Profiles reasonably well fitted •  ME results are some kind of

“average” of physical parameters along the LOS

Page 10: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  Atmospheric parameters from MHD simulation at log τ = -2

•  Maps of inferred B and γ similar to real ones!

ME inversions of high-spatial resolution profiles

Orozco Suárez et al. 2007, ApJ, 662, L31

MHD simulations (Vögler et al. 2005) Magnetic field strength Field inclination

Inferred field inclination Inferred field strength

Page 11: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Inversions based on ME atmospheres

•  ME atmosphere: –  Source function is linear with optical depth –  Absorption matrix does not vary with optical depth

•  Nine free parameters •  Analytical Stokes profiles •  Very fast inversion •  Smooth maps of physical quantities •  Results are easy to interpret

•  Simplistic treatment of line formation •  No thermal information. No height variations •  Cannot account for asymmetric Stokes profiles

Page 12: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Asymmetric Stokes profiles

+ +

Continuum intensity Stokes V at Δλ = -3.8 pm

TESOS+VIP, Sep 2006

•  KIS/IAA Visible Imaging Polarimeter + TESOS + KAOS •  VTT, Observatorio del Teide •  Spatial resolution: ∼0.4" •  Quiet Sun at center, Fe I 630.15 and 630.25 nm

Page 13: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

The origin of asymmetries

The area asymmetry gives information on the height variation

of atmospheric parameters

Amplitude asymmetry/ Multi-lobed Stokes profiles

Different magnetic atmospheres coexisting in resolution element

Area asymmetry Gradients/discontinuities of B and vLOS along LOS

RF of Stokes V to B

Cabrera Solana et al. (2005)

Auer & Heasley (1978)

Page 14: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  Inversion codes capable of dealing with asymmetries –  Are based on numerical solution of RTE –  Provide reliable thermal information –  Can use fewer free parameters than ME codes –  Infer stratifications of physical parameters with depth

Accounting for asymmetries

Page 15: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Accounting for asymmetries

Page 16: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Accounting for asymmetries

Page 17: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Luis R. Bellot RubioSpectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, COSpectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO

Be careful with the choice of atmospheric model!

•  The results change if the physical model is changed –  Too simplistic models; often they cannot describe the real atmosphere –  BUT: we get information about the magnetic structure of the atmosphere!

-5 -4 -3 -2 -1 0 1 2log tau

0.00.51.01.52.02.5

B [k

G]

-400 -200 0 200 400Lambda [mA]

0.50.60.70.80.91.0

I/IQ

S

-400 -200 0 200 400Lambda [mA]

-0.10-0.05

0.00

0.05

0.10

V/I Q

S

Magnetic flux tubes in facular regions

Flux tube model

Fe I 630.2 nm

Page 18: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Luis R. Bellot RubioSpectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, COSpectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO

•  The results change if the physical model is changed –  Too simplistic models; often they cannot describe the real atmosphere –  BUT: we get information about the magnetic structure of the atmosphere!

-5 -4 -3 -2 -1 0 1 2log tau

0.00.51.01.52.02.5

B [k

G]

-400 -200 0 200 400Lambda [mA]

0.50.60.70.80.91.0

I/IQ

S

-400 -200 0 200 400Lambda [mA]

-0.10-0.05

0.00

0.05

0.10

V/I Q

S

Magnetic flux tubes in facular regions

-400 -200 0 200 400Lambda [mA]

0.50.60.70.80.91.0

I/IQ

S

-400 -200 0 200 400Lambda [mA]

-0.10-0.05

0.00

0.05

0.10

V/I Q

S

Flux tube model Best-fit 1C model

Fe I 630.2 nm

Be careful with the choice of atmospheric model!

Page 19: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Luis R. Bellot RubioSpectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, COSpectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO

•  The results change if the physical model is changed –  Too simplistic models; often they cannot describe the real atmosphere –  BUT: we get information about the magnetic structure of the atmosphere!

-5 -4 -3 -2 -1 0 1 2log tau

0.00.51.01.52.02.5

B [k

G]

-400 -200 0 200 400Lambda [mA]

0.50.60.70.80.91.0

I/IQ

S

-400 -200 0 200 400Lambda [mA]

-0.10-0.05

0.00

0.05

0.10

V/I Q

S

-5 -4 -3 -2 -1 0 1 2log tau

0.00.51.01.52.02.5

B [k

G]

-400 -200 0 200 400Lambda [mA]

0.50.60.70.80.91.0

I/IQ

S

-400 -200 0 200 400Lambda [mA]

-0.10-0.05

0.00

0.05

0.10

V/I Q

S

Flux tube model Best-fit 1C model

Fe I 630.2 nm

Be careful with the choice of atmospheric model!

EXERCISE 3

Facular profiles from ASP

Page 20: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Available codes for inversions with gradients

SIR Ruiz Cobo & del Toro Iniesta (1992)

1C & 2C atmospheres, arbitrary stratifications, any photospheric line

SIR/FT Bellot Rubio et al. (1996) Flux tube model, arbitrary stratifications, any photospheric line

SIR/NLTE Socas-Navarro et al. (1998) NLTE line transfer, arbitrary stratifications

NICOLE Socas-Navarro et al. (2015) 1C & 2C, NLTE, arbitrary stratifications

SPINOR Frutiger & Solanki (2001) 1C & 2C atmospheres, arbitrary stratifications, any photospheric line, molecular lines, flux tube model, uncombed model

STiC de la Cruz Rodríguez et al. NLTE, based on RH, arbitrary stratifications, photospheric/chromospheric/TR lines

SIR/GAUS Bellot Rubio (2003) Uncombed penumbral model, arbitrary stratifications

SIR/JUMP Bellot Rubio (in preparation) Canopy-like atmospheres

(in preparation)

Page 21: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  First of all, look at the profiles •  Try a ME-like inversion, it usually works

–  Use 1C inversion with height-independent magnetic/dynamic parameters –  If the V profiles are very asymmetric, fit only I, Q, and U

•  Examine the fits: are they reasonably good? •  Identify

–  Pixels with bad fits and/or large asymmetries –  Regions where interesting physical processes occur

•  Run SIR inversions on these pixels –  Which model are you going to use?

1C model, 2C model, flux tube model, uncombed model? –  Use ME results as initialization –  Give more weight to the strangest Stokes parameter –  Do it simple! See if linear stratifications (2 nodes) are sufficient –  If not, increase the number of nodes gradually

•  Ask yourself if the retrieved model atmosphere makes sense!!

Tips and tricks

Page 22: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

1C SIR inversion of Hinode/SP data

+

+

EXERCISE 2

Page 23: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  First of all, look at the profiles •  Try a ME-like inversion, it usually works

–  If the V profiles are very asymmetric, fit only I, Q, and U

•  Examine the fits: are they reasonably good? •  Identify

–  Pixels with bad fits and/or large asymmetries –  Regions where interesting physical processes occur

•  Run more complex inversions on these pixels –  Which model are you going to use?

1C model, 2C model, flux tube model, uncombed model? –  Use ME results as initialization (with f=1?) –  Give more weight to the strangest Stokes parameter –  Do it simple! See if linear stratifications (2 nodes) are sufficient –  If not, increase the number of nodes gradually

•  Ask yourself if the retrieved model atmosphere makes sense!!

Tips and tricks

Page 24: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

•  First of all, look at the profiles •  Try a ME-like inversion, it usually works

–  If the V profiles are very asymmetric, fit only I, Q, and U

•  Examine the fits: are they reasonably good? •  Identify

–  Pixels with bad fits and/or large asymmetries –  Regions where interesting physical processes occur

•  Run more complex inversions on these pixels –  Which model are you going to use?

1C model, 2C model, flux tube model, uncombed model? –  Use results from ME-like inversion as initialization –  Give more weight to the strangest Stokes parameter –  Keep it simple! See if linear stratifications (2 nodes) are sufficient

•  Ask yourself if the retrieved model atmosphere makes sense!! •  Experts are always around: ask them for advice!

Tips and tricks

Page 25: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

The SIR inversion code

Stokes Inversion based on Response functions (Ruiz Cobo & del Toro Iniesta 1992)

•  Plane-parallel geometry •  Local thermodynamical equilibrium •  Neutral, singly and doubly ionized species •  Arbitrary stratifications of the atmospheric parameters •  1C or 2C model atmospheres

•  Parallel version available: SIR_parallel (ask me!)

Page 26: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Installing SIR

https://github.com/BasilioRuiz/SIR-code

Download code from

Compile with

Copy binaries sir.x and modelador3.x to /usr/local/bin or make soft links with

sudo ln –s [path]/code/sir.x ; cd /usr/local/bin

make fc=gfortran sir.x ; cd [path]/code

Copy IDL tools to folder in the IDL path. Copy file ‘scales’ to ~/bin

cp [path]/idl/* your_IDL_folder

make fc=gfortran modelador3.x

sudo ln –s [path]/code/modelador3.x

mkdir ~/bin ; cp [path]/idl/scales ~/bin

Page 27: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

Number of cycles: 0: Synthesis mode

>0: Inversion mode

−1: Compute response functions d at every depth

−2: Compute response functions d at the nodes

Page 28: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files

Line index

Δλ [mA] I/Iqs Q/Iqs U/Iqs V/Iqs

Stokes profile file: [ ].per

SIR is controlled by a control file: [ ].trol

read_profile.pro write_profile.pro

Page 29: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

Stray light file Same format as Stokes profile file. Contains the stray light contamination, assumed to be unpolarized (so that Q=U=V=0)

Page 30: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Stray-light considerations

•  Stray-light in 1C inversions: –  Iobs= (1-α) I1 + α Istray –  Accounts for both stray light and/or magnetic filling factor

•  Stray-light in 2C inversions: –  It is NOT equivalent to a magnetic filling factor –  SIR has two free parameters: α and f

–  Iobs= (1-α) [f I1 + (1-f) I2] + α Istray

•  Global vs local stray-light profile –  Classical treatment: global stray-light profile (average over FOV) –  Orozco Suárez et al. (2007): local stray-light profile accounts

for telescope diffraction

•  Deconvolution of instrumental PSF (only space-based obs!)

Page 31: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

PSF file: [ ].psf Contains two columns

1.  Wavelength in mA with respect to center of the line

2.  Spectral PSF of the instrument

Page 32: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Wavelength grid file: [ ].grid

Running SIR: input files SIR is controlled by a control file: [ ].trol

Necessary only in synthesis mode and when blends are to be computed

Page 33: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Atomic parameter file

Running SIR: input files SIR is controlled by a control file: [ ].trol

Line index Ion λ E χ log gf transition

collisional parameters

Page 34: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

log τ T Pe vmic B vLOS γ ϕ z [km] Pg ρ

MODEL FILE: [ ].mod

read_model.pro write_model.pro modelador3.x

Macroturbulence (km/s) Fillig factor (f) Stray light factor (α)

Page 35: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

Page 36: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Concept of nodes

•  Keeping the number of free parameters small: –  Atmospheric parameters perturbed in coarse grid (nodes) –  Full stratifications in finer grid by cubic spline interpolation

Page 37: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

The “real” SUN

Synthetic “observations”

Approaching the solution gradually

Basilio Ruiz Cobo

Page 38: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Initial guess model

Approaching the solution gradually

Basilio Ruiz Cobo

Page 39: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Approaching the solution gradually

Basilio Ruiz Cobo

Page 40: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Approaching the solution gradually

Basilio Ruiz Cobo

Page 41: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

Number of nodes

•  Eachcolumncorrespondstoacycle•  Assumewehave2cycleswithNodesforT:2,3NodesforB:1Inthefirstcycle,2nodesforTand1forBwillbeused.Inthesecondcycle,3forTand1forBwillbeused

•  0nodesinelectronpressureimpliesHE•  Ifnodes=-1,theperturbationfortheotheratmosphereistaken(only2Cinversions)

•  If“Automaticselectionofnodes”isforinstance0,0,1,SIRwillusethespecifiednumberofnodesinthefirstandsecondcycles,butinthethirditwilluselessnodesthanthosespecified

•  Numberofnodes*meansanyvalue(onlyforautomaticselection)

Page 42: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Running SIR: input files SIR is controlled by a control file: [ ].trol

Other inversion settings

Page 43: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Executing the inversion

echo sir.trol | sir.x

Copy the executable sir.x to /usr/local/bin or make a soft link with

sudo ln –s [path]/sir.x cd /usr/local/bin

Page 44: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Visualizing SIR results: graphics.pro

Model atmospheres

Stokes profiles

[path]/idl/graphics.pro

Page 45: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Visualizing SIR results: sirgui.py

Stokes profiles and model atmospheres

https://github.com/rcenteno/SIR_GUI

Page 46: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

IDL procedures to read/write SIR files

-  read_profile, ’ .per’, index, wave, SI, SQ, SU, SV -  write_profile, ’ .per’, index, wave, SI, SQ, SU, SV

-  read_model , ’ .mod’, log(τc), T, Pe, mic, B, γ, φ, z, Pg, ρ , Vmac, filling, stray -  write_model, ’ .mod’, log(τc), T, Pe, mic, B, γ, φ, z, Pg, ρ , Vmac, filling, stray

-  read_RF, ’ .rh’, RF_SI, RF_SQ, RF_SU, RF_SV, ntau, nlam -  read_RF_nomag, ’ .rh’, RF_SI, ntau, nlam

-  Pe_PgT, T, Pg, Pe, µ, ρ , γad , κ , ne , nH , nH+ , ion.deg, α, δ, cv , cp , cs

Page 47: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Manipulating model atmospheres: modelador3.x

Page 48: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

SIR exercises

https://github.com/Luis-Bellot/SIR-course

Download exercises from

or from the school website

https://www2.hao.ucar.edu/spectropolarimetry/slides

Page 49: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 1

Spectral synthesis and inversion of synthetic profiles

Use HSRA model to synthesize Stokes profiles with 1.  constant B, inclination and vLOS (e.g., 1 kG, 60º, 2 km/s)

2.  constant vLOS, gradients of B and inclination 3.  gradients of B, inclination and vLOS

Invert profiles from (3), starting from initial guess model with flat stratifications of B, vLOS, and inclination (modify hsra.mod)

•  1 node in B, vlos, inclination •  2 nodes in B, vLOS and inclination

read_model,’hsra.mod’,tau,t,pe,mic,b,v, gamma,phi,zeta,pg,rho,mac,ff,stray v=2e5+0.*tau b=1000.+200.*tau write_model,’hsra-grad.mod’, tau,t,pe,mic,b,v, gamma,phi,zeta,pg,rho,mac,ff,stray

Page 50: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 2

Inversion of profiles from dark-cored penumbral filament

Hinode/SP observations with SNR~1000, no telluric lines, two lines Fe I 630.1 and 630.2 nm Strong, symmetric signals

1.  What kind of model would you use to invert them? 2.  Can the fit be improved with more nodes in T? (use 2 cycles!) 3.  What happens with 2 nodes in B and vLOS? 4.  What happens with 10 nodes in B and vLOS?

If no instrumental PSF is available, use macroturbulence to mimick its effect (i.e, invert vmac) Use more weight for Q, U and V to force better fits to those parameters A worse equivalent SNR does not necessarily mean a worse fit (i.e., a lower chi2) Beware of models with too much freedom. Always check uncertainties!

Page 51: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 3

Inversion of facular profiles in quiet Sun

HAO/ASP observations, averaged over facular region, SNR~10000, but poor spatial resolution Two lines Fe I 630.1 and 630.2 nm (plus telluric lines!) Strong signals, large Stokes V area and amplitude asymmetries

1.  What kind of model would you try to invert them? 2.  Use two cycles, increasing number of nodes in 2nd cycle 3.  Invert stray-light fraction, micro- and macro-turbulence

Use large negative number (<-1) in profiles to ignore blends in Stokes I during inversion We invert Stokes I and V only, so vertical fields should be assumed Use instrumental PSF and macroturbulence at the same time (asp.psf) Use stray light profile (straylight.per) Use weights of 10 and 100 for Stokes V

Page 52: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 4

Inversion of quiet-Sun internetwork profiles

Hinode/SP observations at disk center from 0.16’’ x 0.16” pixel, integrated for 6 min, SNR~105, still high spatial resolution Two lines Fe I 630.1 and 630.2 nm Extremely weak signals, but linear polarization clearly seen. Large asymmetries.

1.  What kind of model would you try to invert them? 2.  Use three cycles with increasing number of nodes 3.  Invert stray-light fraction and microturbulence (flat stratification) 4.  Interpret resulting model

No need for macroturbulence when high-resolution data are inverted using telescope PSF, so set it to zero (or better to 0.01 km/s) Use following weights: 1,4,4,4

Page 53: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 5

Inversion of sunspot penumbral profiles near PIL

Hinode/SP observations with SNR~1000, no telluric lines, two lines Fe I 630.1 and 630.2 nm Strong signals, but Stokes V profile with three lobes......

1.  What kind of model would you use to invert them? One-component model with opposite magnetic polarities along LOS? Two-component model?

2.  Try both! 3.  Interpret the results

Inversion of these profiles will not be easy. Do your best! Give more weight to Stokes V to force better fits. Increase weight with cycle If everything fails, use superpowers (aka automatic selection of nodes...)

Page 54: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 6

Internetwork profiles with very weak Q, U signals Simulated Hinode obs, SNR~1000, Fe I 630.1 and 630.2 nm

Use 2C models for synthesis and inversion Beware of noisy linear polarization profiles.... Find ways to minimize the problem!

Synthesize Stokes profiles from 2 component model 1.  magnetic atmosphere: B=200 G, γ = 30º, az=30º, ff=0.05, v=1 km/s

2.  non-magnetic atmosphere: hsra.mod with ff=0.95 3.  Save profiles. Then add noise at the level of 10-3 using

add_noise,filename,1e-3. Save noisy profiles

Invert noise-free, then noisy profiles. Use simple 2C model, freezing 2nd component to hsra.mod.

Interpret resulting field inclinations and field strengths for different realizations of the noise at the 10-3 level

Page 55: The art of Stokes inversions - High Altitude ObservatoryInstituto de Astrofísica de Andalucía (CSIC), Spain Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018,

Spectropolarimetry and Diagnostic Techniques School, 24 Sep-05 Oct 2018, Estes Park, CO Luis Bellot Rubio

Exercise 7

Inversion of CRISP profiles from sunspot penumbrae

SST/CRISP observations with SNR~500, sequential spectral sampling of Fe I 617.3 nm (30 wavelengths in ~30 s) Strongly Doppler-shifted polarization profiles

1.  What kind of model would you use to invert them? 2.  Use stray-light contamination 3.  Start with profile obs_10d_75.per, then obs_10d_71.per 4.  You are on your own! I have not inverted these profiles yet...

Example of Stokes profiles observed with a Fabry-Pérot interferometer Extremely high spatial resolution, but modest spectral resolution (~50 mA at 617 nm) Sequential sampling of line means first and last wavelengths are observed ~30 s apart