05/08/19 v1 Initial python version.
Based on original Matlab code ePS_MFPAD.m

## Structure¶

Calculate MFPAD on a grid from input ePS matrix elements. Use fast functions, pre-calculate if possible. Data in Xarray, use selection functions and multiplications based on relevant quantum numbers, other axes summed over.

Choices for functions…

## To Do¶

• Propagate scale-factor to Mb.
• Benchmark on NO2 reference results.
• ~~Test over multiple E.~~
• Test over multiple R.
• More efficient computation? Use Xarray group by?

## Formalism¶

\begin{align}\begin{aligned}I_{\mu_{0}}(\theta_{\hat{k}},\phi_{\hat{k}},\theta_{\hat{n}},\phi_{\hat{n}})=\frac{4\pi^{2}E}{cg_{p_{i}}}\sum_{\mu_{i},\mu_{f}}|T_{\mu_{0}}^{p_{i}\mu_{i},p_{f}\mu_{f}}(\theta_{\hat{k}},\phi_{\hat{k}},\theta_{\hat{n}},\phi_{\hat{n}})|^{2}\label{eq:MFPAD}\\T_{\mu_{0}}^{p_{i}\mu_{i},p_{f}\mu_{f}}(\theta_{\hat{k}},\phi_{\hat{k}},\theta_{\hat{n}},\phi_{\hat{n}})=\sum_{l,m,\mu}I_{l,m,\mu}^{p_{i}\mu_{i},p_{f}\mu_{f}}(E)Y_{lm}^{*}(\theta_{\hat{k}},\phi_{\hat{k}})D_{\mu,\mu_{0}}^{1}(R_{\hat{n}})\label{eq:TMF}\\I_{l,m,\mu}^{p_{i}\mu_{i},p_{f}\mu_{f}}(E)=\langle\Psi_{i}^{p_{i},\mu_{i}}|\hat{d_{\mu}}|\Psi_{f}^{p_{f},\mu_{f}}\varphi_{klm}^{(-)}\rangle\label{eq:I}\end{aligned}\end{align}

In this formalism:

• $$I_{l,m,\mu}^{p_{i}\mu_{i},p_{f}\mu_{f}}(E)$$ is the radial part of the dipole matrix element, determined from the initial and final state electronic wavefunctions $$\Psi_{i}^{p_{i},\mu_{i}}$$ and $$\Psi_{f}^{p_{f},\mu_{f}}$$, photoelectron wavefunction $$\varphi_{klm}^{(-)}$$ and dipole operator $$\hat{d_{\mu}}$$. Here the wavefunctions are indexed by irreducible representation (i.e. symmetry) by the labels $$p_{i}$$ and $$p_{f}$$, with components $$\mu_{i}$$ and $$\mu_{f}$$ respectively; $$l,m$$ are angular momentum components, $$\mu$$ is the projection of the polarization into the MF (from a value $$\mu_{0}$$ in the LF). Each energy and irreducible representation corresponds to a calculation in ePolyScat.
• $$T_{\mu_{0}}^{p_{i}\mu_{i},p_{f}\mu_{f}}(\theta_{\hat{k}},\phi_{\hat{k}},\theta_{\hat{n}},\phi_{\hat{n}})$$ is the full matrix element (expanded in polar coordinates) in the MF, where $$\hat{k}$$ denotes the direction of the photoelectron $$\mathbf{k}$$-vector, and $$\hat{n}$$ the direction of the polarization vector $$\mathbf{n}$$ of the ionizing light. Note that the summation over components $$\{l,m,\mu\}$$ is coherent, and hence phase sensitive.
• $$Y_{lm}^{*}(\theta_{\hat{k}},\phi_{\hat{k}})$$ is a spherical harmonic.
• $$D_{\mu,\mu_{0}}^{1}(R_{\hat{n}})$$ is a Wigner rotation matrix element, with a set of Euler angles $$R_{\hat{n}}=(\phi_{\hat{n}},\theta_{\hat{n}},\chi_{\hat{n}})$$, which rotates/projects the polarization into the MF.
• $$I_{\mu_{0}}(\theta_{\hat{k}},\phi_{\hat{k}},\theta_{\hat{n}},\phi_{\hat{n}})$$ is the final (observable) MFPAD, for a polarization $$\mu_{0}$$ and summed over all symmetry components of the initial and final states, $$\mu_{i}$$ and $$\mu_{f}$$. Note that this sum can be expressed as an incoherent summation, since these components are (by definition) orthogonal.
• $$g_{p_{i}}$$ is the degeneracy of the state $$p_{i}$$.
epsproc.MFPAD.mfpad(dataIn, thres=0.01, inds={'Type': 'L', 'it': 1}, res=50, R=None, p=0)[source]
Parameters: dataIn (Xarray) – Contains set(s) of matrix elements to use, as output by epsproc.readMatEle(). thres (float, optional, default 1e-2) – Threshold value for matrix elements to use in calculation. ind (dictionary, optional.) – Used for sub-selection of matrix elements from Xarrays. Default set for length gauage, single it component only, inds = {‘Type’:’L’,’it’:‘1’}. res (int, optional, default 50) – Resolution for output (theta,phi) grids. R (list of Euler angles or quaternions, optional.) – Define LF > MF polarization geometry/rotations. For default case (R = None), 3 geometries are calculated, corresponding to z-pol, x-pol and y-pol cases. Defined by Euler angles (p,t,c) = [0 0 0] for z-pol, [0 pi/2 0] for x-pol, [pi/2 pi/2 0] for y-pol. p (int, optional.) – Defines LF polarization state, p = -1…1, default p = 0 (linearly pol light along z-axis). TODO: add summation over p for multiple pol states in LF. Ta – Xarray (theta, phi, E, Sym) of MFPADs, summed over (l,m) Tlm – Xarray (theta, phi, E, Sym, lm) of MFPAD components, expanded over all (l,m)