Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:tutorials:small_programs_a_quick_start:xas [2016/10/07 19:54] – created Maurits W. Haverkort | documentation:tutorials:small_programs_a_quick_start:xas [2017/01/15 15:48] (current) – Marius Retegan | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
+ | ====== XAS ====== | ||
+ | ### | ||
+ | Example three calculates the $2p$ to $3d$ x-ray absorption spectra of transition metal compounds in cubic symmetry. It does so on a crystal field theory level. (Not the most accurate, but very informative. Ligand field calculations can be found later in the tutorials) As input it requires the ion name, the scaling factor for the Slater integrals, the size of the crystal field, a possible magnetic field and a temperature. The output contains the x-ray absorption spectra for all possible polarizations. Besides plots of a few standard polarizations the conductivity tensor is given, which allows one to create any experimental geometry possible. | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | This is a nice little script to play with and learn what x-ray absorption spectroscopy measures. For example have a look how the linear and circular dichroism change in NiO (Ni$^{2+}$ with 10Dq=1.1, red=0.9 or so) as a function of temperature. You can see these in the conductivity tensor. | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | The configuration file is: | ||
+ | <code Quanty conf.in> | ||
+ | -- 3d ion (e.g. Sc ... Cu) : | ||
+ | ion = " | ||
+ | -- Universal scaling parameter for the Slater integrals (beta): | ||
+ | beta = 0.90 | ||
+ | -- Cubic Crystal Field Strength (10Dq) [eV] | ||
+ | tenDq = 1.1 | ||
+ | -- External magnetic field Bext [Tesla] | ||
+ | Bx = 5 ; By = 0 ; Bz = 10 | ||
+ | -- Temperature [Kelvin] | ||
+ | T = 1 | ||
+ | </ | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | {{: | ||
+ | |||
+ | $L_{2,3}$ x-ray absorption spectra of Ni$^{2+}$ including magnetic circular dichroism. | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | Besides some text this program also creates plots of the x-ray absorption spectra. In the configuration file the magnetic field is set in the $(102)$ direction. The temperature is $1$ Kelvin and as the field size in the $z$ direction is 10 Tesla the Ni ion will be fully magnetically polarized. One can calculate the magnetic circular dichroic spectra by calculating the spectra for left and right circular polarized light and calculating the difference. This is done in this example and in the figure above one can see in the top pannel the XAS for $z$, $R$ (right circular) and $L$ (left circular) polarized light. The bottom pannel shows the isotropic spectra and the magnetic circular dichroic spectrum. | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | {{: | ||
+ | |||
+ | The conductivity tensor for excitations from $2p$ to $3d$ in Ni$^{2+}$ | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | In principle one can calculate the spectra for any magnetic field direction, but also for any polarization direction. The Poyinting vector must not be in the $z$ direction and there are thus infinite possibilities to define left circular polarized light. In optics this is solved by calculating the optical conductivity tensor. This is a three by three matrix that describes the optical properties of the material for any posible polarization. If $\sigma(\omega)$ is the energy dependent conductivity tensor (three by three matrix) and $\varepsilon$ the polarization (a vector of length three) then the absorption is give as: $I_{XAS} = -\mathrm{Im}[\varepsilon^* \cdot \sigma(\omega) \cdot \varepsilon$]. The conductivity tensor for Ni$^{2+}$ with a field in the $(102)$ direction is shown in the figure above. | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | The figure above shows several interesting features. The diagonal elements show magnetic linear dichroism, but also some of the off diagonal elements are influenced by magnetic linear dichroism. The $yz$ component for example is symmetric (equal to the $zy$ component) and also given by a magnetic linear dichroic effect. (See [[http:// | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | Information on the ground state is given in the text output, which is: | ||
+ | <file Quanty_Output XAS.out> | ||
+ | --> This program is the spectra calculator. | ||
+ | --> Assuming a specific ionic configuration for Me^{2+} , the L-edge spectra are produced and plotted in a separate file. | ||
+ | |||
+ | --> Chosen parameters are as follows: | ||
+ | Ion | ||
+ | Ni 0.9000000 | ||
+ | |||
+ | ---> Setting up the Slater Integrals ... | ||
+ | ---> Initial values are taken from M.W.Haverkort' | ||
+ | |||
+ | |||
+ | --> Assumed initial configuration: | ||
+ | --> INITIAL STATE PARAMETERS | ||
+ | F0dd F2dd F4dd zeta_3d | ||
+ | | ||
+ | |||
+ | --> Assumed final configuration: | ||
+ | --> FINAL STATE PARAMETERS | ||
+ | F0dd F2dd F4dd zeta_3d zeta_2p F2pd G1pd G3pd | ||
+ | | ||
+ | |||
+ | --> Calculating the lowest 45 eigenstates... | ||
+ | |||
+ | --> Ground state properties | ||
+ | |||
+ | < | ||
+ | -2.706 | ||
+ | -2.705 | ||
+ | -2.703 | ||
+ | -1.640 | ||
+ | -1.640 | ||
+ | -1.621 | ||
+ | -1.621 | ||
+ | -1.620 | ||
+ | -1.570 | ||
+ | -1.569 | ||
+ | -1.568 | ||
+ | -1.549 | ||
+ | -0.944 | ||
+ | -0.876 | ||
+ | -0.876 | ||
+ | -0.876 | ||
+ | -0.797 | ||
+ | -0.797 | ||
+ | -0.766 | ||
+ | -0.766 | ||
+ | -0.766 | ||
+ | -0.489 | ||
+ | -0.489 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Now the finite temperature properties will be calculated. | ||
+ | Boltzmann averaging of the M=2Ms+Ml operator and of the X-ray absorption spectra. | ||
+ | |||
+ | Partition function is sufficiently converged after Npsi= 2 | ||
+ | Z, | ||
+ | |||
+ | For a magnetic field of ( 5.000000 0.000000 10.000000 ) Tesla | ||
+ | At temperature T=1.000000 Kelvin, the magnetic moment is: | ||
+ | | ||
+ | x 0.44461 | ||
+ | y 0.00000 | ||
+ | z 0.88920 | ||
+ | Printing the components of the conductivity tensor (sigma[i, | ||
+ | Printing the XAS spectra | ||
+ | Prepare gnuplot-file for XAS spectra | ||
+ | Prepare gnuplot-file for Sigma | ||
+ | |||
+ | Execute the gnuplot to produce plots and convert the output into a pdf-file | ||
+ | FINISHED | ||
+ | </ | ||
+ | ### | ||
+ | |||
+ | ### | ||
+ | For completeness, | ||
+ | <code Quanty XAS.Quanty> | ||
+ | -- script contributed by Yaroslav Kvashnin | ||
+ | |||
+ | -- Minimize the output of the program, i.e. for longer calculations | ||
+ | -- the program tells the user what it is doing. For these short | ||
+ | -- examples the result is instant. | ||
+ | Verbosity(0) | ||
+ | |||
+ | print(" | ||
+ | print(" | ||
+ | print("" | ||
+ | print(" | ||
+ | |||
+ | dofile(" | ||
+ | |||
+ | io.write(" | ||
+ | io.write(string.format(" | ||
+ | io.write(" | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(" | ||
+ | print("" | ||
+ | |||
+ | if ion==" | ||
+ | Nelec=9 | ||
+ | -- initial state parameters | ||
+ | zeta_3d=0.102; | ||
+ | -- final state parameters | ||
+ | zeta_2p=13.498; | ||
+ | -- final state parameters | ||
+ | Xzeta_3d=0.124; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=8 | ||
+ | zeta_3d=0.083; | ||
+ | zeta_2p=11.507; | ||
+ | Xzeta_3d=0.102; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=7 | ||
+ | zeta_3d=0.066; | ||
+ | zeta_2p=9.748; | ||
+ | Xzeta_3d=0.083; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=6 | ||
+ | zeta_3d=0.052; | ||
+ | zeta_2p=8.200; | ||
+ | Xzeta_3d=0.067; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=5 | ||
+ | zeta_3d=0.040; | ||
+ | zeta_2p=6.846; | ||
+ | Xzeta_3d=0.053; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=4 | ||
+ | zeta_3d=0.030; | ||
+ | zeta_2p=5.668; | ||
+ | Xzeta_3d=0.041; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=3 | ||
+ | zeta_3d=0.022; | ||
+ | zeta_2p=4.650; | ||
+ | Xzeta_3d=0.031; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=2 | ||
+ | zeta_3d=0.016; | ||
+ | zeta_2p=3.776; | ||
+ | Xzeta_3d=0.023; | ||
+ | |||
+ | elseif ion==" | ||
+ | Nelec=1 | ||
+ | zeta_3d=0.010; | ||
+ | zeta_2p=3.032; | ||
+ | Xzeta_3d=0.017; | ||
+ | |||
+ | else | ||
+ | print(" | ||
+ | os.exit() | ||
+ | end | ||
+ | |||
+ | -- scaling with beta factor | ||
+ | F2dd=beta*F2dd; | ||
+ | F2pd=beta*F2pd; | ||
+ | XF2dd=beta*XF2dd; | ||
+ | |||
+ | -- number of possible many-body states in the initial configuration | ||
+ | Npsi = fact(10) / (fact(Nelec) * fact(10-Nelec)) | ||
+ | |||
+ | -- Bringing everything to the same units (eV) | ||
+ | T = T * EnergyUnits.Kelvin.value | ||
+ | Bx = Bx * EnergyUnits.Tesla.value | ||
+ | By = By * EnergyUnits.Tesla.value | ||
+ | Bz = Bz * EnergyUnits.Tesla.value | ||
+ | |||
+ | -- 10 d-electrons + 6 p-electrons | ||
+ | NFermion=16 | ||
+ | NBoson=0 | ||
+ | -- p-shell [dn] | ||
+ | IndexDn_2p={0, | ||
+ | -- p-shell [up] | ||
+ | IndexUp_2p={1, | ||
+ | -- d-shell [dn] | ||
+ | IndexDn_3d={6, | ||
+ | -- d-shell [up] | ||
+ | IndexUp_3d={7, | ||
+ | |||
+ | -- define the operators | ||
+ | OppSx | ||
+ | OppSy | ||
+ | OppSz | ||
+ | OppSsqr =NewOperator(" | ||
+ | OppSplus=NewOperator(" | ||
+ | OppSmin =NewOperator(" | ||
+ | |||
+ | OppLx | ||
+ | OppLy | ||
+ | OppLz | ||
+ | OppLsqr =NewOperator(" | ||
+ | OppLplus=NewOperator(" | ||
+ | OppLmin =NewOperator(" | ||
+ | |||
+ | OppJx | ||
+ | OppJy | ||
+ | OppJz | ||
+ | OppJsqr =NewOperator(" | ||
+ | OppJplus=NewOperator(" | ||
+ | OppJmin =NewOperator(" | ||
+ | |||
+ | Oppldots=NewOperator(" | ||
+ | |||
+ | -- define the coulomb operator | ||
+ | -- we here define the part depending on F0 seperately from the part depending on F2 | ||
+ | -- when summing we can put in the numerical values of the slater integrals | ||
+ | |||
+ | OppF0 =NewOperator(" | ||
+ | OppF2 =NewOperator(" | ||
+ | OppF4 =NewOperator(" | ||
+ | |||
+ | -- Crystal field operator for the d-shell | ||
+ | Akm = PotentialExpandedOnClm(" | ||
+ | OpptenDq = NewOperator(" | ||
+ | Akm = PotentialExpandedOnClm(" | ||
+ | OppNeg = NewOperator(" | ||
+ | Akm = PotentialExpandedOnClm(" | ||
+ | OppNt2g = NewOperator(" | ||
+ | |||
+ | -- Spin-orbit coupling in 2p-shell | ||
+ | Oppcldots= NewOperator(" | ||
+ | -- core hole potentials: | ||
+ | -- direct | ||
+ | OppUpdF0 = NewOperator(" | ||
+ | OppUpdF2 = NewOperator(" | ||
+ | -- exchange | ||
+ | OppUpdG1 = NewOperator(" | ||
+ | OppUpdG3 = NewOperator(" | ||
+ | |||
+ | t=math.sqrt(1/ | ||
+ | |||
+ | -- setting up the transition operators with various polarisations | ||
+ | -- Dipole X | ||
+ | Akm = {{1, | ||
+ | TXASx = NewOperator(" | ||
+ | -- Dipole Y | ||
+ | Akm = {{1, | ||
+ | TXASy = NewOperator(" | ||
+ | -- Dipole Z | ||
+ | Akm = {{1,0,1}} ; | ||
+ | TXASz = NewOperator(" | ||
+ | |||
+ | TXASxpy | ||
+ | TXASypz | ||
+ | TXASzpx | ||
+ | TXASxpiy = t*(TXASx + I * TXASy) | ||
+ | TXASypiz = t*(TXASy + I * TXASz) | ||
+ | TXASzpix = t*(TXASz + I * TXASx) | ||
+ | |||
+ | --- right circular polarisation | ||
+ | TXASr = t*(TXASx - I * TXASy) | ||
+ | --- left circular polarisation | ||
+ | TXASl =-t*(TXASx + I * TXASy) | ||
+ | |||
+ | ------------------------------------------------ | ||
+ | ----- Input parameters for the Hamiltonian ----- | ||
+ | -- in crystal field theory U drops out of the equation | ||
+ | U | ||
+ | F0dd = U+(F2dd+F4dd)*2/ | ||
+ | XF0dd = U+(XF2dd+XF4dd)*2/ | ||
+ | -- in crystal field theory U drops out of the equation | ||
+ | Upd | ||
+ | F0pd = Upd + G1pd*1/15 + G3pd*3/70 | ||
+ | |||
+ | print("" | ||
+ | io.write(string.format(" | ||
+ | llist = {F0dd, F2dd, F4dd, zeta_3d} | ||
+ | print("" | ||
+ | print(" | ||
+ | io.write(" | ||
+ | for i=1,4 do | ||
+ | io.write(string.format(" | ||
+ | end | ||
+ | print("" | ||
+ | print("" | ||
+ | io.write(string.format(" | ||
+ | llist2 = {XF0dd, XF2dd, XF4dd, Xzeta_3d, zeta_2p, F2pd, G1pd, G3pd} | ||
+ | print("" | ||
+ | print(" | ||
+ | io.write(" | ||
+ | for i=1,8 do | ||
+ | io.write(string.format(" | ||
+ | end | ||
+ | print("" | ||
+ | |||
+ | -- initial state Hamiltonian | ||
+ | Hamiltonian = F0dd*OppF0 + F2dd*OppF2 + F4dd*OppF4 + tenDq*OpptenDq + zeta_3d*Oppldots | ||
+ | Hamiltonian = Hamiltonian + Bx * (2*OppSx + OppLx) + By * (2*OppSy + OppLy) + Bz * (2*OppSz + OppLz) | ||
+ | |||
+ | -- final state Hamiltonian | ||
+ | XASHamiltonian = XF0dd*OppF0 + XF2dd*OppF2 + XF4dd*OppF4 + tenDq*OpptenDq + Xzeta_3d*Oppldots + zeta_2p * Oppcldots + F2pd * OppUpdF2 + G1pd * OppUpdG1 + G3pd * OppUpdG3 | ||
+ | XASHamiltonian = XASHamiltonian + Bx * (2*OppSx + OppLx) + By * (2*OppSy + OppLy) + Bz * (2*OppSz + OppLz) | ||
+ | |||
+ | -- in order to make sure we have a filling of 2 electrons we need to define some restrictions | ||
+ | StartRestrictions = {NFermion, NBoson, {" | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | psiList = Eigensystem(Hamiltonian, | ||
+ | |||
+ | |||
+ | oppList={Hamiltonian, | ||
+ | |||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print("" | ||
+ | |||
+ | -- Energy of the lowest multiplet. To be shifted to 0 to get a proper partition function | ||
+ | |||
+ | Egrd=psiList[1] * Hamiltonian * psiList[1] | ||
+ | |||
+ | print(" | ||
+ | for key,value in pairs(psiList) do | ||
+ | expvalue = value * oppList * value | ||
+ | for k,v in pairs(expvalue) do | ||
+ | io.write(string.format(" | ||
+ | end | ||
+ | io.write(" | ||
+ | end | ||
+ | |||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | print(" | ||
+ | print("" | ||
+ | |||
+ | Z=0 | ||
+ | Mx =0 | ||
+ | MSx=0 | ||
+ | MLx=0 | ||
+ | My =0 | ||
+ | MSy=0 | ||
+ | MLy=0 | ||
+ | Mz =0 | ||
+ | MSz=0 | ||
+ | MLz=0 | ||
+ | Spectra_z=0 | ||
+ | Spectra_r=0 | ||
+ | Spectra_l=0 | ||
+ | |||
+ | --- Conductivity tensor | ||
+ | Sigma_X=0 | ||
+ | Sigma_Y=0 | ||
+ | Sigma_Z=0 | ||
+ | Sigma_X_p_Y=0 | ||
+ | Sigma_Y_p_Z=0 | ||
+ | Sigma_Z_p_X=0 | ||
+ | Sigma_X_p_IY=0 | ||
+ | Sigma_Y_p_IZ=0 | ||
+ | Sigma_Z_p_IX=0 | ||
+ | |||
+ | Z = 0 ; | ||
+ | |||
+ | for j=1, Npsi do | ||
+ | dZ = math.exp(-(psiList[j] * Hamiltonian * psiList[j] - Egrd)/T) | ||
+ | if (dZ < 0.000000001) then | ||
+ | print(" | ||
+ | print(" | ||
+ | break | ||
+ | end | ||
+ | Z = Z + dZ | ||
+ | Mx = Mx - psiList[j] * (2 * OppSx + OppLx) * psiList[j] * math.exp(-(psiList[j] * Hamiltonian * psiList[j] - Egrd)/T) | ||
+ | MSx = MSx - psiList[j] * (OppSx) | ||
+ | MLx = MLx - psiList[j] * (OppLx) | ||
+ | My = My - psiList[j] * (2 * OppSy + OppLy) * psiList[j] * math.exp(-(psiList[j] * Hamiltonian * psiList[j] - Egrd)/T) | ||
+ | MSy = MSy - psiList[j] * (OppSy) | ||
+ | MLy = MLy - psiList[j] * (OppLy) | ||
+ | Mz = Mz - psiList[j] * (2 * OppSz + OppLz) * psiList[j] * math.exp(-(psiList[j] * Hamiltonian * psiList[j] - Egrd)/T) | ||
+ | MSz = MSz - psiList[j] * (OppSz) | ||
+ | MLz = MLz - psiList[j] * (OppLz) | ||
+ | Spectra_z = Spectra_z + CreateSpectra(XASHamiltonian, | ||
+ | Spectra_r = Spectra_r + CreateSpectra(XASHamiltonian, | ||
+ | Spectra_l = Spectra_l + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_X = Sigma_X + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_Y = Sigma_Y + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_Z = Sigma_Z + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_X_p_Y = Sigma_X_p_Y + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_Y_p_Z = Sigma_Y_p_Z + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_Z_p_X = Sigma_Z_p_X + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_X_p_IY = Sigma_X_p_IY + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_Y_p_IZ = Sigma_Y_p_IZ + CreateSpectra(XASHamiltonian, | ||
+ | Sigma_Z_p_IX = Sigma_Z_p_IX + CreateSpectra(XASHamiltonian, | ||
+ | end; | ||
+ | Mx = Mx / Z | ||
+ | MSx = MSx / Z | ||
+ | MLx = MLx / Z | ||
+ | My = My / Z | ||
+ | MSy = MSy / Z | ||
+ | MLy = MLy / Z | ||
+ | Mz = Mz / Z | ||
+ | MSz = MSz / Z | ||
+ | MLz = MLz / Z | ||
+ | Spectra_z = Spectra_z/Z | ||
+ | Spectra_r = Spectra_r/Z | ||
+ | Spectra_l = Spectra_l/Z | ||
+ | Sigma_X = Sigma_X/Z | ||
+ | Sigma_Y = Sigma_Y/Z | ||
+ | Sigma_Z = Sigma_Z/Z | ||
+ | Sigma_X_p_Y = Sigma_X_p_Y/ | ||
+ | Sigma_Y_p_Z = Sigma_Y_p_Z/ | ||
+ | Sigma_Z_p_X = Sigma_Z_p_X/ | ||
+ | Sigma_X_p_IY = Sigma_X_p_IY/ | ||
+ | Sigma_Y_p_IZ = Sigma_Y_p_IZ/ | ||
+ | Sigma_Z_p_IX = Sigma_Z_p_IX/ | ||
+ | |||
+ | print("" | ||
+ | |||
+ | io.write(string.format(" | ||
+ | io.write(string.format(" | ||
+ | print(" | ||
+ | io.write(string.format(" | ||
+ | io.write(string.format(" | ||
+ | io.write(string.format(" | ||
+ | |||
+ | Spectra_ave | ||
+ | Spectra_XMCD = (Spectra_r - Spectra_l) | ||
+ | |||
+ | Sigma_11 = Sigma_X | ||
+ | Sigma_22 = Sigma_Y | ||
+ | Sigma_33 = Sigma_Z | ||
+ | |||
+ | Sigma_12 = Sigma_X_p_Y - I * Sigma_X_p_IY - 0.5 * (1 - I) * (Sigma_X + Sigma_Y) | ||
+ | Sigma_21 = Sigma_X_p_Y + I * Sigma_X_p_IY - 0.5 * (1 + I) * (Sigma_Y + Sigma_X) | ||
+ | |||
+ | Sigma_13 = Sigma_Z_p_X + I * Sigma_Z_p_IX - 0.5 * (1 + I) * (Sigma_X + Sigma_Z) | ||
+ | Sigma_31 = Sigma_Z_p_X - I * Sigma_Z_p_IX - 0.5 * (1 - I) * (Sigma_Z + Sigma_X) | ||
+ | |||
+ | Sigma_23 = Sigma_Y_p_Z - I * Sigma_Y_p_IZ - 0.5 * (1 - I) * (Sigma_Y + Sigma_Z) | ||
+ | Sigma_32 = Sigma_Y_p_Z + I * Sigma_Y_p_IZ - 0.5 * (1 + I) * (Sigma_Z + Sigma_Y) | ||
+ | |||
+ | |||
+ | print(" | ||
+ | Sigma_11.Print({{" | ||
+ | Sigma_22.Print({{" | ||
+ | Sigma_33.Print({{" | ||
+ | Sigma_12.Print({{" | ||
+ | Sigma_21.Print({{" | ||
+ | Sigma_13.Print({{" | ||
+ | Sigma_31.Print({{" | ||
+ | Sigma_23.Print({{" | ||
+ | Sigma_32.Print({{" | ||
+ | |||
+ | print(" | ||
+ | Spectra_z.Print({{" | ||
+ | Spectra_r.Print({{" | ||
+ | Spectra_l.Print({{" | ||
+ | Spectra_ave.Print({{" | ||
+ | Spectra_XMCD.Print({{" | ||
+ | |||
+ | -- prepare the gnuplot output for XAS | ||
+ | gnuplotInput = [[ | ||
+ | set autoscale | ||
+ | set xtic auto # set xtics automatically | ||
+ | set ytic auto # set ytics automatically | ||
+ | |||
+ | set style line 1 lt 1 lw 2 lc rgb "# | ||
+ | set style line 2 lt 1 lw 2 lc rgb "# | ||
+ | set style line 3 lt 1 lw 2 lc rgb "# | ||
+ | set style line 4 lt 1 lw 2 lc rgb "# | ||
+ | |||
+ | set xlabel "E (eV)" font " | ||
+ | set ylabel " | ||
+ | |||
+ | set out ' | ||
+ | set size 1.0, 1.0 | ||
+ | set terminal postscript portrait enhanced color " | ||
+ | |||
+ | set multiplot layout 4, 1 | ||
+ | plot " | ||
+ | " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | unset multiplot | ||
+ | |||
+ | ]] | ||
+ | |||
+ | print(" | ||
+ | -- write the gnuplot script to a file | ||
+ | file = io.open(" | ||
+ | file: | ||
+ | file: | ||
+ | |||
+ | -- prepare the gnuplot output for Sigma | ||
+ | gnuplotInput = [[ | ||
+ | set autoscale | ||
+ | set xtic auto # set xtics automatically | ||
+ | set ytic auto # set ytics automatically | ||
+ | set style line 1 lt 1 lw 2 lc 1 | ||
+ | set style line 2 lt 1 lw 2 lc 3 | ||
+ | |||
+ | set xlabel "E (eV)" font " | ||
+ | set ylabel " | ||
+ | |||
+ | set yrange [-0.3:0.3] | ||
+ | |||
+ | set out ' | ||
+ | set size 1.0, 1.0 | ||
+ | set terminal postscript portrait enhanced color " | ||
+ | |||
+ | set multiplot layout 6, 3 | ||
+ | |||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | plot " | ||
+ | " | ||
+ | |||
+ | unset multiplot | ||
+ | ]] | ||
+ | |||
+ | print(" | ||
+ | |||
+ | -- write the gnuplot script to a file | ||
+ | file = io.open(" | ||
+ | file: | ||
+ | file: | ||
+ | |||
+ | print("" | ||
+ | print(" | ||
+ | |||
+ | -- call gnuplot to execute the script | ||
+ | os.execute(" | ||
+ | os.execute(" | ||
+ | |||
+ | print(" | ||
+ | </ | ||
+ | ### | ||
+ | |||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> |