Source code for ase2sprkkr.physics.core_hole_width
import numpy as np
# The data for all shells is organized in dictionaries keyed by (NC, LC, IK).
# For shells where IK is not relevant (LC=0), IK=1 is used as a consistent key.
#
# Two datasets are available:
# 'campbell-papp' — J. L. Campbell & T. Papp, At. Data Nucl. Data Tables 77, 1 (2001)
# 'fuggle-inglesfield' — J. C. Fuggle & J. E. Inglesfield, Topics in Applied Physics
# vol. 69, Springer (1992), Appendix B; as used in xband/wcorehole.f.
# Only K and L shells are tabulated; M and higher return 0.
# Fuggle & Inglesfield (1992) dataset — from xband 6.3 wcorehole.f
core_hole_width_data_fuggle_inglesfield = {
(1, 0, 1): np.array(
[ # K-shell
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.24,
0.30,
0.36,
0.42,
0.48,
0.53,
0.59,
0.64,
0.68,
0.74,
0.81,
0.86,
0.94,
1.01,
1.08,
1.16,
1.25,
1.33,
1.44,
1.55,
1.67,
1.82,
1.96,
2.14,
2.33,
2.52,
2.75,
2.99,
3.25,
3.52,
3.84,
4.14,
4.52,
4.91,
5.33,
5.77,
6.24,
6.75,
7.28,
7.91,
8.49,
9.19,
9.89,
10.60,
11.40,
12.30,
13.20,
14.10,
15.10,
16.20,
17.30,
18.50,
19.70,
21.00,
22.30,
23.90,
25.20,
26.80,
28.40,
30.10,
31.90,
33.70,
35.70,
37.70,
39.90,
24.10,
44.40,
46.80,
49.30,
52.00,
54.60,
57.40,
60.40,
63.40,
66.60,
69.80,
73.30,
76.80,
80.40,
84.10,
88.00,
91.90,
96.10,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(2, 0, 1): np.array(
[ # L1-shell
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.10,
0.20,
0.40,
0.70,
1.03,
1.26,
1.49,
1.20,
1.03,
1.40,
1.83,
2.21,
2.34,
2.41,
2.54,
2.62,
2.76,
2.79,
2.89,
3.06,
3.28,
2.80,
3.53,
3.79,
3.94,
4.11,
4.28,
4.44,
4.67,
4.71,
4.78,
4.94,
4.25,
4.36,
4.58,
4.73,
4.93,
4.88,
4.87,
5.00,
2.97,
3.13,
3.32,
3.46,
3.64,
3.78,
3.92,
4.06,
4.21,
4.34,
4.52,
4.67,
4.80,
4.91,
5.05,
5.19,
5.25,
5.33,
5.43,
5.47,
5.53,
5.54,
5.63,
5.58,
5.61,
6.18,
7.25,
8.30,
9.39,
10.50,
11.30,
12.00,
12.20,
12.40,
12.60,
12.80,
13.10,
13.30,
13.40,
13.60,
13.70,
14.30,
14.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(2, 1, 1): np.array(
[ # L2-shell
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.02,
0.03,
0.05,
0.08,
0.13,
0.15,
0.17,
0.19,
0.24,
0.26,
0.29,
0.34,
0.37,
0.43,
0.52,
0.62,
0.72,
0.83,
0.95,
1.03,
1.13,
1.21,
1.31,
1.43,
1.54,
1.65,
1.78,
1.87,
1.97,
2.08,
2.23,
2.35,
2.43,
2.57,
2.62,
2.72,
2.84,
3.00,
3.12,
3.25,
3.40,
3.51,
3.57,
3.68,
3.80,
3.89,
3.97,
4.06,
4.15,
4.23,
4.32,
4.43,
4.55,
4.66,
4.73,
4.79,
4.82,
4.92,
5.02,
5.15,
5.33,
5.48,
5.59,
5.69,
5.86,
6.00,
6.17,
6.32,
6.48,
6.67,
6.83,
7.01,
7.20,
7.47,
7.68,
7.95,
8.18,
8.75,
9.32,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(2, 1, 2): np.array(
[ # L3-shell
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.02,
0.03,
0.05,
0.09,
0.13,
0.16,
0.17,
0.19,
0.10,
0.20,
0.20,
0.20,
0.20,
0.30,
0.30,
0.40,
0.66,
0.76,
0.82,
0.94,
1.00,
1.08,
1.17,
1.27,
1.39,
1.50,
1.57,
1.66,
1.78,
1.91,
2.00,
2.13,
2.25,
2.40,
2.50,
2.65,
2.75,
2.87,
2.95,
3.08,
3.13,
3.25,
3.32,
3.41,
3.48,
3.60,
3.65,
3.75,
3.86,
3.91,
4.01,
4.12,
4.17,
4.26,
4.35,
4.48,
4.60,
4.68,
4.80,
4.88,
4.98,
5.04,
5.16,
5.25,
5.31,
5.41,
5.50,
5.65,
5.81,
5.98,
6.13,
6.29,
6.41,
6.65,
6.82,
6.98,
7.13,
7.33,
7.43,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
}
# Campbell & Papp (2001) dataset — the default, covers K through N7 shells
core_hole_width_data_campbell_papp = {
(1, 0, 1): np.array(
[ # K-shell, (NC=1, LC=0)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.24,
0.28,
0.33,
0.37,
0.43,
0.47,
0.52,
0.57,
0.66,
0.71,
0.77,
0.83,
0.89,
0.96,
1.02,
1.11,
1.19,
1.28,
1.39,
1.49,
1.62,
1.76,
1.92,
2.09,
2.28,
2.49,
2.71,
2.96,
3.23,
3.51,
3.83,
4.16,
4.52,
4.91,
5.33,
5.77,
6.25,
6.76,
7.32,
7.90,
8.53,
9.20,
9.91,
10.70,
11.50,
12.30,
13.20,
14.20,
15.20,
16.20,
17.40,
18.50,
19.80,
21.10,
22.40,
23.80,
25.30,
26.90,
28.50,
30.20,
32.00,
33.90,
35.90,
37.90,
40.10,
42.20,
44.60,
47.00,
49.50,
52.10,
54.80,
57.60,
60.60,
63.60,
66.80,
70.00,
73.40,
76.90,
80.60,
84.40,
88.20,
92.10,
96.30,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(2, 0, 1): np.array(
[ # L1-shell, (NC=2, LC=0)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.28,
0.46,
0.78,
0.90,
1.10,
1.30,
1.50,
1.80,
2.10,
2.50,
3.30,
3.90,
4.60,
5.20,
6.20,
7.00,
7.20,
6.40,
5.50,
4.80,
4.10,
3.80,
3.80,
3.80,
3.80,
3.75,
3.75,
3.75,
3.75,
3.75,
3.80,
3.80,
3.80,
3.90,
4.00,
3.90,
3.80,
3.50,
3.00,
2.40,
2.30,
2.20,
2.10,
2.00,
2.00,
2.10,
2.20,
2.50,
2.70,
2.90,
3.10,
3.30,
3.60,
3.80,
4.00,
4.30,
4.50,
4.70,
4.90,
5.20,
5.40,
5.70,
6.00,
6.30,
6.70,
7.20,
7.90,
8.80,
9.80,
10.50,
11.10,
11.80,
12.30,
12.70,
13.00,
13.20,
13.50,
13.70,
14.00,
14.30,
14.70,
16.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(2, 1, 1): np.array(
[ # L2-shell, (NC=2, LC=1, IK=1)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.01,
0.02,
0.03,
0.04,
0.05,
0.07,
0.09,
0.11,
0.13,
0.18,
0.21,
0.36,
0.52,
0.78,
0.76,
0.97,
1.14,
1.13,
0.98,
1.04,
1.06,
0.77,
0.86,
0.95,
1.05,
1.14,
1.25,
1.34,
1.43,
1.53,
1.63,
1.73,
1.83,
1.93,
2.03,
2.13,
2.23,
2.32,
2.42,
2.53,
2.64,
2.74,
2.84,
2.95,
3.05,
3.15,
3.25,
3.35,
3.41,
3.48,
3.55,
3.63,
3.70,
3.77,
3.87,
3.93,
4.01,
4.09,
4.18,
4.26,
4.36,
4.46,
4.57,
4.69,
4.82,
4.95,
5.09,
5.23,
5.38,
5.53,
5.69,
5.87,
6.04,
6.22,
6.41,
6.60,
6.81,
7.02,
7.50,
8.00,
8.50,
9.10,
10.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(2, 1, 2): np.array(
[ # L3-shell, (NC=2, LC=1, IK=2)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.01,
0.02,
0.03,
0.04,
0.05,
0.07,
0.09,
0.11,
0.13,
0.18,
0.21,
0.23,
0.25,
0.28,
0.32,
0.36,
0.41,
0.47,
0.53,
0.61,
0.68,
0.77,
0.86,
0.94,
1.02,
1.11,
1.19,
1.27,
1.35,
1.43,
1.51,
1.60,
1.69,
1.78,
1.87,
1.96,
2.05,
2.15,
2.24,
2.34,
2.43,
2.53,
2.62,
2.72,
2.82,
2.92,
3.02,
3.12,
3.19,
3.27,
3.36,
3.44,
3.53,
3.62,
3.72,
3.80,
3.90,
4.00,
4.10,
4.20,
4.31,
4.43,
4.55,
4.68,
4.81,
4.95,
5.09,
5.24,
5.39,
5.54,
5.71,
5.89,
6.07,
6.27,
6.46,
6.66,
6.87,
7.08,
7.29,
7.51,
7.74,
7.97,
8.20,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(3, 0, 1): np.array(
[ # M1-shell (NC=3, LC=0)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.14,
0.70,
1.10,
1.70,
2.10,
2.20,
2.30,
2.40,
2.40,
2.40,
2.30,
2.20,
2.10,
2.00,
2.10,
2.40,
2.80,
3.20,
3.50,
4.00,
4.40,
4.90,
5.40,
5.80,
6.30,
6.70,
7.20,
7.60,
8.00,
8.40,
8.80,
9.20,
9.60,
10.00,
10.20,
10.40,
10.60,
10.80,
11.10,
11.40,
11.60,
11.80,
12.00,
12.20,
12.40,
12.60,
12.80,
13.00,
13.20,
13.40,
13.60,
13.80,
13.90,
14.10,
14.20,
14.30,
14.50,
14.60,
14.70,
14.80,
14.90,
15.00,
15.10,
15.10,
15.20,
15.20,
15.30,
15.30,
15.30,
15.40,
15.40,
15.40,
15.50,
15.50,
15.50,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(3, 1, 1): np.array(
[ # M2-shell (NC=3, LC=1, IK=1)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
1.20,
1.20,
1.20,
1.20,
1.20,
1.20,
1.23,
1.25,
1.30,
1.90,
2.10,
2.25,
2.30,
2.25,
2.20,
2.10,
1.60,
1.90,
1.90,
1.95,
2.00,
2.05,
2.10,
2.15,
2.20,
2.25,
2.35,
2.45,
2.55,
2.70,
2.85,
3.00,
3.20,
3.35,
3.50,
3.70,
3.90,
4.10,
4.30,
4.50,
4.70,
5.00,
5.20,
5.40,
5.60,
5.80,
6.00,
6.30,
6.60,
6.85,
7.10,
7.30,
7.50,
7.80,
8.10,
8.40,
8.60,
8.90,
9.20,
9.50,
9.80,
10.10,
10.40,
10.70,
11.10,
11.40,
11.70,
12.10,
12.50,
12.90,
13.20,
13.60,
14.10,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(3, 1, 2): np.array(
[ # M3-shell (NC=3, LC=1, IK=2)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
1.20,
1.20,
1.20,
1.20,
1.20,
1.20,
1.23,
1.27,
1.30,
1.80,
2.15,
2.30,
2.30,
2.25,
2.20,
2.15,
1.10,
1.95,
1.90,
1.95,
2.00,
2.05,
2.10,
2.15,
2.20,
2.25,
2.35,
2.55,
2.80,
3.05,
3.30,
3.60,
3.90,
4.30,
4.70,
5.00,
5.40,
5.80,
6.20,
6.70,
7.30,
7.80,
8.10,
8.20,
8.30,
8.20,
8.00,
7.80,
7.50,
7.10,
6.70,
6.00,
5.60,
5.70,
6.40,
6.90,
7.50,
8.00,
8.30,
8.50,
8.60,
8.70,
8.70,
8.60,
8.50,
8.40,
8.30,
8.20,
8.20,
8.00,
8.00,
7.90,
7.90,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(3, 2, 1): np.array(
[ # M4-shell (NC=3, LC=2, IK=1)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.01,
0.04,
0.06,
0.07,
0.07,
0.07,
0.07,
0.06,
0.06,
0.07,
0.09,
0.22,
0.50,
0.59,
0.61,
0.26,
0.30,
0.34,
0.38,
0.43,
0.47,
0.52,
0.56,
0.60,
0.63,
0.67,
0.70,
0.72,
0.75,
0.78,
0.82,
0.86,
0.90,
0.95,
1.01,
1.06,
1.13,
1.20,
1.27,
1.35,
1.43,
1.52,
1.61,
1.70,
1.79,
1.89,
1.99,
2.08,
2.18,
2.28,
2.38,
2.48,
2.58,
2.68,
2.78,
2.88,
2.98,
3.08,
3.18,
3.28,
3.39,
3.50,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(3, 2, 2): np.array(
[ # M5-shell (NC=3, LC=2, IK=2)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.04,
0.06,
0.07,
0.07,
0.07,
0.07,
0.06,
0.07,
0.07,
0.10,
0.12,
0.14,
0.17,
0.21,
0.26,
0.31,
0.35,
0.39,
0.44,
0.48,
0.52,
0.56,
0.60,
0.63,
0.67,
0.70,
0.72,
0.75,
0.78,
0.82,
0.86,
0.90,
0.95,
1.01,
1.06,
1.13,
1.20,
1.27,
1.35,
1.43,
1.52,
1.61,
1.70,
1.79,
1.89,
1.99,
2.08,
2.18,
2.28,
2.38,
2.48,
2.58,
2.68,
2.78,
2.88,
2.98,
3.08,
3.18,
3.28,
3.39,
3.50,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 0, 1): np.array(
[ # N1-shell (NC=4, LC=0)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.40,
1.20,
1.60,
2.00,
2.40,
2.80,
3.20,
3.50,
3.90,
4.20,
4.35,
4.40,
4.40,
4.20,
3.40,
2.60,
2.40,
2.40,
2.60,
2.80,
3.10,
3.30,
3.50,
3.70,
4.00,
4.20,
4.40,
4.60,
4.90,
5.10,
5.40,
5.60,
5.80,
6.10,
6.30,
6.60,
6.80,
7.00,
7.30,
7.50,
7.70,
8.00,
8.25,
8.50,
8.80,
9.10,
9.35,
9.60,
9.90,
10.10,
10.40,
10.70,
10.95,
11.20,
11.50,
11.60,
12.20,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 1, 1): np.array(
[ # N2-shell (NC=4, LC=1, IK=1)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.40,
0.80,
1.20,
1.50,
2.20,
2.70,
3.20,
4.20,
6.40,
8.40,
10.80,
13.20,
17.00,
0.00,
0.00,
0.00,
0.00,
0.00,
5.00,
5.03,
5.06,
5.08,
5.10,
5.13,
5.16,
5.20,
5.23,
5.26,
5.30,
5.33,
5.36,
5.40,
5.50,
5.50,
5.60,
5.70,
5.80,
5.90,
6.00,
6.10,
6.25,
6.40,
6.55,
6.70,
6.90,
7.20,
7.35,
7.60,
7.80,
8.10,
8.30,
8.50,
8.75,
9.20,
9.60,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 1, 2): np.array(
[ # N3-shell (NC=4, LC=1, IK=2)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.30,
0.60,
1.00,
1.60,
2.20,
2.80,
3.80,
5.60,
8.00,
10.50,
14.00,
17.00,
0.00,
0.00,
0.00,
0.00,
0.00,
1.30,
1.45,
1.60,
1.75,
1.90,
2.05,
2.20,
2.35,
2.50,
2.65,
2.80,
2.95,
3.15,
3.30,
3.50,
3.65,
3.85,
4.00,
4.20,
4.40,
4.60,
4.75,
4.90,
5.05,
5.30,
5.60,
5.80,
5.95,
6.20,
6.40,
6.60,
6.80,
7.00,
7.25,
7.50,
7.75,
8.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 2, 1): np.array(
[ # N4-shell (NC=4, LC=2, IK=1)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.08,
0.14,
0.17,
0.11,
0.10,
0.08,
0.08,
0.09,
0.61,
0.78,
1.05,
1.38,
1.78,
2.20,
2.45,
2.70,
2.95,
3.15,
3.35,
3.55,
3.70,
3.80,
3.90,
4.00,
4.10,
4.10,
4.10,
4.10,
4.10,
4.10,
4.00,
3.90,
3.80,
3.80,
3.90,
3.90,
4.00,
4.10,
4.15,
4.20,
4.30,
4.40,
4.50,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 2, 2): np.array(
[ # N5-shell (NC=4, LC=2, IK=2)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.08,
0.14,
0.20,
0.12,
0.08,
0.08,
0.08,
0.10,
0.32,
0.53,
0.80,
1.11,
1.48,
1.90,
2.20,
2.40,
2.60,
2.80,
2.95,
3.10,
3.20,
3.30,
3.50,
3.65,
3.80,
3.90,
3.90,
4.00,
3.95,
3.90,
3.85,
3.80,
3.80,
3.80,
3.80,
3.85,
3.90,
3.95,
4.00,
4.05,
4.10,
4.20,
4.25,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 3, 1): np.array(
[ # N6-shell (NC=4, LC=3, IK=1)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.03,
0.03,
0.07,
0.08,
0.10,
0.15,
0.22,
0.31,
0.35,
0.37,
0.33,
0.29,
0.26,
0.22,
0.19,
0.17,
0.16,
0.15,
0.15,
0.15,
0.15,
0.29,
0.37,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
(4, 3, 2): np.array(
[ # N7-shell (NC=4, LC=3, IK=2)
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.03,
0.03,
0.03,
0.04,
0.06,
0.11,
0.18,
0.27,
0.31,
0.33,
0.31,
0.27,
0.23,
0.20,
0.18,
0.16,
0.16,
0.15,
0.16,
0.17,
0.18,
0.25,
0.31,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
]
),
# The remaining shells (O1-O5, P1-P3) were in the Fortran header but had no data.
# They are omitted here as per the original source code's data section.
}
# Backward-compatible alias
core_hole_width_data = core_hole_width_data_campbell_papp
_CORE_HOLE_WIDTH_SOURCES = {
"campbell-papp": core_hole_width_data_campbell_papp,
"fuggle-inglesfield": core_hole_width_data_fuggle_inglesfield,
"xband6": core_hole_width_data_fuggle_inglesfield,
"xband8": core_hole_width_data_campbell_papp,
}
[docs]
def core_hole_width(Z, NC, LC, IK, source="campbell-papp"):
"""
Calculates the Lorentzian core-hole life time (width) in [eV] based on
atomic number and quantum numbers of the core shell.
This function is a refactored Python translation of the WCOREHOLE Fortran
function. It uses a dictionary lookup with a key derived from the quantum
numbers to avoid a long if/else chain.
Args:
Z (int): Atomic number (1-104).
NC (int): Principal quantum number of core shell.
LC (int): Angular momentum quantum number of core shell.
IK (int): Selects SOC-split subshell (1: j=l-1/2, 2: j=l+1/2).
For shells without SOC splitting (LC=0), this is not used.
source (str): Dataset to use. One of 'campbell-papp' (default, Campbell &
Papp 2001, covers K–N7) or 'fuggle-inglesfield' (Fuggle &
Inglesfield 1992, K and L shells only; returns 0 for higher).
Returns:
float: Lorentzian core-hole width in eV.
"""
# Check if the atomic number is within the valid range
if Z < 1 or Z > 104:
raise ValueError(f"Error in core_hole_width: Z={Z} is out of the valid range [1, 104].")
dataset = _CORE_HOLE_WIDTH_SOURCES.get(source)
if dataset is None:
raise ValueError(
f"Unknown core-hole width source '{source}'. Valid options are: {list(_CORE_HOLE_WIDTH_SOURCES)}"
)
# Fortran uses 1-based indexing for arrays, so we convert the atomic number Z.
z_index = Z - 1
# Construct a key tuple to directly look up the data array.
key_tuple = (NC, LC, IK if LC > 0 else 1)
arr = dataset.get(key_tuple)
if arr is None:
# Shell not tabulated in this dataset (e.g. M/N shells in fuggle-inglesfield)
return 0.0
try:
return arr[z_index]
except (IndexError, ValueError):
raise ValueError(f"Unknown data for lorentzian core hole for Z={Z}, NC={NC}, LC={LC}, IK={IK}")