xarpes 0.3.4__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xarpes-0.3.4 → xarpes-0.4.0}/PKG-INFO +3 -3
- {xarpes-0.3.4 → xarpes-0.4.0}/README.md +2 -2
- {xarpes-0.3.4 → xarpes-0.4.0}/examples/graphene/graphene.Rmd +39 -83
- {xarpes-0.3.4 → xarpes-0.4.0}/examples/graphene/graphene.py +35 -71
- {xarpes-0.3.4 → xarpes-0.4.0}/examples/srtio3/srtio3.Rmd +25 -99
- {xarpes-0.3.4 → xarpes-0.4.0}/examples/srtio3/srtio3.py +23 -90
- {xarpes-0.3.4 → xarpes-0.4.0}/xarpes/__init__.py +2 -2
- {xarpes-0.3.4 → xarpes-0.4.0}/xarpes/plotting.py +31 -1
- {xarpes-0.3.4 → xarpes-0.4.0}/xarpes/spectral.py +360 -59
- {xarpes-0.3.4 → xarpes-0.4.0}/.gitignore +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/.readthedocs.yaml +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/LICENSE +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/dev_tools/Rmd2py.py +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/Makefile +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/README.md +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/_static/xarpes_small.svg +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/conf.py +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/index.rst +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/modules/distributions.rst +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/modules/functions.rst +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/modules/plotting.rst +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/modules/spectral.rst +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/doc/requirements.txt +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/examples/graphene/data_sets/graphene_152.ibw +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/examples/srtio3/data_sets/STO_2_0010STO_2_.ibw +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/logo/Makefile +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/logo/exubi.svg +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/logo/xarpes.svg +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/pyproject.toml +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/xarpes/constants.py +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/xarpes/distributions.py +0 -0
- {xarpes-0.3.4 → xarpes-0.4.0}/xarpes/functions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xarpes
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Extraction from angle resolved photoemission spectra
|
|
5
5
|
Author: xARPES Developers
|
|
6
6
|
Requires-Python: >=3.7.0
|
|
@@ -88,10 +88,10 @@ Example for Linux:
|
|
|
88
88
|
|
|
89
89
|
Answer `y` to questions. Create and activate a new environment:
|
|
90
90
|
|
|
91
|
-
conda create -n <my_env> -c
|
|
91
|
+
conda create -n <my_env> -c conda-forge
|
|
92
92
|
conda activate <my_env>
|
|
93
93
|
|
|
94
|
-
Where `<my_env>` must be replaced by your desired name.
|
|
94
|
+
Where `<my_env>` must be replaced by your desired name. Package compatibility ssues may arise if conda installs from different channels. This can be prevented by appending `--strict-channel-priority` to the creation command.
|
|
95
95
|
|
|
96
96
|
### Installing xARPES
|
|
97
97
|
|
|
@@ -65,10 +65,10 @@ Example for Linux:
|
|
|
65
65
|
|
|
66
66
|
Answer `y` to questions. Create and activate a new environment:
|
|
67
67
|
|
|
68
|
-
conda create -n <my_env> -c
|
|
68
|
+
conda create -n <my_env> -c conda-forge
|
|
69
69
|
conda activate <my_env>
|
|
70
70
|
|
|
71
|
-
Where `<my_env>` must be replaced by your desired name.
|
|
71
|
+
Where `<my_env>` must be replaced by your desired name. Package compatibility ssues may arise if conda installs from different channels. This can be prevented by appending `--strict-channel-priority` to the creation command.
|
|
72
72
|
|
|
73
73
|
### Installing xARPES
|
|
74
74
|
|
|
@@ -8,7 +8,7 @@ jupyter:
|
|
|
8
8
|
format_version: '1.2'
|
|
9
9
|
jupytext_version: 1.15.2
|
|
10
10
|
kernelspec:
|
|
11
|
-
display_name: 3
|
|
11
|
+
display_name: Python 3 (ipykernel)
|
|
12
12
|
language: python
|
|
13
13
|
name: python3
|
|
14
14
|
---
|
|
@@ -30,9 +30,6 @@ import os
|
|
|
30
30
|
|
|
31
31
|
# Default plot configuration from xarpes.plotting.py
|
|
32
32
|
xarpes.plot_settings('default')
|
|
33
|
-
|
|
34
|
-
# If needed, close figures before running other cells, if figures show up in the wrong places.
|
|
35
|
-
# get_ipython().events.register('pre_run_cell', lambda info: plt.close('all'))
|
|
36
33
|
```
|
|
37
34
|
|
|
38
35
|
```{python}
|
|
@@ -63,13 +60,13 @@ fig = bmap.plot(abscissa='momentum', ordinate='kinetic_energy', ax=ax)
|
|
|
63
60
|
|
|
64
61
|
fig, ax = plt.subplots(2, 1, figsize=(6, 8))
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
bmap.correct_fermi_edge(
|
|
67
64
|
hnuminphi_guess=32, background_guess=1e2,
|
|
68
65
|
integrated_weight_guess=1e3, angle_min=-10, angle_max=10,
|
|
69
66
|
ekin_min=31.96, ekin_max=32.1, true_angle=0,
|
|
70
67
|
ax=ax[0], show=False, fig_close=False)
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
bmap.plot(ordinate='electron_energy', abscissa='momentum',
|
|
73
70
|
ax=ax[1], show=False, fig_close=False)
|
|
74
71
|
|
|
75
72
|
# Figure customization
|
|
@@ -125,6 +122,7 @@ fig = mdcs.visualize_guess(distributions=guess_dists, energy_value=energy_value,
|
|
|
125
122
|
#### Note on interactive figures
|
|
126
123
|
- The interactive figure might not work inside the Jupyter notebooks, despite our best efforts to ensure stability.
|
|
127
124
|
- As a fallback, the user may switch from "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
125
|
+
- For some package versions, a static version of the interactive widget may spuriously show up inside other cells. In that case, uncomment the #get_ipython()... line in the first cell for your notebooks.
|
|
128
126
|
|
|
129
127
|
```{python}
|
|
130
128
|
# %matplotlib widget
|
|
@@ -137,53 +135,29 @@ mdcs = xarpes.MDCs(*bmap.mdc_set(angle_min, angle_max, energy_range=energy_range
|
|
|
137
135
|
fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
138
136
|
```
|
|
139
137
|
|
|
140
|
-
```{python}
|
|
141
|
-
# # %matplotlib widget
|
|
142
|
-
|
|
143
|
-
# fig = plt.figure(figsize=(7, 5))
|
|
144
|
-
# ax = fig.gca()
|
|
145
|
-
|
|
146
|
-
# mdcs.plot(energy_range=[-0.15, -0.05], ax=ax)
|
|
147
|
-
```
|
|
148
|
-
|
|
149
138
|
```{python}
|
|
150
139
|
# %matplotlib inline
|
|
151
140
|
|
|
152
|
-
|
|
153
|
-
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
```{python}
|
|
157
|
-
# %matplotlib inline
|
|
141
|
+
plt.rcParams['lines.markersize'] = 0.8
|
|
158
142
|
|
|
159
143
|
fig = plt.figure(figsize=(8, 5))
|
|
160
144
|
ax = fig.gca()
|
|
161
145
|
|
|
162
|
-
|
|
146
|
+
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Linear_test_1',
|
|
147
|
+
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
163
148
|
|
|
164
|
-
|
|
165
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
166
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
149
|
+
self_energies = xarpes.CreateSelfEnergies([self_energy])
|
|
167
150
|
|
|
168
|
-
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax
|
|
151
|
+
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax,
|
|
152
|
+
self_energies=self_energies)
|
|
169
153
|
```
|
|
170
154
|
|
|
171
155
|
```{python}
|
|
172
156
|
# %matplotlib inline
|
|
173
157
|
|
|
174
|
-
fig = plt.figure(figsize=(7, 5))
|
|
175
|
-
ax = fig.gca()
|
|
176
|
-
|
|
177
|
-
from xarpes.constants import stdv
|
|
178
|
-
|
|
179
|
-
ax.errorbar(self_energy.enel_range, self_energy.imag,
|
|
180
|
-
yerr=stdv * self_energy.imag_sigma, label =r"$-\Sigma''(E)$")
|
|
181
|
-
ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
182
|
-
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'(E)$")
|
|
183
|
-
ax.set_xlabel(r'$E-\mu$ (eV)'); ax.set_ylabel(r"$\Sigma'(E), -\Sigma''(E)$ (eV)")
|
|
158
|
+
fig = plt.figure(figsize=(7, 5)); ax = fig.gca()
|
|
184
159
|
|
|
185
|
-
|
|
186
|
-
plt.show()
|
|
160
|
+
fig = self_energy.plot_real(ax=ax)
|
|
187
161
|
```
|
|
188
162
|
|
|
189
163
|
```{python}
|
|
@@ -192,6 +166,8 @@ plt.show()
|
|
|
192
166
|
angle_min2 = -1e6
|
|
193
167
|
angle_max2 = 0
|
|
194
168
|
|
|
169
|
+
plt.rcParams['lines.markersize'] = 3.0
|
|
170
|
+
|
|
195
171
|
mdc2 = xarpes.MDCs(*bmap.mdc_set(angle_min2, angle_max2, energy_range=energy_range))
|
|
196
172
|
|
|
197
173
|
guess_dists2 = xarpes.CreateDistributions([
|
|
@@ -215,70 +191,50 @@ fermi_velocity=-2.67, fermi_wavevector=-0.354))
|
|
|
215
191
|
```
|
|
216
192
|
|
|
217
193
|
```{python}
|
|
218
|
-
import numpy as np
|
|
219
|
-
|
|
220
|
-
from xarpes.constants import dtor, pref
|
|
221
|
-
|
|
222
|
-
Angl, Ekin = np.meshgrid(bmap.angles, bmap.ekin)
|
|
223
|
-
Mome = np.sqrt(Ekin / pref) * np.sin(Angl * dtor)
|
|
224
|
-
|
|
225
|
-
kmin, kmax = np.min(Mome), np.max(Mome)
|
|
226
|
-
|
|
227
|
-
kspc = np.linspace(kmin, kmax, len(bmap.angles))
|
|
228
|
-
|
|
229
|
-
dis1 = self_energy.fermi_velocity * (kspc - self_energy.fermi_wavevector)
|
|
230
|
-
|
|
231
|
-
dis2 = self_left.fermi_velocity *(kspc - self_left.fermi_wavevector)
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
```{python}
|
|
235
|
-
# ax.set_xlim([np.min(Mome), np.max(Mome)])
|
|
236
|
-
# ax.set_ylim([np.min(Ekin - bmap.hnuminphi), np.max(Ekin - bmap.hnuminphi)])
|
|
237
|
-
|
|
238
|
-
from importlib import reload
|
|
239
|
-
import xarpes
|
|
240
|
-
reload(xarpes)
|
|
241
|
-
|
|
242
194
|
# %matplotlib inline
|
|
243
195
|
|
|
244
|
-
fig = plt.figure(figsize=(8, 5))
|
|
245
|
-
ax = fig.gca()
|
|
196
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
246
197
|
|
|
247
198
|
self_energies= xarpes.CreateSelfEnergies([
|
|
248
|
-
self_energy,
|
|
249
|
-
self_left
|
|
250
|
-
])
|
|
199
|
+
self_energy, self_left])
|
|
251
200
|
|
|
252
201
|
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy',
|
|
253
|
-
self_energies=self_energies,
|
|
202
|
+
self_energies=self_energies, plot_dispersions='full',
|
|
203
|
+
ax=ax)
|
|
254
204
|
```
|
|
255
205
|
|
|
256
206
|
```{python}
|
|
257
207
|
# %matplotlib inline
|
|
208
|
+
fig = plt.figure(figsize=(9, 6)); ax = fig.gca()
|
|
258
209
|
|
|
259
|
-
|
|
260
|
-
ax =
|
|
210
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
211
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
261
212
|
|
|
262
|
-
|
|
213
|
+
ax.set_xlim([-0.275, 0.025])
|
|
214
|
+
ax.set_ylim([-0.025, 0.275])
|
|
263
215
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
markersize=2, color='tab:red', label=self_left.label)
|
|
216
|
+
plt.legend(); plt.show()
|
|
217
|
+
```
|
|
267
218
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
219
|
+
```{python}
|
|
220
|
+
# %matplotlib inline
|
|
221
|
+
fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
271
222
|
|
|
272
|
-
|
|
223
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
224
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
273
225
|
|
|
274
|
-
ax.set_xlim([
|
|
275
|
-
ax.set_ylim([np.min(Ekin - bmap.hnuminphi), np.max(Ekin - bmap.hnuminphi)])
|
|
226
|
+
ax.set_xlim([-0.275, 0.025]); ax.set_ylim([-0.025, 0.275])
|
|
276
227
|
|
|
277
|
-
|
|
278
|
-
|
|
228
|
+
# Replace labels with custom labels
|
|
229
|
+
left_real, left_imag, right_real, right_imag = ax.get_lines()
|
|
279
230
|
|
|
280
|
-
|
|
231
|
+
labels = [
|
|
232
|
+
r"$\Sigma_{\mathrm{L}}'(E)$", r"$-\Sigma_{\mathrm{L}}''(E)$",
|
|
233
|
+
r"$\Sigma_{\mathrm{R}}'(E)$", r"$-\Sigma_{\mathrm{R}}''(E)$",
|
|
234
|
+
]
|
|
281
235
|
|
|
236
|
+
ax.legend([left_real, left_imag, right_real, right_imag], labels)
|
|
237
|
+
plt.show()
|
|
282
238
|
```
|
|
283
239
|
|
|
284
240
|
```{python}
|
|
@@ -17,8 +17,6 @@ import os
|
|
|
17
17
|
# Default plot configuration from xarpes.plotting.py
|
|
18
18
|
xarpes.plot_settings('default')
|
|
19
19
|
|
|
20
|
-
# If needed, close figures before running other cells, if figures show up in the wrong places.
|
|
21
|
-
|
|
22
20
|
script_dir = xarpes.set_script_dir()
|
|
23
21
|
|
|
24
22
|
dfld = 'data_sets' # Folder containing the data
|
|
@@ -40,13 +38,13 @@ fig = bmap.plot(abscissa='momentum', ordinate='kinetic_energy', ax=ax)
|
|
|
40
38
|
|
|
41
39
|
fig, ax = plt.subplots(2, 1, figsize=(6, 8))
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
bmap.correct_fermi_edge(
|
|
44
42
|
hnuminphi_guess=32, background_guess=1e2,
|
|
45
43
|
integrated_weight_guess=1e3, angle_min=-10, angle_max=10,
|
|
46
44
|
ekin_min=31.96, ekin_max=32.1, true_angle=0,
|
|
47
45
|
ax=ax[0], show=False, fig_close=False)
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
bmap.plot(ordinate='electron_energy', abscissa='momentum',
|
|
50
48
|
ax=ax[1], show=False, fig_close=False)
|
|
51
49
|
|
|
52
50
|
# Figure customization
|
|
@@ -95,6 +93,7 @@ fig = mdcs.visualize_guess(distributions=guess_dists, energy_value=energy_value,
|
|
|
95
93
|
# #### Note on interactive figures
|
|
96
94
|
# - The interactive figure might not work inside the Jupyter notebooks, despite our best efforts to ensure stability.
|
|
97
95
|
# - As a fallback, the user may switch from "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
96
|
+
# - For some package versions, a static version of the interactive widget may spuriously show up inside other cells. In that case, uncomment the #get_ipython()... line in the first cell for your notebooks.
|
|
98
97
|
|
|
99
98
|
|
|
100
99
|
fig = plt.figure(figsize=(7, 5))
|
|
@@ -105,46 +104,30 @@ mdcs = xarpes.MDCs(*bmap.mdc_set(angle_min, angle_max, energy_range=energy_range
|
|
|
105
104
|
fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
106
105
|
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
# ax = fig.gca()
|
|
110
|
-
|
|
111
|
-
# mdcs.plot(energy_range=[-0.15, -0.05], ax=ax)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Linear_test_1',
|
|
115
|
-
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
116
|
-
|
|
107
|
+
plt.rcParams['lines.markersize'] = 0.8
|
|
117
108
|
|
|
118
109
|
fig = plt.figure(figsize=(8, 5))
|
|
119
110
|
ax = fig.gca()
|
|
120
111
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
124
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
125
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
126
|
-
|
|
127
|
-
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
112
|
+
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Linear_test_1',
|
|
113
|
+
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
128
114
|
|
|
115
|
+
self_energies = xarpes.CreateSelfEnergies([self_energy])
|
|
129
116
|
|
|
130
|
-
fig =
|
|
131
|
-
|
|
117
|
+
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax,
|
|
118
|
+
self_energies=self_energies)
|
|
132
119
|
|
|
133
|
-
from xarpes.constants import stdv
|
|
134
120
|
|
|
135
|
-
|
|
136
|
-
yerr=stdv * self_energy.imag_sigma, label =r"$-\Sigma''(E)$")
|
|
137
|
-
ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
138
|
-
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'(E)$")
|
|
139
|
-
ax.set_xlabel(r'$E-\mu$ (eV)'); ax.set_ylabel(r"$\Sigma'(E), -\Sigma''(E)$ (eV)")
|
|
121
|
+
fig = plt.figure(figsize=(7, 5)); ax = fig.gca()
|
|
140
122
|
|
|
141
|
-
|
|
142
|
-
plt.show()
|
|
123
|
+
fig = self_energy.plot_real(ax=ax)
|
|
143
124
|
|
|
144
125
|
|
|
145
126
|
angle_min2 = -1e6
|
|
146
127
|
angle_max2 = 0
|
|
147
128
|
|
|
129
|
+
plt.rcParams['lines.markersize'] = 3.0
|
|
130
|
+
|
|
148
131
|
mdc2 = xarpes.MDCs(*bmap.mdc_set(angle_min2, angle_max2, energy_range=energy_range))
|
|
149
132
|
|
|
150
133
|
guess_dists2 = xarpes.CreateDistributions([
|
|
@@ -164,62 +147,43 @@ fig = mdc2.fit_selection(distributions=guess_dists2, show=False, fig_close=True)
|
|
|
164
147
|
self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_1',
|
|
165
148
|
fermi_velocity=-2.67, fermi_wavevector=-0.354))
|
|
166
149
|
|
|
167
|
-
import numpy as np
|
|
168
150
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Angl, Ekin = np.meshgrid(bmap.angles, bmap.ekin)
|
|
172
|
-
Mome = np.sqrt(Ekin / pref) * np.sin(Angl * dtor)
|
|
173
|
-
|
|
174
|
-
kmin, kmax = np.min(Mome), np.max(Mome)
|
|
175
|
-
|
|
176
|
-
kspc = np.linspace(kmin, kmax, len(bmap.angles))
|
|
177
|
-
|
|
178
|
-
dis1 = self_energy.fermi_velocity * (kspc - self_energy.fermi_wavevector)
|
|
179
|
-
|
|
180
|
-
dis2 = self_left.fermi_velocity *(kspc - self_left.fermi_wavevector)
|
|
181
|
-
|
|
182
|
-
# ax.set_xlim([np.min(Mome), np.max(Mome)])
|
|
183
|
-
# ax.set_ylim([np.min(Ekin - bmap.hnuminphi), np.max(Ekin - bmap.hnuminphi)])
|
|
184
|
-
|
|
185
|
-
from importlib import reload
|
|
186
|
-
import xarpes
|
|
187
|
-
reload(xarpes)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
fig = plt.figure(figsize=(8, 5))
|
|
191
|
-
ax = fig.gca()
|
|
151
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
192
152
|
|
|
193
153
|
self_energies= xarpes.CreateSelfEnergies([
|
|
194
|
-
self_energy,
|
|
195
|
-
self_left
|
|
196
|
-
])
|
|
154
|
+
self_energy, self_left])
|
|
197
155
|
|
|
198
156
|
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy',
|
|
199
|
-
self_energies=self_energies,
|
|
157
|
+
self_energies=self_energies, plot_dispersions='full',
|
|
158
|
+
ax=ax)
|
|
200
159
|
|
|
160
|
+
fig = plt.figure(figsize=(9, 6)); ax = fig.gca()
|
|
201
161
|
|
|
202
|
-
|
|
203
|
-
ax =
|
|
162
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
163
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
204
164
|
|
|
205
|
-
|
|
165
|
+
ax.set_xlim([-0.275, 0.025])
|
|
166
|
+
ax.set_ylim([-0.025, 0.275])
|
|
206
167
|
|
|
207
|
-
|
|
208
|
-
xerr=stdv * self_left.peak_positions_sigma,
|
|
209
|
-
markersize=2, color='tab:red', label=self_left.label)
|
|
168
|
+
plt.legend(); plt.show()
|
|
210
169
|
|
|
211
|
-
|
|
212
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
213
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
170
|
+
fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
214
171
|
|
|
215
|
-
|
|
172
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
173
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
216
174
|
|
|
217
|
-
ax.set_xlim([
|
|
218
|
-
ax.set_ylim([np.min(Ekin - bmap.hnuminphi), np.max(Ekin - bmap.hnuminphi)])
|
|
175
|
+
ax.set_xlim([-0.275, 0.025]); ax.set_ylim([-0.025, 0.275])
|
|
219
176
|
|
|
220
|
-
|
|
177
|
+
# Replace labels with custom labels
|
|
178
|
+
left_real, left_imag, right_real, right_imag = ax.get_lines()
|
|
221
179
|
|
|
180
|
+
labels = [
|
|
181
|
+
r"$\Sigma_{\mathrm{L}}'(E)$", r"$-\Sigma_{\mathrm{L}}''(E)$",
|
|
182
|
+
r"$\Sigma_{\mathrm{R}}'(E)$", r"$-\Sigma_{\mathrm{R}}''(E)$",
|
|
183
|
+
]
|
|
222
184
|
|
|
185
|
+
ax.legend([left_real, left_imag, right_real, right_imag], labels)
|
|
186
|
+
plt.show()
|
|
223
187
|
|
|
224
188
|
|
|
225
189
|
# fig = plt.figure(figsize=(8, 5))
|
|
@@ -7,7 +7,7 @@ jupyter:
|
|
|
7
7
|
format_version: '1.2'
|
|
8
8
|
jupytext_version: 1.15.2
|
|
9
9
|
kernelspec:
|
|
10
|
-
display_name: 3
|
|
10
|
+
display_name: Python 3 (ipykernel)
|
|
11
11
|
language: python
|
|
12
12
|
name: python3
|
|
13
13
|
---
|
|
@@ -27,9 +27,6 @@ import os
|
|
|
27
27
|
|
|
28
28
|
# Default plot configuration from xarpes.plotting.py
|
|
29
29
|
xarpes.plot_settings('default')
|
|
30
|
-
|
|
31
|
-
# If needed, close figures before running other cells, if figures show up in the wrong places.
|
|
32
|
-
# get_ipython().events.register('pre_run_cell', lambda info: plt.close('all'))
|
|
33
30
|
```
|
|
34
31
|
|
|
35
32
|
```{python}
|
|
@@ -104,18 +101,15 @@ fig = mdcs.visualize_guess(distributions=guess_dists, matrix_element=mat_el,
|
|
|
104
101
|
#### Note on interactive figures
|
|
105
102
|
- The interactive figure might not work inside the Jupyter notebooks, despite our best efforts to ensure stability.
|
|
106
103
|
- As a fallback, the user may switch from "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
104
|
+
- For some package versions, a static version of the interactive widget may spuriously show up inside other cells. In that case, uncomment the #get_ipython()... line in the first cell for your notebooks.
|
|
107
105
|
|
|
108
106
|
```{python}
|
|
109
107
|
# %matplotlib widget
|
|
110
108
|
|
|
111
|
-
fig = plt.figure(figsize=(7, 5))
|
|
112
|
-
ax = fig.gca()
|
|
109
|
+
fig = plt.figure(figsize=(7, 5)); ax = fig.gca()
|
|
113
110
|
|
|
114
111
|
fig = mdcs.fit_selection(distributions=guess_dists, matrix_element=mat_el,
|
|
115
112
|
matrix_args=mat_args, ax=ax)
|
|
116
|
-
|
|
117
|
-
# fig = mdcs.fit_selection(distributions=guess_dists, matrix_element=mat_el,
|
|
118
|
-
# matrix_args=mat_args, ax=ax)
|
|
119
113
|
```
|
|
120
114
|
|
|
121
115
|
##### Notes for quadratic bands
|
|
@@ -125,10 +119,8 @@ fig = mdcs.fit_selection(distributions=guess_dists, matrix_element=mat_el,
|
|
|
125
119
|
- Instead, the user is advised to carefully check correspondence of peak maxima with MDC fitting results.
|
|
126
120
|
|
|
127
121
|
```{python}
|
|
128
|
-
fermi_one = 0.142
|
|
129
|
-
|
|
130
122
|
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Inner_band_1',
|
|
131
|
-
bare_mass=0.6, fermi_wavevector=
|
|
123
|
+
bare_mass=0.6, fermi_wavevector=0.142, side='right'))
|
|
132
124
|
|
|
133
125
|
self_two = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Outer_band_2',
|
|
134
126
|
bare_mass=0.6, fermi_wavevector=0.207))
|
|
@@ -136,80 +128,27 @@ self_two = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Outer_band_2'
|
|
|
136
128
|
self_two.side='right'
|
|
137
129
|
```
|
|
138
130
|
|
|
139
|
-
```{python}
|
|
140
|
-
self_energies = xarpes.CreateSelfEnergies([self_energy, self_two])
|
|
141
|
-
```
|
|
142
|
-
|
|
143
131
|
```{python}
|
|
144
132
|
# %matplotlib inline
|
|
145
133
|
|
|
146
|
-
|
|
147
|
-
ax = fig.gca()
|
|
148
|
-
|
|
149
|
-
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', self_energies=self_energies, ax=ax)
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
```{python}
|
|
153
|
-
fig = plt.figure(figsize=(7, 5))
|
|
154
|
-
ax = fig.gca()
|
|
155
|
-
|
|
156
|
-
from xarpes.constants import stdv
|
|
157
|
-
|
|
158
|
-
ax.errorbar(self_energy.enel_range, self_energy.imag,
|
|
159
|
-
yerr=stdv * self_energy.imag_sigma, label =r"$-\Sigma''_{\rm{IR}}(E)$")
|
|
160
|
-
ax.errorbar(self_energy.enel_range, self_two.imag,
|
|
161
|
-
yerr=stdv * self_two.imag_sigma, label =r"$-\Sigma''_{\rm{OR}}(E)$")
|
|
162
|
-
ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
163
|
-
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'_{\rm{IR}}(E)$")
|
|
164
|
-
ax.errorbar(self_energy.enel_range, self_two.real,
|
|
165
|
-
yerr=stdv * self_two.real_sigma, label =r"$\Sigma'_{\rm{OR}}(E)$")
|
|
166
|
-
ax.set_xlabel(r'$E-\mu$ (eV)'); ax.set_ylabel(r"$\Sigma'(E), -\Sigma''(E)$ (eV)")
|
|
167
|
-
|
|
168
|
-
ax.set_ylim([0, 0.06])
|
|
169
|
-
|
|
170
|
-
plt.legend(); plt.show()
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
```{python}
|
|
174
|
-
import numpy as np
|
|
175
|
-
|
|
176
|
-
Angl, Ekin = np.meshgrid(bmap.angles, bmap.ekin)
|
|
177
|
-
Mome = np.sqrt(Ekin / xarpes.pref) * np.sin(Angl * xarpes.dtor)
|
|
178
|
-
|
|
179
|
-
kmin, kmax = np.min(Mome), np.max(Mome)
|
|
180
|
-
|
|
181
|
-
kspc = np.linspace(kmin, kmax, len(bmap.angles))
|
|
182
|
-
|
|
183
|
-
dis1 = xarpes.pref * (((kspc - self_energy.center_wavevector)**2 - self_energy.fermi_wavevector**2)) \
|
|
184
|
-
/ self_energy.bare_mass
|
|
134
|
+
self_energies = xarpes.CreateSelfEnergies([self_energy, self_two])
|
|
185
135
|
|
|
186
|
-
|
|
136
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
187
137
|
|
|
188
|
-
|
|
138
|
+
fig = bmap.plot(abscissa='momentum', ordinate='kinetic_energy',
|
|
139
|
+
plot_dispersions='domain',
|
|
140
|
+
self_energies=self_energies, ax=ax)
|
|
189
141
|
```
|
|
190
142
|
|
|
191
143
|
```{python}
|
|
192
144
|
# %matplotlib inline
|
|
193
145
|
|
|
194
|
-
fig = plt.figure(figsize=(
|
|
195
|
-
ax = fig.gca()
|
|
146
|
+
fig = plt.figure(figsize=(9, 6)); ax = fig.gca()
|
|
196
147
|
|
|
197
|
-
|
|
148
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
149
|
+
self_two.plot_both(ax=ax, show=False, fig_close=False)
|
|
198
150
|
|
|
199
|
-
|
|
200
|
-
# xerr=stdv * self_energy.peak_positions_sigma,
|
|
201
|
-
# markersize=2, color='tab:blue', label=self_energy.label)
|
|
202
|
-
# ax.errorbar(self_two.mdc_maxima, self_two.enel_range,
|
|
203
|
-
# xerr=stdv * self_two.peak_positions_sigma,
|
|
204
|
-
# markersize=2, color='tab:purple', label=self_two.label)
|
|
205
|
-
|
|
206
|
-
ax.plot(kspc, dis1, linestyle='--')
|
|
207
|
-
|
|
208
|
-
ax.set_xlim([-0.25, 0.25]); ax.set_ylim([-0.3, 0.1])
|
|
209
|
-
|
|
210
|
-
plt.legend()
|
|
211
|
-
|
|
212
|
-
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
151
|
+
plt.legend(); plt.show()
|
|
213
152
|
```
|
|
214
153
|
|
|
215
154
|
```{python}
|
|
@@ -248,41 +187,28 @@ fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
|
248
187
|
|
|
249
188
|
```{python}
|
|
250
189
|
self_three = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Inner_nm_1', side='right',
|
|
251
|
-
fermi_wavevector=
|
|
190
|
+
bare_mass=0.5, fermi_wavevector=0.142))
|
|
252
191
|
|
|
253
192
|
self_four = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Outer_nm_2', side='right',
|
|
254
|
-
fermi_wavevector=
|
|
193
|
+
bare_mass=0.62, fermi_wavevector=0.207))
|
|
194
|
+
|
|
195
|
+
self_three.side='left'
|
|
196
|
+
self_four.side='left'
|
|
255
197
|
```
|
|
256
198
|
|
|
257
199
|
```{python}
|
|
258
200
|
# %matplotlib inline
|
|
259
201
|
|
|
260
|
-
fig = plt.figure(figsize=(
|
|
202
|
+
fig = plt.figure(figsize=(12, 6))
|
|
261
203
|
ax = fig.gca()
|
|
262
204
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
268
|
-
ax.errorbar(self_two.mdc_maxima, self_two.enel_range,
|
|
269
|
-
xerr=stdv * self_two.peak_positions_sigma,
|
|
270
|
-
markersize=2, color='tab:purple', label=self_two.label)
|
|
271
|
-
ax.errorbar(self_three.mdc_maxima, self_three.enel_range,
|
|
272
|
-
xerr=stdv * self_three.peak_positions_sigma,
|
|
273
|
-
markersize=2, color='tab:brown', label=self_three.label)
|
|
274
|
-
ax.errorbar(self_four.mdc_maxima, self_four.enel_range,
|
|
275
|
-
xerr=stdv * self_four.peak_positions_sigma,
|
|
276
|
-
markersize=2, color='palevioletred', label=self_four.label)
|
|
277
|
-
|
|
278
|
-
ax.set_xlim([0, 0.25]); ax.set_ylim([-0.15, 0.05])
|
|
279
|
-
|
|
280
|
-
plt.legend()
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
205
|
+
self_total = xarpes.CreateSelfEnergies([
|
|
206
|
+
self_energy, self_two,
|
|
207
|
+
self_three, self_four
|
|
208
|
+
])
|
|
284
209
|
|
|
285
|
-
|
|
210
|
+
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax, self_energies=self_total,
|
|
211
|
+
plot_dispersions='domain')
|
|
286
212
|
```
|
|
287
213
|
|
|
288
214
|
```{python}
|