OCS ePS results processing + AF-BLMs (Jan 2022 update) + test ADMs from VM 14/01/22

Quick attempt at AF-BLMs for OCS, based on guessed/reasonable ADMs - action starts below after setup stage). Status: basically working, may be some remaining bugs with ADMs, cos^2 and renormalisation, but trends with alignment should be correct.

For methods: https://epsproc.readthedocs.io/en/dev/demos/ePSproc_class_demo_161020.html

Additional notes below

Setup

In [1]:
!hostname
jake
In [2]:
!conda env list
# conda environments:
#
base                     /home/paul/anaconda3
automation               /home/paul/anaconda3/envs/automation
baseBK-250821            /home/paul/anaconda3/envs/baseBK-250821
baseBK-280321            /home/paul/anaconda3/envs/baseBK-280321
ePSproc-v1.2             /home/paul/anaconda3/envs/ePSproc-v1.2
ePSproc-v1.2-dev         /home/paul/anaconda3/envs/ePSproc-v1.2-dev
epsTestConda             /home/paul/anaconda3/envs/epsTestConda
epsTestPip               /home/paul/anaconda3/envs/epsTestPip
epsTestPypi              /home/paul/anaconda3/envs/epsTestPypi
epsTestSetup             /home/paul/anaconda3/envs/epsTestSetup
epsdev                   /home/paul/anaconda3/envs/epsdev
epsdev-040821            /home/paul/anaconda3/envs/epsdev-040821
epsdev-040821-YMLnb      /home/paul/anaconda3/envs/epsdev-040821-YMLnb
epsdev-040821-YMLnb-bk     /home/paul/anaconda3/envs/epsdev-040821-YMLnb-bk
epsdev-shared-100122     /home/paul/anaconda3/envs/epsdev-shared-100122
epsdev-xr13              /home/paul/anaconda3/envs/epsdev-xr13
epsdev-xr15           *  /home/paul/anaconda3/envs/epsdev-xr15
epsdev-xr17              /home/paul/anaconda3/envs/epsdev-xr17
epsdevTestYML            /home/paul/anaconda3/envs/epsdevTestYML
epsman                   /home/paul/anaconda3/envs/epsman
fibre-sim                /home/paul/anaconda3/envs/fibre-sim
frog                     /home/paul/anaconda3/envs/frog
jbookTest                /home/paul/anaconda3/envs/jbookTest
matlab                   /home/paul/anaconda3/envs/matlab
qe-mini-example          /home/paul/anaconda3/envs/qe-mini-example
tmo-dev                  /home/paul/anaconda3/envs/tmo-dev

In [3]:
import sys
import os
from pathlib import Path
import numpy as np
# import epsproc as ep
import xarray as xr

import matplotlib.pyplot as plt

from datetime import datetime as dt
timeString = dt.now()

import epsproc as ep

# Plotters
import hvplot.xarray
from epsproc.plot import hvPlotters

# Multijob class dev code
from epsproc.classes.multiJob import ePSmultiJob

plotWidth = 700
hvPlotters.setPlotters(width = plotWidth, snsStyle='whitegrid')
hvPlotters.opts.defaults(hvPlotters.opts.Curve(height=plotWidth))   # Fix plot height! Currently not set by default.
* sparse not found, sparse matrix forms not available. 
* natsort not found, some sorting functions not available. 
* pyevtk not found, VTK export not available. 
In [4]:
# For class, above settings don't take, not sure why, something to do with namespaces/calling sequence?
# Overriding snsStyle does work however... although NOT CONSISTENTLY????
# AH, looks like ordering matters - set_style LAST (.set seems to override)
import seaborn as sns

sns.set(rc={'figure.figsize':(10,6)})  # Set figure size in inches
sns.set_context("paper")
sns.set_style("whitegrid")  # Set plot style
sns.set_palette("Paired")   # Set colour mapping

# Try direct fig type setting for PDF output figs
from IPython.display import set_matplotlib_formats
# set_matplotlib_formats('png', 'pdf')
set_matplotlib_formats('svg', 'pdf')
/home/paul/anaconda3/envs/epsdev-xr15/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
  and should_run_async(code)
In [5]:
# xr.set_options(display_style='html')

Load data

In [6]:
import warnings
# warnings.filterwarnings('once')   # Skip repeated numpy deprecation warnings in current build (xr15 env)
warnings.filterwarnings('ignore')   # Skip repeated numpy deprecation warnings in current build (xr15 env)
In [7]:
# # Scan for subdirs, based on existing routine in getFiles()

fileBase = Path('/home/paul/ePS/OCS/OCS_survey')  # Data dir on Stimpy
In [8]:
# TODO: fix orb label here, currently relies on (different) fixed format

data = ePSmultiJob(fileBase, verbose = 0)

data.scanFiles()
data.jobsSummary()
*** Warning: Missing records, expected 64, found 48.
*** Warning: Found 16 blank sets of matrix elements, symmetries ['A2']
*** Warning: Missing records, expected 64, found 48.
*** Warning: Found 16 blank sets of matrix elements, symmetries ['A2']
*** Warning: Missing records, expected 64, found 48.
*** Warning: Found 16 blank sets of matrix elements, symmetries ['A2']
*** Warning: Missing records, expected 64, found 48.
*** Warning: Found 16 blank sets of matrix elements, symmetries ['A2']
Found 4 directories, with 8 files.

*** Job orb11 details
Key: orb11
Dir /home/paul/ePS/OCS/OCS_survey/orb11, 2 file(s).
{   'batch': 'ePS OCS, batch OCS_survey, orbital orb11',
    'event': ' orb 11 ionization, basic survey run.',
    'orbE': -11.35803261907539,
    'orbLabel': '# OCS, orb 11 ionization, basic survey run.'}

*** Job orb9 details
Key: orb9
Dir /home/paul/ePS/OCS/OCS_survey/orb9, 2 file(s).
{   'batch': 'ePS OCS, batch OCS_survey, orbital orb9',
    'event': 'orb 9 (E1/P) ionization, basic survey run.',
    'orbE': -18.34863774566971,
    'orbLabel': 'E1/P'}

*** Job orb10 details
Key: orb10
Dir /home/paul/ePS/OCS/OCS_survey/orb10, 2 file(s).
{   'batch': 'ePS OCS, batch OCS_survey, orbital orb10',
    'event': 'orb 10 (A1/S) ionization, basic survey run.',
    'orbE': -17.32548962282056,
    'orbLabel': 'A1/S'}

*** Job orb8 details
Key: orb8
Dir /home/paul/ePS/OCS/OCS_survey/orb8, 2 file(s).
{   'batch': 'ePS OCS, batch OCS_survey, orbital orb8',
    'event': 'orb 8 (A1/S) ionization, basic survey run.',
    'orbE': -21.51332196607811,
    'orbLabel': 'A1/S'}
In [9]:
# Fix labels for plots - currently have some mis-named files!

# Set state labels
v = ['C','B','A','X']
sDict = {n:v[k] for k,n in enumerate(range(9,13))}

for key in data.data.keys():
    data.data[key]['jobNotes']['orbKey'] = key  # Existing orb key, from filename
    data.data[key]['jobNotes']['orbGroup'] = int(key.strip('orb')) + 1   # Corrected orb group
#     data.data[key]['jobNotes']['orbLabel'] = f"HOMO - {12 - int(key.strip('orb')) - 1}"
    data.data[key]['jobNotes']['orbLabel'] = sDict[data.data[key]['jobNotes']['orbGroup']]
    
#     print(data.data[key]['jobNotes']['orbLabel'])

System properties

Note orbital numbering in table below:

  • Orb is Gamess file output orbital numbering, but energy but not grouped by degeneracy.
  • OrbGrp is grouped numbering by degeneracy, also used by ePolyScat, and will be used for labels etc. below.

BUT - file names are 0-indexed (oops), so give OrbGrp-1 here. Sorry.

In [10]:
data.molSummary()
*** Molecular structure
2022-01-16T15:28:03.192438 image/svg+xml Matplotlib v3.3.4, https://matplotlib.org/
*** Molecular orbital list (from ePS output file)
EH = Energy (Hartrees), E = Energy (eV), NOrbGrp, OrbGrp, GrpDegen = degeneracies and corresponding orbital numbering by group in ePS, NormInt = single centre expansion convergence (should be ~1.0).
props Sym EH Occ E NOrbGrp OrbGrp GrpDegen NormInt
orb
1 S -91.9901 2.0 -2503.178142 1.0 1.0 1.0 0.660569
2 S -20.6748 2.0 -562.589968 1.0 2.0 1.0 0.963189
3 S -11.4451 2.0 -311.437037 1.0 3.0 1.0 0.999998
4 S -8.9936 2.0 -244.728323 1.0 4.0 1.0 0.951187
5 S -6.6764 2.0 -181.674099 1.0 5.0 1.0 0.993503
6 P -6.6721 2.0 -181.557090 1.0 6.0 2.0 0.978550
7 P -6.6721 2.0 -181.557090 2.0 6.0 2.0 0.978550
8 S -1.5373 2.0 -41.832064 1.0 7.0 1.0 0.998241
9 S -1.0876 2.0 -29.595104 1.0 8.0 1.0 0.997329
10 S -0.7906 2.0 -21.513322 1.0 9.0 1.0 0.999269
11 P -0.6743 2.0 -18.348638 1.0 10.0 2.0 0.999887
12 P -0.6743 2.0 -18.348638 2.0 10.0 2.0 0.999887
13 S -0.6367 2.0 -17.325490 1.0 11.0 1.0 0.998566
14 P -0.4174 2.0 -11.358033 1.0 12.0 2.0 0.998839
15 P -0.4174 2.0 -11.358033 2.0 12.0 2.0 0.998839
*** Warning: some orbital convergences outside single-center expansion convergence tolerance (0.01):
[[1.         0.66056934]
 [2.         0.96318872]
 [4.         0.95118653]
 [6.         0.9785498 ]
 [7.         0.9785498 ]]
In [11]:
# Fix orb names! NOW FIXED ABOVE
/home/paul/anaconda3/envs/epsdev-xr15/lib/python3.7/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
  and should_run_async(code)

AF-$\beta_{LM}$ (UPDATES 13/12/21)

14/01/22 PH

With additional realistic ADMs from VM.

13/12/21 PH

Revisiting AF cases with (hopefully) better match to experimental alignment.

  • Add in cos^2(theta) metric.
  • Ballpark ADMs assuming Gaussian case.
  • Calculate & plot AF-BLMs for these cases.

Alignment metrics

Here we'll start with the molecular alignment defined in terms of axis distribution moments (ADMs), given by parameters $A^K_{Q,S}(t)$:

$ P(\Omega,t) = \sum_{K,Q,S} A^K_{Q,S}(t)D^K_{Q,S}(\Omega)$

Where $P(\Omega,t)$ is the full axis distribution probability, expanded for Euler angles $\Omega$.

This reduces to the 2D case if $S=0$:

$ P(\theta,\phi,t) = \sum_{K,Q} A^K_{Q,0}(t)D^K_{Q,0}(\Omega) = \sum_{K,Q} A^K_{Q}(t)Y_{K,Q}(\Omega)$

In the current code (v1.3.0, 16/08/21), the ADMs can be set directly, and expanded trivially for the 2D case (3D case to do). (Note that the 3D case is supported for AF-BLM calculations, but not yet for direct expansion & visualisation.)

Expectation values of $\langle cos^n(\theta, t)\rangle$ can be calculated directly from the $P(\theta,t)$ distributions:

$\langle cos^n(\theta, t)\rangle = \int_{\theta} cos^n(\theta)P(\theta,t) d\theta$

See, e.g.:

[1]
P. Hockett, “General phenomenology of ionization from aligned molecular ensembles,” New Journal of Physics, vol. 17, no. 2, p. 023069, Feb. 2015, doi: 10.1088/1367-2630/17/2/023069.
[2] Reid, K.L. (2018) ‘Accessing the molecular frame through strong-field alignment of distributions of gas phase molecules’, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 376(2115), p. 20170158. doi:10.1098/rsta.2017.0158.

Set test ADMs

Roughly eyeballed for a Gaussian distribution with $0<\sigma^{2}<0.2$ as per Figure 1 in Reid 2018 [2].

NOTE: not totally sure on the normalization here. Assuming othonorm sph, may be an additional sqrt(4pi) required for Y00? https://shtools.github.io/SHTOOLS/complex-spherical-harmonics.html#orthonormalized

UPDATE: setting for 4$pi$- normalised & converting to orthonorm (for numerical functions) looks good for comparison with ref. [2]. Note also additional factor of sqrt(2) in metrics at the moment - due to 0:$pi$ default domain and/or renorm(?)... should also confirm there is no additional ^2 in distribution generation.

In [12]:
# Load test ADMs from .mat files.
# Code adapted from N2 case, https://epsproc.readthedocs.io/en/latest/methods/geometric_method_dev_pt3_AFBLM_090620_010920_dev_bk100920.html#Test-compared-to-experimental-N2-AF-results...

from scipy.io import loadmat

ADMdataDir = Path('~/ePS/OCS/OCS_alignment_ADMs_VM_140122')
fList = ep.getFiles(fileBase =  ADMdataDir.expanduser(), fType='.mat')

ADMs = []
ADMLabels = []

for f in fList:
    item = Path(f).name.rstrip('ocs.mat')  # Get & set variable name
    
    if item == 'time':
        item = 'timeocs'
        t = loadmat(f)[item][0,:]
    else:
        K = int(item.strip('D'))
        item = item + 'ave'
        
#         ADMs.append(np.asarray([K,0,0,loadmat(f)[item][:,0]]))
#         ADMs.append([K,0,0,loadmat(f)[item][:,0]])
        ADMs.append(loadmat(f)[item][:,0])
        ADMLabels.append([K,0,0])

# Add K = 0 (population) term?
# NOTE - may need additional renorm?
addPop = True
if addPop:
    ADMs.append(np.ones(t.size) * np.sqrt(4*np.pi))
    ADMLabels.append([0,0,0])
        
ADMLabels = np.array(ADMLabels)
*** Scanning dir
/home/paul/ePS/OCS/OCS_alignment_ADMs_VM_140122
Found 4 .mat file(s)

In [13]:
# Set ADMs for increasing alignment...
tPoints = 10
# inputADMs = np.asarray([[0,0,0, *np.ones(10)], [2,0,0, *np.linspace(0,1,tPoints)], [4,0,0, *np.linspace(0,0.5,tPoints)]])
# inputADMs = [[0,0,0, *np.ones(10) * np.sqrt(4*np.pi)], 
#              [2,0,0, *np.linspace(1,2,tPoints)], 
#              [4,0,0, *np.linspace(0.3,2.8,tPoints)],
#              [6,0,0, *np.linspace(0,3,tPoints)],
#              [8,0,0, *np.linspace(0,3,tPoints)]]

# Ballpark ADMs from Fig. 1 in [2]
# inputADMs = [[0,0,0, *np.ones(10) * np.sqrt(4*np.pi)], 
#              [2,0,0, *np.linspace(0.3,2.2,tPoints)], 
#              [4,0,0, *np.linspace(0,1.5,tPoints)],
#              [6,0,0, *np.linspace(0,1.5,tPoints)],
#              [8,0,0, *np.linspace(0,1.5,tPoints)]]


warnings.filterwarnings('ignore')   # Skip repeated numpy deprecation warnings in current build (xr15 env)

# For manual sets
# ADMs = ep.setADMs(ADMs = inputADMs)  # TODO WRAP TO CLASS (IF NOT ALREADY!)

# For ADMs from VM
ADMs = ep.setADMs(ADMs = ADMs, KQSLabels = ADMLabels, t=t)  # TODO WRAP TO CLASS (IF NOT ALREADY!)
attrCpy = ADMs.attrs
ADMs = ADMs * (2*ADMs.K+1)/(8*np.pi**2)  # Additional renormalisation by (2*K+1)/8*pi^2

# Set to separate dataset for testing
ADMs.attrs = attrCpy  # Propagate attrs
ADMs.attrs['jobLabel'] = 'Alignment data testing'
data.data['ADM'] = {'ADM': ADMs}

ADMs
# ep.lmPlot(ADMs, xDim='t');
Out[13]:
Show/Hide data repr Show/Hide attributes
xarray.DataArray
  • ADM: 4
  • t: 1775
  • (4.683488237212555e-19+0j) ... (0.04489678053129164+0j)
    array([[ 4.68348824e-19+0.00000000e+00j,  3.44014643e-06-6.41674127e-20j,
             1.67479977e-05-2.82735020e-19j, ...,
             6.36556811e-03-2.73351310e-19j,  6.37458642e-03+7.79783254e-20j,
             6.38360268e-03-9.25163238e-20j],
           [-7.49692342e-17+0.00000000e+00j, -6.59289311e-07-3.29367626e-19j,
            -8.40871623e-07-8.49916601e-19j, ...,
             4.23519907e-03+1.68959177e-18j,  4.24170132e-03+1.57544492e-19j,
             4.24820262e-03-7.50301404e-19j],
           [ 4.93007514e-16+0.00000000e+00j,  5.23969218e-07+5.19582406e-19j,
             2.50892234e-06+1.01798836e-17j, ...,
             3.04848033e-03-7.24164019e-18j,  3.05291660e-03-4.15847445e-18j,
             3.05734957e-03+1.42728394e-17j],
           [ 4.48967805e-02+0.00000000e+00j,  4.48967805e-02+0.00000000e+00j,
             4.48967805e-02+0.00000000e+00j, ...,
             4.48967805e-02+0.00000000e+00j,  4.48967805e-02+0.00000000e+00j,
             4.48967805e-02+0.00000000e+00j]])
    • ADM
      (ADM)
      MultiIndex
      (K, Q, S)
      array([(2, 0, 0), (4, 0, 0), (6, 0, 0), (0, 0, 0)], dtype=object)
    • K
      (ADM)
      int64
      2 4 6 0
      array([2, 4, 6, 0])
    • Q
      (ADM)
      int64
      0 0 0 0
      array([0, 0, 0, 0])
    • S
      (ADM)
      int64
      0 0 0 0
      array([0, 0, 0, 0])
    • t
      (t)
      float64
      0.0 0.01667 0.03333 ... 85.03 85.03
      units :
      ps
      array([0.000000e+00, 1.666664e-02, 3.333327e-02, ..., 8.502818e+01,
             8.502901e+01, 8.502985e+01])
  • dataType :
    ADM
    long_name :
    Axis distribution moments
    units :
    arb
    jobLabel :
    Alignment data testing
In [14]:
ADMs.unstack().squeeze().real.hvplot.line(x='t').overlay('K')
Out[14]:
In [15]:
# Selection & downsampling - adapted from https://epsproc.readthedocs.io/en/latest/methods/geometric_method_dev_pt3_AFBLM_090620_010920_dev_bk100920.html#Test-compared-to-experimental-N2-AF-results...
# See PEMtk for updated routines, https://pemtk.readthedocs.io/en/latest/fitting/PEMtk_fitting_basic_demo_030621-full.html#Subselect-data
# See Xarray docs for basics https://xarray.pydata.org/en/stable/user-guide/indexing.html#indexing-with-dimension-names

trange=[38, 44]  # Set range in ps for calc
tStep=2  # Set tStep for downsampling

data.data['ADM'] = {'ADM': ADMs.sel(t=slice(trange[0],trange[1], tStep))}   # Set and update

# tMask = (ADMs.t>trange[0]) * (ADMs.t<trange[1])
# ind = np.nonzero(tMask)  #[0::tStep]
# At = ADMs['time'][:,ind].squeeze()
# ADMin = ADMs['ADM'][:,ind]

print(f"Selecting {data.data['ADM']['ADM'].t.size} points")

# plt.plot(At, np.real(ADMin.T))
# plt.legend(ADMs['ADMlist'])
# plt.xlabel('t/ps')
# plt.ylabel('ADM')
# plt.show()

# # Set in Xarray
# ADMX = ep.setADMs(ADMs = ADMs['ADM'][:,ind], t=At, KQSLabels = ADMs['ADMlist'], addS = True)
# # ADMX

data.data['ADM']['ADM'].unstack().squeeze().real.hvplot.line(x='t').overlay('K')
Selecting 60 points
Out[15]:

Compute $P(\theta)$ distribtuions + metrics

In [16]:
# Axis distributions P(theta) vs. t (summed over phi)
# Pt = data.padPlot(keys = 'ADM', dataType='ADM', Etype = 't', pStyle='grid', reducePhi='sum', returnFlag = True)  #, facetDims=['t', 'Eke'])
Pt = data.padPlot(keys = 'ADM', dataType='ADM', Etype = 't', pType='r', pStyle='grid', reducePhi='sum', returnFlag = True)  #, facetDims=['t', 'Eke'])  # Real plot to check values OK.
Using default sph betas.
Summing over dims: set()
Grid plot: Alignment data testing, dataType: ADM, plotType: r
2022-01-16T15:28:04.033748 image/svg+xml Matplotlib v3.3.4, https://matplotlib.org/
In [17]:
# The returned data array contains the plotted values
Pt
Out[17]:
Show/Hide data repr Show/Hide attributes
xarray.DataArray
  • t: 60
  • Theta: 50
  • 1.584 1.563 1.504 1.412 1.293 1.158 ... 1.376 1.498 1.593 1.654 1.675
    array([[1.58356978, 1.56329441, 1.50423728, ..., 1.50423728, 1.56329441,
            1.58356978],
           [1.57754288, 1.55711259, 1.49762097, ..., 1.49762097, 1.55711259,
            1.57754288],
           [1.55895116, 1.53859544, 1.47933915, ..., 1.47933915, 1.53859544,
            1.55895116],
           ...,
           [1.87576083, 1.85033528, 1.77624828, ..., 1.77624828, 1.85033528,
            1.87576083],
           [1.77389878, 1.75087673, 1.68376581, ..., 1.68376581, 1.75087673,
            1.77389878],
           [1.67462659, 1.6538706 , 1.59334018, ..., 1.59334018, 1.6538706 ,
            1.67462659]])
    • t
      (t)
      float64
      38.04 38.14 38.24 ... 43.82 43.92
      units :
      ps
      array([38.044193, 38.143781, 38.243369, 38.342957, 38.442545, 38.542132,
             38.64172 , 38.741308, 38.840896, 38.940484, 39.040071, 39.139659,
             39.239247, 39.338835, 39.438423, 39.538011, 39.637598, 39.737186,
             39.836774, 39.936362, 40.03595 , 40.135537, 40.235125, 40.334713,
             40.434301, 40.533889, 40.633476, 40.733064, 40.832652, 40.93224 ,
             41.031828, 41.131416, 41.231003, 41.330591, 41.430179, 41.529767,
             41.629355, 41.728942, 41.82853 , 41.928118, 42.027706, 42.127294,
             42.226882, 42.326469, 42.426057, 42.525645, 42.625233, 42.724821,
             42.824408, 42.923996, 43.023584, 43.123172, 43.22276 , 43.322347,
             43.421935, 43.521523, 43.621111, 43.720699, 43.820287, 43.919874])
    • Theta
      (Theta)
      float64
      0.0 0.06411 0.1282 ... 3.077 3.142
      array([0.      , 0.064114, 0.128228, 0.192342, 0.256457, 0.320571, 0.384685,
             0.448799, 0.512913, 0.577027, 0.641141, 0.705255, 0.76937 , 0.833484,
             0.897598, 0.961712, 1.025826, 1.08994 , 1.154054, 1.218169, 1.282283,
             1.346397, 1.410511, 1.474625, 1.538739, 1.602853, 1.666968, 1.731082,
             1.795196, 1.85931 , 1.923424, 1.987538, 2.051652, 2.115766, 2.179881,
             2.243995, 2.308109, 2.372223, 2.436337, 2.500451, 2.564565, 2.62868 ,
             2.692794, 2.756908, 2.821022, 2.885136, 2.94925 , 3.013364, 3.077479,
             3.141593])
  • dataType :
    ADM
    long_name :
    Axis distribution moments
    units :
    arb
    jobLabel :
    Alignment data testing
    pType :
    r
    pTypeDetails :
    {'Type': 'real', 'Formula': 'np.real(dataPlot)', 'Exec': <function plotTypeSelector.<locals>.<lambda> at 0x7fed90835d40>}
In [18]:
# Check no negative values...
print(Pt.min() > 0)
<xarray.DataArray ()>
array(True)
In [19]:
def computeCNs(Pt, N = None, Nrange = [2,10], Nstep = 2):
    """
    Function to compute <cos^N> expectation values from P(theta) distributions.
    
    NOTE: currently assumes 1D case. Should generalise!
    
    """
    
    if N is None:
        N = np.arange(Nrange[0], Nrange[1], Nstep)
    
    # Generate cos^N basis
    #  cn = xr.ones_like(Pt) * (np.cos(Pt.Theta)**N)  # Use multiplication to keep t coord - this fails for array-like N with broadcast errors
    cn = xr.ones_like(Pt) * np.cos(Pt.Theta).expand_dims({'N':N}).T.pipe(np.power,N)  # OK with transpose
    
    Jt = np.sin(Pt.Theta) # Jacobian
    
    norm = (Pt * Jt).sum('Theta')
    cnMetric = (Pt * cn * Jt).sum('Theta')/norm
    
#     cnMetric = Pt.dot(cn, dims='Theta') # Multiply and sum over Theta - dot version (no Jacobian or renorm)
#     cnMetric = (Pt.dot(cn * Jt, dims='Theta')/Pt.dot(Jt, dims='Theta'))  # Dot version with renorm
    
    return cnMetric
In [20]:
# Compute and plot for a range of N
PtNorm = Pt  #/Pt.sum('Theta')  # Norm integral to 1 - now set in function
cnMetric = computeCNs(PtNorm)

# cnMetric.plot()  # Basic plot
sf = np.sqrt(2)  # Seem to need additional sqrt(2) normalisation? Probably SPH definition and/or integration domain and/or distribution generation params.
# sf = 1
ep.lmPlot(cnMetric*sf, xDim='t');  # With lmPlot()
Set dataType (No dataType)
Plotting data (No filename), pType=a, thres=0.01, with Seaborn
No handles with labels found to put in legend.
2022-01-16T15:28:05.368770 image/svg+xml Matplotlib v3.3.4, https://matplotlib.org/
In [21]:
# Seem to need additional sqrt(2) normalisation? Probably SPH definition?
# (cnMetric*np.sqrt(2)).sel(N=2).plot()
# (cnMetric*np.sqrt(2)).plot.line(x='t')

# Testing exact values
# sf = np.sqrt(2)
# sf = 2
# (cnMetric*sf).plot.line(x='t')
# (ADMs).plot.line(x='t')

(cnMetric*sf).fillna(0).hvplot.line(x='t').overlay('N')
Out[21]:

AFBLMs for aligned case

New plotting code to update current package versions!

In [22]:
# Compute AFBLMs for aligned case
keys = data._keysCheck(None)
keys = list(set(keys) - set(['ADM']))

# data.AFBLM(keys = keys, AKQS = ADMs, selDims = {'Type':'L'})  # NOTE THIS USES independently set ADMs!
data.AFBLM(keys = keys, AKQS = data.data['ADM']['ADM'], selDims = {'Type':'L'}, thres=1e-3) # thres=1e-4)  BREAKS KERNEL #, thresDims=['Eke','t'])  # TODO: currently thersDims must be in matE only for AFBLM routine.
# data.AFBLM(keys = keys,  selDims = {'Type':'L'})  # Default case... sets/uses ADMs per key
In [23]:
# Quick stack to dict & XR dataset
dataType = 'AFBLM'
thres = 1e-2
selDims = None
Etype = 'Eke'

pDict = []

for key in keys:
#     subset = ep.matEleSelector(data.data[key][dataType], thres=thres, inds = selDims, dims = [Etype, 't'], sq = True)
    subset = ep.matEleSelector(data.data[key][dataType], thres=thres, inds = selDims, dims = 't', sq = True)
    subset.name = 'BLM'

    subset = ep.plotTypeSelector(subset, pType = 'r')

#     pDict.append(subset.expand_dims({'Orb':[key]}))
#     pDict.append(subset.expand_dims({'Orb':[data.data[key][dataType].attrs['jobLabel']]}))
    pDict.append(subset.expand_dims({'Orb':[data.data[key]['jobNotes']['orbLabel']]}))

    
#     hvDS = hv.Dataset(subset.unstack('BLM'))
    
#     display(hvDS.to(hv.Curve, kdims=Etype).overlay(['l','m']))

#     pDict[key] = hvDS.to(hv.Curve, kdims=Etype).overlay(['l','m'])
    
# hv.HoloMap(pDict, kdims = ['Orb'])   # Individual plots OK, but won't stack?

xrAF = xr.concat(pDict, 'Orb')
In [24]:
xrAF.unstack().dropna(dim = 't', how = 'all').drop('m')  #.fillna(0)
Out[24]:
Show/Hide data repr Show/Hide attributes
xarray.DataArray
'BLM'
  • Orb: 4
  • t: 60
  • Eke: 32
  • l: 5
  • m: 1
  • 1.0 0.2623 0.02671 0.004921 nan ... 1.0 0.4093 0.004402 -0.002499 nan
    array([[[[[ 1.        ],
              [ 0.26227263],
              [ 0.02671436],
              [ 0.00492146],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27200748],
              [ 0.02238585],
              [ 0.01011633],
              [        nan]],
    
             [[ 1.        ],
              [ 0.30351117],
              [ 0.0360932 ],
              [ 0.01510645],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.4207256 ],
              [ 0.0390006 ],
              [-0.00321244],
              [        nan]],
    
             [[ 1.        ],
              [ 0.44651287],
              [ 0.03260383],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.47306665],
              [ 0.02696459],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.26425595],
              [ 0.02649815],
              [ 0.00497479],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27398945],
              [ 0.02221788],
              [ 0.01023203],
              [        nan]],
    
             [[ 1.        ],
              [ 0.30503664],
              [ 0.03584023],
              [ 0.01528682],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.41908029],
              [ 0.03861182],
              [-0.00324111],
              [        nan]],
    
             [[ 1.        ],
              [ 0.44466691],
              [ 0.03226994],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.47105522],
              [ 0.02668391],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.26744117],
              [ 0.0259533 ],
              [ 0.00497996],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27724886],
              [ 0.02178177],
              [ 0.01025242],
              [        nan]],
    
             [[ 1.        ],
              [ 0.30751767],
              [ 0.03516482],
              [ 0.01532953],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.41667021],
              [ 0.03770384],
              [-0.00323469],
              [        nan]],
    
             [[ 1.        ],
              [ 0.44197913],
              [ 0.03149732],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.46813499],
              [ 0.02603797],
              [        nan],
              [        nan]]],
    
    
            ...,
    
    
            [[[ 1.        ],
              [ 0.23246403],
              [ 0.03391895],
              [ 0.00592838],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24136188],
              [ 0.02817298],
              [ 0.01207888],
              [        nan]],
    
             [[ 1.        ],
              [ 0.28059554],
              [ 0.04509151],
              [ 0.01790507],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.44257319],
              [ 0.05096019],
              [-0.00398235],
              [        nan]],
    
             [[ 1.        ],
              [ 0.47089788],
              [ 0.04278284],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.49959292],
              [ 0.03547657],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.23928727],
              [ 0.03152263],
              [ 0.00540231],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24860935],
              [ 0.02623509],
              [ 0.01102908],
              [        nan]],
    
             [[ 1.        ],
              [ 0.28587022],
              [ 0.04205937],
              [ 0.01637597],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.43835249],
              [ 0.04704857],
              [-0.0036051 ],
              [        nan]],
    
             [[ 1.        ],
              [ 0.4662353 ],
              [ 0.03945994],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.49454195],
              [ 0.03270098],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.2464624 ],
              [ 0.02915714],
              [ 0.00490755],
              [        nan]],
    
             [[ 1.        ],
              [ 0.25620025],
              [ 0.02431771],
              [ 0.01004021],
              [        nan]],
    
             [[ 1.        ],
              [ 0.29143797],
              [ 0.03905382],
              [ 0.01493382],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.43377888],
              [ 0.04321876],
              [-0.00325242],
              [        nan]],
    
             [[ 1.        ],
              [ 0.46117598],
              [ 0.03621073],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.48905955],
              [ 0.02998916],
              [        nan],
              [        nan]]]],
    
    
    
           [[[[ 1.        ],
              [-0.1466907 ],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [-0.03799497],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.03401745],
              [        nan],
              [        nan],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.57699053],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.5846798 ],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.59032827],
              [        nan],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.14668832],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [-0.03765228],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.03463486],
              [        nan],
              [        nan],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.57764435],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.58534548],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.59101332],
              [        nan],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.14674005],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [-0.03726904],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.03541224],
              [        nan],
              [        nan],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.57848057],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.58619728],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.59189256],
              [        nan],
              [        nan],
              [        nan]]],
    
    
            ...,
    
    
            [[[ 1.        ],
              [-0.14577887],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [-0.04067283],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.02771422],
              [        nan],
              [        nan],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.57014903],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.57770587],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.58310202],
              [        nan],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.14622673],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [-0.04070835],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.0283631 ],
              [        nan],
              [        nan],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.57092342],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.5784981 ],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.58394049],
              [        nan],
              [        nan],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.14663607],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [-0.04059839],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.02921389],
              [        nan],
              [        nan],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.57190443],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.57950039],
              [        nan],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.58499323],
              [        nan],
              [        nan],
              [        nan]]]],
    
    
    
           [[[[ 1.        ],
              [ 0.20283709],
              [ 0.0234812 ],
              [ 0.00735071],
              [        nan]],
    
             [[ 1.        ],
              [ 0.26333093],
              [ 0.04403557],
              [ 0.02039599],
              [        nan]],
    
             [[ 1.        ],
              [ 0.32810551],
              [ 0.05821518],
              [ 0.02145056],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.21639626],
              [-0.01575882],
              [ 0.00955394],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24122928],
              [-0.01298321],
              [ 0.00784153],
              [        nan]],
    
             [[ 1.        ],
              [ 0.26846326],
              [-0.01118463],
              [ 0.00646922],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.20100697],
              [ 0.02335164],
              [ 0.00744965],
              [        nan]],
    
             [[ 1.        ],
              [ 0.26164504],
              [ 0.04375823],
              [ 0.0206543 ],
              [        nan]],
    
             [[ 1.        ],
              [ 0.32696857],
              [ 0.05778653],
              [ 0.02169894],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.21605105],
              [-0.01559502],
              [ 0.00963506],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24073761],
              [-0.0128476 ],
              [ 0.00790771],
              [        nan]],
    
             [[ 1.        ],
              [ 0.2678453 ],
              [-0.01106729],
              [ 0.00652351],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.19761466],
              [ 0.02296692],
              [ 0.00748851],
              [        nan]],
    
             [[ 1.        ],
              [ 0.25845121],
              [ 0.04298298],
              [ 0.02073582],
              [        nan]],
    
             [[ 1.        ],
              [ 0.32469531],
              [ 0.0566651 ],
              [ 0.02174711],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.21560764],
              [-0.0152179 ],
              [ 0.00960942],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24005023],
              [-0.01253588],
              [ 0.00788601],
              [        nan]],
    
             [[ 1.        ],
              [ 0.26695144],
              [-0.01079797],
              [ 0.00650513],
              [        nan]]],
    
    
            ...,
    
    
            [[[ 1.        ],
              [ 0.23591337],
              [ 0.02870344],
              [ 0.00852486],
              [        nan]],
    
             [[ 1.        ],
              [ 0.29533983],
              [ 0.05444234],
              [ 0.02392337],
              [        nan]],
    
             [[ 1.        ],
              [ 0.35204244],
              [ 0.07311184],
              [ 0.02555845],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.21997871],
              [-0.02072833],
              [ 0.0119225 ],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24727465],
              [-0.01709117],
              [ 0.00979343],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27657145],
              [-0.01473416],
              [ 0.00808537],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.2269082 ],
              [ 0.02690339],
              [ 0.00783472],
              [        nan]],
    
             [[ 1.        ],
              [ 0.28633618],
              [ 0.05090015],
              [ 0.02193146],
              [        nan]],
    
             [[ 1.        ],
              [ 0.34487251],
              [ 0.06811493],
              [ 0.02334813],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.21957636],
              [-0.0191077 ],
              [ 0.01077642],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24625058],
              [-0.01575195],
              [ 0.00885035],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27504073],
              [-0.01357733],
              [ 0.00730554],
              [        nan]]],
    
    
            [[[ 1.        ],
              [ 0.21763786],
              [ 0.02511034],
              [ 0.00718178],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27715467],
              [ 0.04738039],
              [ 0.02004982],
              [        nan]],
    
             [[ 1.        ],
              [ 0.33767722],
              [ 0.06316827],
              [ 0.02126532],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.21906426],
              [-0.01752419],
              [ 0.0097066 ],
              [        nan]],
    
             [[ 1.        ],
              [ 0.24510497],
              [-0.01444373],
              [ 0.00797019],
              [        nan]],
    
             [[ 1.        ],
              [ 0.27337628],
              [-0.01244754],
              [ 0.00657786],
              [        nan]]]],
    
    
    
           [[[[ 1.        ],
              [-0.09808717],
              [ 0.00561341],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.03267669],
              [ 0.0132014 ],
              [-0.00531995],
              [        nan]],
    
             [[ 1.        ],
              [ 0.14053526],
              [ 0.00950307],
              [-0.00508705],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.39853345],
              [ 0.00597954],
              [-0.00302217],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40473467],
              [ 0.00502977],
              [-0.00284856],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40931544],
              [ 0.00394923],
              [-0.00245423],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.09720667],
              [ 0.0055695 ],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.03379176],
              [ 0.01307589],
              [-0.00536993],
              [        nan]],
    
             [[ 1.        ],
              [ 0.14155318],
              [ 0.00940162],
              [-0.00512879],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.39851971],
              [ 0.00591565],
              [-0.00304694],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40471666],
              [ 0.0049761 ],
              [-0.00287194],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40931514],
              [ 0.00390709],
              [-0.00247438],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.09568346],
              [ 0.00545737],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.03560665],
              [ 0.01277787],
              [-0.00536327],
              [        nan]],
    
             [[ 1.        ],
              [ 0.14312933],
              [ 0.00917012],
              [-0.00511283],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.39848729],
              [ 0.00576989],
              [-0.0030374 ],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40468266],
              [ 0.00485361],
              [-0.00286303],
              [        nan]],
    
             [[ 1.        ],
              [ 0.4093129 ],
              [ 0.00381091],
              [-0.0024667 ],
              [        nan]]],
    
    
            ...,
    
    
            [[[ 1.        ],
              [-0.11299384],
              [ 0.00709824],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.01502171],
              [ 0.01712696],
              [-0.00654805],
              [        nan]],
    
             [[ 1.        ],
              [ 0.12537696],
              [ 0.01255524],
              [-0.00637635],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.39892574],
              [ 0.00790129],
              [-0.00378873],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40510579],
              [ 0.00664464],
              [-0.00357021],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40934982],
              [ 0.00521724],
              [-0.00307601],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.10916658],
              [ 0.00660288],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.01925387],
              [ 0.0158385 ],
              [-0.00593757],
              [        nan]],
    
             [[ 1.        ],
              [ 0.12875801],
              [ 0.01156165],
              [-0.00575744],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.39879013],
              [ 0.00727573],
              [-0.00342086],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40499662],
              [ 0.00611892],
              [-0.00322374],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40933449],
              [ 0.00480444],
              [-0.0027775 ],
              [        nan]]],
    
    
            [[[ 1.        ],
              [-0.10522799],
              [ 0.00611336],
              [        nan],
              [        nan]],
    
             [[ 1.        ],
              [ 0.0236325 ],
              [ 0.0145743 ],
              [-0.00536594],
              [        nan]],
    
             [[ 1.        ],
              [ 0.13229012],
              [ 0.01059215],
              [-0.00518033],
              [        nan]],
    
             ...,
    
             [[ 1.        ],
              [ 0.39865956],
              [ 0.00666537],
              [-0.00307784],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40488866],
              [ 0.00560594],
              [-0.00290066],
              [        nan]],
    
             [[ 1.        ],
              [ 0.40932023],
              [ 0.00440165],
              [-0.00249913],
              [        nan]]]]])
    • Labels
      ()
      <U1
      'A'
      array('A', dtype='<U1')
    • Type
      ()
      <U1
      'L'
      array('L', dtype='<U1')
    • Euler
      ()
      object
      (0.0, 0.0, 0.0)
      array((0.0, 0.0, 0.0), dtype=object)
    • it
      ()
      int64
      1
      array(1)
    • Eke
      (Eke)
      float64
      0.1 1.1 2.1 3.1 ... 29.1 30.1 31.1
      array([ 0.1,  1.1,  2.1,  3.1,  4.1,  5.1,  6.1,  7.1,  8.1,  9.1, 10.1, 11.1,
             12.1, 13.1, 14.1, 15.1, 16.1, 17.1, 18.1, 19.1, 20.1, 21.1, 22.1, 23.1,
             24.1, 25.1, 26.1, 27.1, 28.1, 29.1, 30.1, 31.1])
    • t
      (t)
      float64
      38.04 38.14 38.24 ... 43.82 43.92
      units :
      ps
      array([38.044193, 38.143781, 38.243369, 38.342957, 38.442545, 38.542132,
             38.64172 , 38.741308, 38.840896, 38.940484, 39.040071, 39.139659,
             39.239247, 39.338835, 39.438423, 39.538011, 39.637598, 39.737186,
             39.836774, 39.936362, 40.03595 , 40.135537, 40.235125, 40.334713,
             40.434301, 40.533889, 40.633476, 40.733064, 40.832652, 40.93224 ,
             41.031828, 41.131416, 41.231003, 41.330591, 41.430179, 41.529767,
             41.629355, 41.728942, 41.82853 , 41.928118, 42.027706, 42.127294,
             42.226882, 42.326469, 42.426057, 42.525645, 42.625233, 42.724821,
             42.824408, 42.923996, 43.023584, 43.123172, 43.22276 , 43.322347,
             43.421935, 43.521523, 43.621111, 43.720699, 43.820287, 43.919874])
    • Orb
      (Orb)
      object
      'C' 'B' 'A' 'X'
      array(['C', 'B', 'A', 'X'], dtype=object)
    • Ehv
      (Orb, Eke)
      float64
      21.6 22.6 23.6 ... 40.5 41.5 42.5
      array([[21.6, 22.6, 23.6, 24.6, 25.6, 26.6, 27.6, 28.6, 29.6, 30.6, 31.6,
              32.6, 33.6, 34.6, 35.6, 36.6, 37.6, 38.6, 39.6, 40.6, 41.6, 42.6,
              43.6, 44.6, 45.6, 46.6, 47.6, 48.6, 49.6, 50.6, 51.6, 52.6],
             [18.4, 19.4, 20.4, 21.4, 22.4, 23.4, 24.4, 25.4, 26.4, 27.4, 28.4,
              29.4, 30.4, 31.4, 32.4, 33.4, 34.4, 35.4, 36.4, 37.4, 38.4, 39.4,
              40.4, 41.4, 42.4, 43.4, 44.4, 45.4, 46.4, 47.4, 48.4, 49.4],
             [17.4, 18.4, 19.4, 20.4, 21.4, 22.4, 23.4, 24.4, 25.4, 26.4, 27.4,
              28.4, 29.4, 30.4, 31.4, 32.4, 33.4, 34.4, 35.4, 36.4, 37.4, 38.4,
              39.4, 40.4, 41.4, 42.4, 43.4, 44.4, 45.4, 46.4, 47.4, 48.4],
             [11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5,
              22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5,
              33.5, 34.5, 35.5, 36.5, 37.5, 38.5, 39.5, 40.5, 41.5, 42.5]])
    • SF
      (Orb, Eke)
      complex128
      (2.5313132+3.1869955j) ... (3.5478734+2.2738364j)
      array([[2.5313132+3.1869955j, 2.589211 +3.1157305j, 2.6458422+3.0490419j,
              2.7012864+2.98646j  , 2.7556152+2.9275798j, 2.8088935+2.8720504j,
              2.8611798+2.8195654j, 2.9125276+2.7698565j, 2.9629857+2.7226873j,
              3.0125988+2.6778487j, 3.061408 +2.6351547j, 3.1094511+2.5944398j,
              3.1567631+2.5555556j, 3.2033764+2.5183689j, 3.2493211+2.4827597j,
              3.2946252+2.4486196j, 3.3393146+2.4158501j, 3.3834139+2.384362j ,
              3.4269457+2.354074j , 3.4699314+2.3249116j, 3.5123911+2.2968068j,
              3.5543436+2.2696972j, 3.5958067+2.2435254j, 3.636797 +2.2182386j,
              3.6773306+2.193788j , 3.7174221+2.1701285j, 3.7570859+2.1472183j,
              3.7963353+2.1250187j, 3.835183 +2.1034938j, 3.8736412+2.0826099j,
              3.9117213+2.062336j , 3.9494342+2.0426429j],
             [2.3387014+3.4494715j, 2.4012479+3.3596214j, 2.462206 +3.2764454j,
              2.521691 +3.1991562j, 2.5798048+3.1270907j, 2.636638 +3.0596857j,
              2.6922718+2.9964596j, 2.746779 +2.9369977j, 2.8002253+2.8809409j,
              2.8526705+2.8279759j, 2.9041688+2.7778288j, 2.9547696+2.7302581j,
              3.0045184+2.6850505j, 3.0534567+2.6420167j, 3.101623 +2.6009878j,
              3.1490526+2.5618129j, 3.1957784+2.5243564j, 3.2418308+2.4884962j,
              3.2872381+2.4541221j, 3.3320266+2.4211342j, 3.3762211+2.3894418j,
              3.4198444+2.3589622j, 3.4629183+2.32962j  , 3.5054629+2.3013461j,
              3.5474974+2.2740774j, 3.5890396+2.2477556j, 3.6301064+2.2223271j,
              3.6707137+2.1977425j, 3.7108768+2.1739562j, 3.7506098+2.1509259j,
              3.7899263+2.1286123j, 3.828839 +2.106979j ],
             [2.2728708+3.5493807j, 2.3371797+3.4517173j, 2.3997658+3.3616962j,
              2.4607607+3.2783698j, 2.5202798+3.2009475j, 2.5784254+3.1287636j,
              2.6352884+3.0612526j, 2.6909501+2.9979314j, 2.7454835+2.9383836j,
              2.7989546+2.8822489j, 2.8514231+2.8292131j, 2.9029435+2.7790012j,
              2.9535654+2.7313713j, 3.0033341+2.6861093j, 3.0522914+2.6430254j,
              3.1004758+2.6019502j, 3.1479227+2.5627324j, 3.194665 +2.5252362j,
              3.2407332+2.489339j , 3.2861557+2.4549305j, 3.3309588+2.4219104j,
              3.3751672+2.3901879j, 3.418804 +2.3596801j, 3.4618908+2.3303114j,
              3.5044479+2.3020127j, 3.5464944+2.2747205j, 3.5880482+2.2483766j,
              3.6291262+2.2229273j, 3.6697444+2.198323j , 3.709918 +2.1745181j,
              3.7496611+2.15147j  , 3.7889874+2.1291397j],
             [1.8430739+4.3770808j, 1.9218191+4.197733j , 1.9974624+4.0387662j,
              2.0703438+3.8965914j, 2.1407453+3.7684462j, 2.2089042+3.6521655j,
              2.275022 +3.5460245j, 2.3392717+3.4486304j, 2.4018034+3.3588443j,
              2.4627478+3.2757246j, 2.52222  +3.1984853j, 2.5803219+3.126464j ,
              2.637144 +3.0590986j, 2.6927673+2.9959082j, 2.7472646+2.9364785j,
              2.8007017+2.8804508j, 2.8531382+2.8275124j, 2.9046281+2.7773895j,
              2.9552211+2.729841j , 3.0049624+2.6846538j, 3.0538936+2.6416387j,
              3.1020531+2.6006272j, 3.1494763+2.5614683j, 3.1961959+2.5240267j,
              3.2422423+2.4881803j, 3.2876439+2.4538192j, 3.332427 +2.4208433j,
              3.3766162+2.3891621j, 3.4202345+2.3586931j, 3.4633035+2.3293608j,
              3.5058435+2.3010963j, 3.5478734+2.2738364j]])
    • XSraw
      (Orb, t, Eke)
      complex128
      (0.045557133015522173+7.566224460654878e-20j) ... (-0.011337478499198361-1.6350433118526145e-20j)
      array([[[ 0.04555713+7.56622446e-20j,  0.05044149+1.18199163e-19j,
                0.0570488 +1.66300354e-19j, ...,  0.03313898-1.70296204e-20j,
                0.03034567-2.51851723e-20j,  0.0282    -2.89362913e-20j],
              [ 0.04549133-5.56463110e-21j,  0.05033869-8.69303760e-21j,
                0.05690417-1.22306723e-20j, ...,  0.03315379+1.25245498e-21j,
                0.03036758+1.85226058e-21j,  0.02822516+2.12813917e-21j],
              [ 0.04538643-4.60249063e-20j,  0.05017482-7.18998679e-20j,
                0.05667361-1.01159545e-19j, ...,  0.0331774 +1.03590197e-20j,
                0.03040249+1.53199948e-20j,  0.02826528+1.76017789e-20j],
              ...,
              [ 0.04656304+1.33903685e-20j,  0.05201291+2.09183636e-20j,
                0.05925971+2.94310991e-20j, ...,  0.03291258-3.01382669e-21j,
                0.03001084-4.45716008e-21j,  0.0278153 -5.12101650e-21j],
              [ 0.04633047+7.66482589e-21j,  0.0516496 +1.19739509e-20j,
                0.05874854+1.68467545e-20j, ...,  0.03296493-1.72515468e-21j,
                0.03008826-2.55133801e-21j,  0.02790424-2.93133829e-21j],
              [ 0.04608806-8.12967111e-20j,  0.0512709 -1.27001297e-19j,
                0.05821574-1.78684520e-19j, ...,  0.03301949+1.82977935e-20j,
                0.03016895+2.70606785e-20j,  0.02799695+3.10911384e-20j]],
      
             [[-0.22299777+5.06653789e-19j, -0.19722396+4.69647618e-19j,
               -0.18136128+4.17272476e-19j, ..., -0.05878174+1.10809429e-19j,
               -0.05604571+1.06258962e-19j, -0.0532987 +1.02647780e-19j],
              [-0.2234384 -3.72621966e-20j, -0.19763241-3.45405526e-20j,
               -0.18172417-3.06885873e-20j, ..., -0.05887811-8.14955464e-21j,
               -0.05613812-7.81488742e-21j, -0.05338797-7.54930064e-21j],
              [-0.22414082-3.08194573e-19j, -0.19828352-2.85683933e-19j,
               -0.18230268-2.53824437e-19j, ..., -0.05903174-6.74047357e-20j,
               -0.05628544-6.46367126e-20j, -0.05353028-6.24400519e-20j],
              ...,
              [-0.21626195+8.96653405e-20j, -0.19098014+8.31161523e-20j,
               -0.17581376+7.38470321e-20j, ..., -0.05730857+1.96105613e-20j,
               -0.05463303+1.88052398e-20j, -0.05193403+1.81661489e-20j],
              [-0.21781928+5.13256394e-20j, -0.19242372+4.75767965e-20j,
               -0.17709635+4.22710282e-20j, ..., -0.05764917+1.12253474e-20j,
               -0.05495964+1.07643706e-20j, -0.05224954+1.03985464e-20j],
              [-0.21944255-5.44383622e-19j, -0.19392842-5.04621650e-19j,
               -0.17843325-4.48346201e-19j, ..., -0.05800419-1.19061260e-19j,
               -0.05530008-1.14171925e-19j, -0.05257842-1.10291824e-19j]],
      
             [[ 0.13217026+6.12590785e-19j,  0.10267424+3.83533350e-19j,
                0.0926288 +2.32088929e-19j, ...,  0.01704732-1.71805777e-20j,
                0.01671947-1.78467567e-20j,  0.01622458-1.81877251e-20j],
              [ 0.1316375 -4.50534048e-20j,  0.10234068-2.82072203e-20j,
                0.09242695-1.70691377e-20j, ...,  0.01706226+1.26355724e-21j,
                0.01673499+1.31255182e-21j,  0.01624039+1.33762858e-21j],
              [ 0.13078821-3.72635436e-19j,  0.10180896-2.33301121e-19j,
                0.09210519-1.41178355e-19j, ...,  0.01708608+1.04508462e-20j,
                0.01675973+1.08560790e-20j,  0.01626561+1.10634881e-20j],
              ...,
              [ 0.14031448+1.08413600e-19j,  0.1077732 +6.78760311e-20j,
                0.09571435+4.10740693e-20j, ...,  0.01681891-3.04054244e-21j,
                0.0164822 -3.15843984e-21j,  0.01598278-3.21878292e-21j],
              [ 0.13843152+6.20573938e-20j,  0.10659432+3.88531475e-20j,
                0.09500097+2.35113463e-20j, ...,  0.01687172-1.74044713e-21j,
                0.01653706-1.80793318e-21j,  0.01603868-1.84247436e-21j],
              [ 0.13646885-6.58209604e-19j,  0.10536552-4.12094567e-19j,
                0.09425738-2.49372282e-19j, ...,  0.01692676+1.84599924e-20j,
                0.01659423+1.91757808e-20j,  0.01609695+1.95421407e-20j]],
      
             [[-0.38678794-7.64035202e-19j, -0.25957868-5.50547405e-21j,
               -0.2127307 +2.84047249e-19j, ..., -0.01264679+1.70345058e-20j,
               -0.0120156 +1.59672373e-20j, -0.01144426+1.52172265e-20j],
              [-0.38612347+5.61914871e-20j, -0.2595739 +4.04903823e-22j,
               -0.21297774-2.08904476e-20j, ..., -0.01266161-1.25281428e-21j,
               -0.01202948-1.17432129e-21j, -0.01145749-1.11916125e-21j],
              [-0.38506422+4.64758199e-19j, -0.25956626+3.34894806e-21j,
               -0.21337154-1.72784301e-19j, ..., -0.01268523-1.03619915e-20j,
               -0.01205162-9.71277818e-21j, -0.01147859-9.25655100e-21j],
              ...,
              [-0.39694557-1.35215561e-19j, -0.25965188-9.74334379e-22j,
               -0.20895438+5.02694222e-20j, ..., -0.01242033+3.01469128e-21j,
               -0.01180332+2.82581083e-21j, -0.01124195+2.69307726e-21j],
              [-0.39459711-7.73991946e-20j, -0.25963495-5.57722022e-22j,
               -0.20982747+2.87748892e-20j, ..., -0.01247268+1.72564958e-21j,
               -0.0118524 +1.61753189e-21j, -0.01128872+1.54155342e-21j],
              [-0.39214922+8.20931885e-19j, -0.25961732+5.91545937e-21j,
               -0.21073753-3.05199869e-19j, ..., -0.01252726-1.83030427e-20j,
               -0.01190356-1.71562961e-20j, -0.01133748-1.63504331e-20j]]])
    • XSrescaled
      (Orb, t, Eke)
      complex128
      (0.16149583169915419+2.6821567364206497e-19j) ... (-0.04019031485092525-5.79607762898095e-20j)
      array([[[ 0.16149583+2.68215674e-19j,  0.17881043+4.19005122e-19j,
                0.20223272+5.89519406e-19j, ...,  0.11747464-6.03684325e-20j,
                0.10757261-8.92791111e-20j,  0.09996638-1.02576482e-19j],
              [ 0.16126257-1.97261036e-20j,  0.17844602-3.08160159e-20j,
                0.20172002-4.33566046e-20j, ...,  0.11752714+4.43983731e-21j,
                0.10765026+6.56609279e-21j,  0.10005559+7.54405694e-21j],
              [ 0.16089072-1.63154045e-19j,  0.17786512-2.54878395e-19j,
                0.20090272-3.58601249e-19j, ...,  0.11761084+3.67217688e-20j,
                0.10777403+5.43079676e-20j,  0.10019781+6.23966814e-20j],
              ...,
              [ 0.16506168+4.74676203e-20j,  0.18438098+7.41536682e-20j,
                0.21007021+1.04330530e-19j, ...,  0.11667206-1.06837374e-20j,
                0.10638567-1.58002211e-20j,  0.09860266-1.81535308e-20j],
              [ 0.16423725+2.71711003e-20j,  0.18309306+4.24465508e-20j,
                0.20825817+5.97201897e-20j, ...,  0.11685762-6.11551411e-21j,
                0.10666009-9.04425775e-21j,  0.09891796-1.03913237e-20j],
              [ 0.16337792-2.88189337e-19j,  0.18175061-4.50207875e-19j,
                0.20636941-6.33420130e-19j, ...,  0.11705103+6.48639892e-20j,
                0.10694613+9.59276075e-20j,  0.0992466 +1.10215216e-19j]],
      
             [[-0.79050651+1.79604092e-18j, -0.69914075+1.66485746e-18j,
               -0.64290899+1.47919241e-18j, ..., -0.20837586+3.92809199e-19j,
               -0.19867686+3.76678212e-19j, -0.18893898+3.63876908e-19j],
              [-0.7920685 -1.32091048e-19j, -0.70058866-1.22443071e-19j,
               -0.64419542-1.08788209e-19j, ..., -0.20871748-2.88894190e-20j,
               -0.19900446-2.77030546e-20j, -0.18925544-2.67615740e-20j],
              [-0.79455851-1.09252132e-18j, -0.70289679-1.01272317e-18j,
               -0.64624616-8.99784200e-19j, ..., -0.20926207-2.38943567e-19j,
               -0.19952668-2.29131180e-19j, -0.18975991-2.21344221e-19j],
              ...,
              [-0.76662866+3.17855356e-19j, -0.67700695+2.94639089e-19j,
               -0.62324355+2.61780913e-19j, ..., -0.20315358+6.95176299e-20j,
               -0.19366904+6.66628393e-20j, -0.18410134+6.43973212e-20j],
              [-0.77214925+1.81944654e-19j, -0.68212432+1.68655352e-19j,
               -0.62779023+1.49846893e-19j, ..., -0.20436097+3.97928205e-20j,
               -0.19482685+3.81587002e-20j, -0.18521981+3.68618874e-20j],
              [-0.77790358-1.92978969e-18j, -0.68745834-1.78883717e-18j,
               -0.6325294 -1.58934590e-18j, ..., -0.20561949-4.22061177e-19j,
               -0.19603369-4.04728936e-19j, -0.18638563-3.90974336e-19j]],
      
             [[ 0.46853137+2.17157779e-18j,  0.3639707 +1.35959033e-18j,
                0.32836054+8.22733832e-19j, ...,  0.06043117-6.09035622e-20j,
                0.05926896-6.32651052e-20j,  0.05751462-6.44738067e-20j],
              [ 0.46664278-1.59710162e-19j,  0.36278828-9.99919927e-20j,
                0.32764502-6.05085177e-20j, ...,  0.06048414+4.47919379e-21j,
                0.05932398+4.65287507e-21j,  0.0575707 +4.74176985e-21j],
              [ 0.46363213-1.32095823e-18j,  0.36090336-8.27030941e-19j,
                0.3265044 -5.00464237e-19j, ...,  0.06056857+3.70472851e-20j,
                0.05941169+3.84837980e-20j,  0.05766008+3.92190442e-20j],
              ...,
              [ 0.49740187+3.84316206e-19j,  0.38204606+2.40614266e-19j,
                0.33929855+1.45603785e-19j, ...,  0.05962148-1.07784423e-20j,
                0.05842787-1.11963777e-20j,  0.05665746-1.14102884e-20j],
              [ 0.49072697+2.19987733e-19j,  0.37786701+1.37730822e-19j,
                0.33676967+8.33455524e-20j, ...,  0.05980868-6.16972444e-21j,
                0.05862233-6.40895625e-21j,  0.05685564-6.53140156e-21j],
              [ 0.48376947-2.33329230e-18j,  0.37351103-1.46083720e-18j,
                0.33413372-8.84001724e-19j, ...,  0.06000381+6.54389693e-20j,
                0.05882503+6.79763732e-20j,  0.05706221+6.92750852e-20j]],
      
             [[-1.37112755-2.70843427e-18j, -0.92018247-1.95163974e-20j,
               -0.75411071+1.00692128e-18j, ..., -0.04483172+6.03857507e-20j,
               -0.04259419+5.66023823e-20j, -0.04056884+5.39436636e-20j],
              [-1.36877205+1.99193636e-19j, -0.9201655 +1.43534668e-21j,
               -0.75498642-7.40547085e-20j, ..., -0.04488423-4.44111100e-21j,
               -0.04264341-4.16286060e-21j, -0.04061576-3.96732333e-21j],
              [-1.36501711+1.64752492e-18j, -0.92013844+1.18717118e-20j,
               -0.7563824 -6.12504398e-19j, ..., -0.04496795-3.67323033e-20j,
               -0.04272189-3.44309022e-20j, -0.04069054-3.28136189e-20j],
              ...,
              [-1.40713539-4.79326684e-19j, -0.92044194-3.45392545e-21j,
               -0.74072398+1.78200462e-19j, ..., -0.04402891+1.06868023e-20j,
               -0.04184167+1.00172386e-20j, -0.03985168+9.54671032e-21j],
              [-1.39881033-2.74373001e-19j, -0.92038195-1.97707309e-21j,
               -0.74381901+1.02004326e-19j, ..., -0.04421452+6.11726850e-21j,
               -0.04201566+5.73400125e-21j, -0.04001749+5.46466459e-21j],
              [-1.3901328 +2.91012776e-18j, -0.92031942+2.09697575e-20j,
               -0.74704508-1.08190537e-18j, ..., -0.04440799-6.48825971e-20j,
               -0.042197  -6.08174863e-20j, -0.04019031-5.79607763e-20j]]])
    • XSiso
      (Orb, Eke)
      complex128
      (3.4316388307197476+0j) ... (0.9376004021946335+0j)
      array([[ 3.43163883+0.j,  3.72430059+0.j,  4.14083664+0.j,
               4.61362279+0.j,  5.09288659+0.j,  5.55129466+0.j,
               5.94491893+0.j,  6.18617356+0.j,  6.23162972+0.j,
               6.12853574+0.j,  5.93508463+0.j,  5.68213831+0.j,
               5.38844736+0.j,  5.07538407+0.j,  4.76835652+0.j,
               4.49072189+0.j,  4.25802415+0.j,  4.0764398 +0.j,
               3.9446647 +0.j,  3.85676189+0.j,  3.80426333+0.j,
               3.77699279+0.j,  3.76262313+0.j,  3.74504247+0.j,
               3.70197418+0.j,  3.60480716+0.j,  3.42906817+0.j,
               3.1799682 +0.j,  2.90407592+0.j,  2.65415287+0.j,
               2.45144957+0.j,  2.29024709+0.j],
             [ 9.35740695+0.j,  8.29944761+0.j,  7.61596416+0.j,
               7.23430905+0.j,  7.07946891+0.j,  7.08071108+0.j,
               7.14360248+0.j,  7.10619923+0.j,  6.80537194+0.j,
               6.28119426+0.j,  5.73204546+0.j,  5.2773388 +0.j,
               4.92717629+0.j,  4.65497512+0.j,  4.4349066 +0.j,
               4.24918771+0.j,  4.08659841+0.j,  3.94004964+0.j,
               3.80478264+0.j,  3.67720572+0.j,  3.55416569+0.j,
               3.43254068+0.j,  3.30924598+0.j,  3.18195837+0.j,
               3.05070997+0.j,  2.91904812+0.j,  2.7919737 +0.j,
               2.67157141+0.j,  2.55601158+0.j,  2.44247658+0.j,
               2.32947976+0.j,  2.21708627+0.j],
             [ 9.09653659+0.j,  7.26837552+0.j,  6.8062981 +0.j,
               7.18799114+0.j,  7.8973638 +0.j,  8.09325674+0.j,
               7.30836296+0.j,  6.00898809+0.j,  4.78228056+0.j,
               3.82868862+0.j,  3.12599452+0.j,  2.60410322+0.j,
               2.20524064+0.j,  1.89341707+0.j,  1.6489101 +0.j,
               1.4604467 +0.j,  1.31996017+0.j,  1.22050927+0.j,
               1.15590137+0.j,  1.12070662+0.j,  1.11013816+0.j,
               1.11976717+0.j,  1.14521831+0.j,  1.18204313+0.j,
               1.22595808+0.j,  1.27337459+0.j,  1.32108081+0.j,
               1.36272653+0.j,  1.38621405+0.j,  1.38370324+0.j,
               1.3592803 +0.j,  1.32095776+0.j],
             [28.86926414+0.j, 20.4834756 +0.j, 17.41751   +0.j,
              15.85978488+0.j, 14.65360052+0.j, 13.38904814+0.j,
              11.96274358+0.j, 10.40391767+0.j,  8.78521536+0.j,
               7.20556088+0.j,  5.78231891+0.j,  4.59818401+0.j,
               3.67247739+0.j,  2.97977293+0.j,  2.4762601 +0.j,
               2.11661164+0.j,  1.8618845 +0.j,  1.68170862+0.j,
               1.5536546 +0.j,  1.46167926+0.j,  1.39455585+0.j,
               1.3445798 +0.j,  1.30654826+0.j,  1.27684234+0.j,
               1.25220884+0.j,  1.22775712+0.j,  1.19554057+0.j,
               1.14938232+0.j,  1.09324062+0.j,  1.03649584+0.j,
               0.9843397 +0.j,  0.9376004 +0.j]])
    • l
      (l)
      int64
      0 2 4 6 8
      array([0, 2, 4, 6, 8])
  • E :
    0.1
    Ehv :
    21.613
    SF :
    (2.5313132+3.1869955j)
    Lmax :
    12
    Cont :
    S
    Targ :
    S
    Total :
    S
    QNs :
    None
    dataType :
    BLM
    file :
    OCS_survey.orb8_E0.1_2.0_30.1eV.inp.out
    fileBase :
    /home/paul/ePS/OCS/OCS_survey/orb8
    fileList :
    ['/home/paul/ePS/OCS/OCS_survey/orb8/OCS_survey.orb8_E0.1_2.0_30.1eV.inp.out', '/home/paul/ePS/OCS/OCS_survey/orb8/OCS_survey.orb8_E1.1_2.0_31.1eV.inp.out']
    jobLabel :
    A1/S
    EPRX :
    None
    p :
    [0]
    BLMtable :
    None
    BLMtableResort :
    None
    lambdaTerm :
    None
    polProd :
    None
    AFterm :
    None
    thres :
    0.001
    thresDims :
    Eke
    selDims :
    {'Type': 'L', 'it': 1}
    sumDims :
    ['mu', 'mup', 'l', 'lp', 'm', 'mp', 'S-Rp']
    sumDimsPol :
    ['P', 'R', 'Rp', 'p']
    symSum :
    True
    degenDrop :
    True
    SFflag :
    False
    SFflagRenorm :
    False
    BLMRenorm :
    1
    squeeze :
    False
    phaseConvention :
    E
    basisReturn :
    BLM
    verbose :
    0
    matEleSelector :
    <function matEleSelector at 0x7feb6d131560>
    degenDict :
    {'it': <xarray.DataArray 'it' (it: 1)> array([1]) Coordinates: * it (it) int64 1, 'degenN': array(1), 'degenFlag': False, 'degenDrop': True, 'selDims': {'Type': 'L', 'it': 1}}
    pType :
    r
    pTypeDetails :
    {'Type': 'real', 'Formula': 'np.real(dataPlot)', 'Exec': <function plotTypeSelector.<locals>.<lambda> at 0x7fed9134d950>}
In [25]:
# SUPER SLOW WITH LARGER DATASETS - must be a way to improve on this? Seems a bit better with subsets and if NaNs dropped properly, also if high-dim vars are overlaid rather than Holomapped

# hvPlotters.opts.defaults(hvPlotters.opts.Curve(height=700))
# lSel = [2,4,6]
# hvDS = hvPlotters.hv.Dataset(xrAF.unstack('BLM'))
# hvDS.select(l=lSel).to(hvPlotters.hv.Curve, kdims=Etype).overlay(['l','m'])   
# hvDS.to(hvPlotters.hv.Curve, kdims=Etype).overlay(['l','m'])


# Try with subsets to speed up plotters
hvDS = hvPlotters.hv.Dataset(xrAF.unstack().dropna(dim = 't', how = 'all').drop('m').fillna(0))
# hvDS.to(hvPlotters.hv.Curve, kdims=Etype).overlay(['l','m'])
In [31]:
hvDS.to(hvPlotters.hv.Curve, kdims=Etype).overlay(['l'])
Out[31]:
In [26]:
# This is slow, but not so bad. NOW DROPPING TOOLTIPS and LEGEND??????

# With additional overlays
# hvDS.select(l=lSel, m=0).to(hvPlotters.hv.Curve, kdims=Etype).overlay(['t']).layout('Orb').cols(1)
hvDS.to(hvPlotters.hv.Curve, kdims=Etype).overlay(['t']).layout('Orb').cols(1)
Out[26]:
In [27]:
# Getting non-contiguous plots here... looks funky...? Might be automatic thresholding in AFBLM routine (==NaNs/zeros) - should look at more closely
hvDS.to(hvPlotters.hv.Curve, kdims='t').overlay([Etype]).layout('Orb').cols(1)
Out[27]:
In [30]:
# With additional overlays
# This seems to break legend?
# hvDS.select(l=[2,4,6]).to(hvPlotters.hv.Curve, kdims=Etype).overlay(['l','m','t']).layout('Orb').cols(1)
hvDS.to(hvPlotters.hv.Curve, kdims=Etype).overlay(['l','t']).layout('Orb').cols(1)
Out[30]:
In [ ]:
# Check also cross-secions
XS = np.abs(xrAF.XSrescaled)  # Should be in MB
# XS = np.abs(xrAF.XSraw)   # Unscaled/uncorrect XS
XS.name = 'XS/MB'
XS.hvplot.line(x='Eke').overlay('t').layout('Orb').cols(1)

Versions

Code

In [ ]:
# print(data.jobInfo['ePolyScat'][0])
# print('Run: ' + jobInfo['Starting'][0].split('at')[1])
In [ ]:
import scooby
scooby.Report(additional=['epsproc', 'xarray', 'jupyter', 'holoviews'])
In [ ]:
# Check current Git commit for local ePSproc version
!git -C {Path(ep.__file__).parent} branch
!git -C {Path(ep.__file__).parent} log --format="%H" -n 1
In [ ]:
# Check current remote commits
!git ls-remote --heads git://github.com/phockett/ePSproc

Notes

14/01/22 PH

Rerunning with some additional test ADMs from Varun Makhija.

07/01/22 PH

  • Fixed/tested cos^2 values. (Maybe - now matching Reid 2018, but may not be correct in all cases?)
  • Updated plotting with HV for BLMs (in dev stage).
  • Checked XS values too - may have some -ve cases/phase issues to sort? (Cf. general AF code testing notes elsewhere.)

Versions

13/12/21 PH

STATUS: basics in place, need to trim code and fix a few things still.

Revisiting AF cases with (hopefully) better match to experimental alignment.

  • Add in cos^2(theta) metric.
  • Ballpark ADMs assuming Gaussian case.

TODO:

FIXED:

  • Note 'it' and 'labels' handling changed in recent versions of ePSproc, and degenerate dim hanling now correct!

09/06/21 PH

Quick look at initial ePS results for orb 11 (HOMO), 2.5eV step size.

TODO:

  • Currently AF code fails for Xarray = 0.17, issue with phaseCons setting to coord, sigh.
  • AF normalisation not correct here, due to doubly-degenerate state? Summing over 'it' not working correctly either, needs a debug (or missing some settings...?).
  • lmPlot() slice and cmapping to fix, in cases of missing/dropped dims, and for clims if possible.

For methods: https://epsproc.readthedocs.io/en/dev/demos/ePSproc_class_demo_161020.html

In [ ]: