xarpes 0.3.3__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.3/README.md → xarpes-0.4.0/PKG-INFO +35 -5
- xarpes-0.3.3/PKG-INFO → xarpes-0.4.0/README.md +11 -27
- {xarpes-0.3.3 → xarpes-0.4.0}/examples/graphene/graphene.Rmd +61 -46
- {xarpes-0.3.3 → xarpes-0.4.0}/examples/graphene/graphene.py +55 -38
- {xarpes-0.3.3 → xarpes-0.4.0}/examples/srtio3/srtio3.Rmd +29 -91
- {xarpes-0.3.3 → xarpes-0.4.0}/examples/srtio3/srtio3.py +27 -82
- {xarpes-0.3.3 → xarpes-0.4.0}/pyproject.toml +3 -2
- {xarpes-0.3.3 → xarpes-0.4.0}/xarpes/__init__.py +1 -1
- {xarpes-0.3.3 → xarpes-0.4.0}/xarpes/functions.py +102 -48
- {xarpes-0.3.3 → xarpes-0.4.0}/xarpes/plotting.py +31 -1
- {xarpes-0.3.3 → xarpes-0.4.0}/xarpes/spectral.py +474 -65
- {xarpes-0.3.3 → xarpes-0.4.0}/.gitignore +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/.readthedocs.yaml +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/LICENSE +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/dev_tools/Rmd2py.py +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/Makefile +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/README.md +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/_static/xarpes_small.svg +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/conf.py +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/index.rst +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/modules/distributions.rst +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/modules/functions.rst +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/modules/plotting.rst +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/modules/spectral.rst +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/doc/requirements.txt +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/examples/graphene/data_sets/graphene_152.ibw +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/examples/srtio3/data_sets/STO_2_0010STO_2_.ibw +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/logo/Makefile +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/logo/exubi.svg +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/logo/xarpes.svg +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/xarpes/constants.py +0 -0
- {xarpes-0.3.3 → xarpes-0.4.0}/xarpes/distributions.py +0 -0
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: xarpes
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Extraction from angle resolved photoemission spectra
|
|
5
|
+
Author: xARPES Developers
|
|
6
|
+
Requires-Python: >=3.7.0
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: igor2>=0.5.8
|
|
12
|
+
Requires-Dist: jupyterlab
|
|
13
|
+
Requires-Dist: jupytext
|
|
14
|
+
Requires-Dist: matplotlib
|
|
15
|
+
Requires-Dist: numpy
|
|
16
|
+
Requires-Dist: scipy
|
|
17
|
+
Requires-Dist: lmfit
|
|
18
|
+
Requires-Dist: pyqt5
|
|
19
|
+
Requires-Dist: ipympl>=0.9.3
|
|
20
|
+
Requires-Dist: ipywidgets>=8.1.5
|
|
21
|
+
Requires-Dist: ipykernel<6.32.0
|
|
22
|
+
Project-URL: Documentation, https://xarpes.github.io
|
|
23
|
+
|
|
1
24
|
# xARPES
|
|
2
25
|
|
|
3
26
|

|
|
@@ -10,7 +33,7 @@ This project is currently undergoing **beta testing**. Some of the functionaliti
|
|
|
10
33
|
|
|
11
34
|
# Contributing
|
|
12
35
|
|
|
13
|
-
Contributions to the code are most welcome. xARPES is intended to co-develop alongside the increasing complexity of experimental ARPES data sets. Contributions can be made by forking the code and creating a pull request. Importing of file formats from different beamlines is particularly encouraged.
|
|
36
|
+
Contributions to the code are most welcome. xARPES is intended to co-develop alongside the increasing complexity of experimental ARPES data sets. Contributions can be made by forking the code and creating a pull request. Importing of file formats from different beamlines is particularly encouraged. Files useful for developers can be found in `/dev_tools`, such as the `Rmd2py.py` script for the development of examples.
|
|
14
37
|
|
|
15
38
|
# Installation
|
|
16
39
|
|
|
@@ -19,6 +42,8 @@ xARPES installation can be divided into graphical package manager instructions,
|
|
|
19
42
|
- via conda-forge, out-of-the-box or editable installation, sourcing the [conda-forge package](https://anaconda.org/conda-forge/xarpes).
|
|
20
43
|
- via Pip, out-of-the-box or editable installation, sourcing the [PyPI package](https://pypi.org/project/xarpes).
|
|
21
44
|
|
|
45
|
+
We strongly recommend installing xARPES in a (conda/pip) virtual environment, and to activate the environment each time before activating xARPES.
|
|
46
|
+
|
|
22
47
|
## Graphical package manager installation
|
|
23
48
|
|
|
24
49
|
Most IDEs and scientific Python distributions include a GUI-based package manager.
|
|
@@ -61,11 +86,13 @@ Example for Linux:
|
|
|
61
86
|
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
|
62
87
|
bash Miniconda3-latest-Linux-x86_64.sh
|
|
63
88
|
|
|
64
|
-
Create and activate
|
|
89
|
+
Answer `y` to questions. Create and activate a new environment:
|
|
65
90
|
|
|
66
|
-
conda create -n <my_env> -c
|
|
91
|
+
conda create -n <my_env> -c conda-forge
|
|
67
92
|
conda activate <my_env>
|
|
68
93
|
|
|
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
|
+
|
|
69
96
|
### Installing xARPES
|
|
70
97
|
|
|
71
98
|
#### Option A — Out-of-the-box installation (from conda-forge)
|
|
@@ -95,8 +122,8 @@ Install venv if necessary:
|
|
|
95
122
|
|
|
96
123
|
Create and activate a virtual environment:
|
|
97
124
|
|
|
98
|
-
python3 -m venv <
|
|
99
|
-
source <
|
|
125
|
+
python3 -m venv <my_env>
|
|
126
|
+
source <my_env>/bin/activate
|
|
100
127
|
|
|
101
128
|
Upgrade pip:
|
|
102
129
|
|
|
@@ -125,6 +152,8 @@ After installation of xARPES, the `examples/` folder can be downloaded to the cu
|
|
|
125
152
|
|
|
126
153
|
python -c "import xarpes; xarpes.download_examples()"
|
|
127
154
|
|
|
155
|
+
This attempts to download the examples from the version corresponding encountered in `__init__.py`. If no corresponding tagged version can be downloaded, the code attempts to download the latest examples instead.
|
|
156
|
+
|
|
128
157
|
# Execution
|
|
129
158
|
|
|
130
159
|
It is recommended to use JupyterLab to analyse data. JupyterLab is launched using:
|
|
@@ -143,3 +172,4 @@ Copyright (C) 2025 xARPES Developers
|
|
|
143
172
|
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation.
|
|
144
173
|
|
|
145
174
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
175
|
+
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: xarpes
|
|
3
|
-
Version: 0.3.3
|
|
4
|
-
Summary: Extraction from angle resolved photoemission spectra
|
|
5
|
-
Author: xARPES Developers
|
|
6
|
-
Requires-Python: >=3.7.0
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Requires-Dist: igor2>=0.5.8
|
|
11
|
-
Requires-Dist: jupyterlab
|
|
12
|
-
Requires-Dist: jupytext
|
|
13
|
-
Requires-Dist: matplotlib
|
|
14
|
-
Requires-Dist: numpy
|
|
15
|
-
Requires-Dist: scipy
|
|
16
|
-
Requires-Dist: lmfit
|
|
17
|
-
Requires-Dist: pyqt5
|
|
18
|
-
Requires-Dist: ipympl
|
|
19
|
-
Requires-Dist: ipykernel<6.32.0
|
|
20
|
-
Project-URL: Documentation, https://xarpes.github.io
|
|
21
|
-
|
|
22
1
|
# xARPES
|
|
23
2
|
|
|
24
3
|

|
|
@@ -31,7 +10,7 @@ This project is currently undergoing **beta testing**. Some of the functionaliti
|
|
|
31
10
|
|
|
32
11
|
# Contributing
|
|
33
12
|
|
|
34
|
-
Contributions to the code are most welcome. xARPES is intended to co-develop alongside the increasing complexity of experimental ARPES data sets. Contributions can be made by forking the code and creating a pull request. Importing of file formats from different beamlines is particularly encouraged.
|
|
13
|
+
Contributions to the code are most welcome. xARPES is intended to co-develop alongside the increasing complexity of experimental ARPES data sets. Contributions can be made by forking the code and creating a pull request. Importing of file formats from different beamlines is particularly encouraged. Files useful for developers can be found in `/dev_tools`, such as the `Rmd2py.py` script for the development of examples.
|
|
35
14
|
|
|
36
15
|
# Installation
|
|
37
16
|
|
|
@@ -40,6 +19,8 @@ xARPES installation can be divided into graphical package manager instructions,
|
|
|
40
19
|
- via conda-forge, out-of-the-box or editable installation, sourcing the [conda-forge package](https://anaconda.org/conda-forge/xarpes).
|
|
41
20
|
- via Pip, out-of-the-box or editable installation, sourcing the [PyPI package](https://pypi.org/project/xarpes).
|
|
42
21
|
|
|
22
|
+
We strongly recommend installing xARPES in a (conda/pip) virtual environment, and to activate the environment each time before activating xARPES.
|
|
23
|
+
|
|
43
24
|
## Graphical package manager installation
|
|
44
25
|
|
|
45
26
|
Most IDEs and scientific Python distributions include a GUI-based package manager.
|
|
@@ -82,11 +63,13 @@ Example for Linux:
|
|
|
82
63
|
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
|
83
64
|
bash Miniconda3-latest-Linux-x86_64.sh
|
|
84
65
|
|
|
85
|
-
Create and activate
|
|
66
|
+
Answer `y` to questions. Create and activate a new environment:
|
|
86
67
|
|
|
87
|
-
conda create -n <my_env> -c
|
|
68
|
+
conda create -n <my_env> -c conda-forge
|
|
88
69
|
conda activate <my_env>
|
|
89
70
|
|
|
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
|
+
|
|
90
73
|
### Installing xARPES
|
|
91
74
|
|
|
92
75
|
#### Option A — Out-of-the-box installation (from conda-forge)
|
|
@@ -116,8 +99,8 @@ Install venv if necessary:
|
|
|
116
99
|
|
|
117
100
|
Create and activate a virtual environment:
|
|
118
101
|
|
|
119
|
-
python3 -m venv <
|
|
120
|
-
source <
|
|
102
|
+
python3 -m venv <my_env>
|
|
103
|
+
source <my_env>/bin/activate
|
|
121
104
|
|
|
122
105
|
Upgrade pip:
|
|
123
106
|
|
|
@@ -146,6 +129,8 @@ After installation of xARPES, the `examples/` folder can be downloaded to the cu
|
|
|
146
129
|
|
|
147
130
|
python -c "import xarpes; xarpes.download_examples()"
|
|
148
131
|
|
|
132
|
+
This attempts to download the examples from the version corresponding encountered in `__init__.py`. If no corresponding tagged version can be downloaded, the code attempts to download the latest examples instead.
|
|
133
|
+
|
|
149
134
|
# Execution
|
|
150
135
|
|
|
151
136
|
It is recommended to use JupyterLab to analyse data. JupyterLab is launched using:
|
|
@@ -164,4 +149,3 @@ Copyright (C) 2025 xARPES Developers
|
|
|
164
149
|
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation.
|
|
165
150
|
|
|
166
151
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
167
|
-
|
|
@@ -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}
|
|
@@ -48,8 +45,7 @@ data_file_path = os.path.join(script_dir, dfld, flnm + extn)
|
|
|
48
45
|
```{python}
|
|
49
46
|
# %matplotlib inline
|
|
50
47
|
|
|
51
|
-
fig = plt.figure(figsize=(8, 5))
|
|
52
|
-
ax = fig.gca()
|
|
48
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
53
49
|
|
|
54
50
|
bmap = xarpes.BandMap(data_file_path, energy_resolution=0.01,
|
|
55
51
|
angle_resolution=0.1, temperature=50)
|
|
@@ -64,13 +60,13 @@ fig = bmap.plot(abscissa='momentum', ordinate='kinetic_energy', ax=ax)
|
|
|
64
60
|
|
|
65
61
|
fig, ax = plt.subplots(2, 1, figsize=(6, 8))
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
bmap.correct_fermi_edge(
|
|
68
64
|
hnuminphi_guess=32, background_guess=1e2,
|
|
69
65
|
integrated_weight_guess=1e3, angle_min=-10, angle_max=10,
|
|
70
66
|
ekin_min=31.96, ekin_max=32.1, true_angle=0,
|
|
71
67
|
ax=ax[0], show=False, fig_close=False)
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
bmap.plot(ordinate='electron_energy', abscissa='momentum',
|
|
74
70
|
ax=ax[1], show=False, fig_close=False)
|
|
75
71
|
|
|
76
72
|
# Figure customization
|
|
@@ -124,9 +120,9 @@ fig = mdcs.visualize_guess(distributions=guess_dists, energy_value=energy_value,
|
|
|
124
120
|
```
|
|
125
121
|
|
|
126
122
|
#### Note on interactive figures
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
123
|
+
- The interactive figure might not work inside the Jupyter notebooks, despite our best efforts to ensure stability.
|
|
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.
|
|
130
126
|
|
|
131
127
|
```{python}
|
|
132
128
|
# %matplotlib widget
|
|
@@ -139,53 +135,29 @@ mdcs = xarpes.MDCs(*bmap.mdc_set(angle_min, angle_max, energy_range=energy_range
|
|
|
139
135
|
fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
140
136
|
```
|
|
141
137
|
|
|
142
|
-
```{python}
|
|
143
|
-
# # %matplotlib widget
|
|
144
|
-
|
|
145
|
-
# fig = plt.figure(figsize=(7, 5))
|
|
146
|
-
# ax = fig.gca()
|
|
147
|
-
|
|
148
|
-
# mdcs.plot(energy_range=[-0.15, -0.05], ax=ax)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
138
|
```{python}
|
|
152
139
|
# %matplotlib inline
|
|
153
140
|
|
|
154
|
-
|
|
155
|
-
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
```{python}
|
|
159
|
-
# %matplotlib inline
|
|
141
|
+
plt.rcParams['lines.markersize'] = 0.8
|
|
160
142
|
|
|
161
143
|
fig = plt.figure(figsize=(8, 5))
|
|
162
144
|
ax = fig.gca()
|
|
163
145
|
|
|
164
|
-
|
|
146
|
+
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Linear_test_1',
|
|
147
|
+
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
165
148
|
|
|
166
|
-
|
|
167
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
168
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
149
|
+
self_energies = xarpes.CreateSelfEnergies([self_energy])
|
|
169
150
|
|
|
170
|
-
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)
|
|
171
153
|
```
|
|
172
154
|
|
|
173
155
|
```{python}
|
|
174
156
|
# %matplotlib inline
|
|
175
157
|
|
|
176
|
-
fig = plt.figure(figsize=(7, 5))
|
|
177
|
-
ax = fig.gca()
|
|
178
|
-
|
|
179
|
-
from xarpes.constants import stdv
|
|
180
|
-
|
|
181
|
-
ax.errorbar(self_energy.enel_range, self_energy.imag,
|
|
182
|
-
yerr=stdv * self_energy.imag_sigma, label =r"$-\Sigma''(E)$")
|
|
183
|
-
ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
184
|
-
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'(E)$")
|
|
185
|
-
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()
|
|
186
159
|
|
|
187
|
-
|
|
188
|
-
plt.show()
|
|
160
|
+
fig = self_energy.plot_real(ax=ax)
|
|
189
161
|
```
|
|
190
162
|
|
|
191
163
|
```{python}
|
|
@@ -194,6 +166,8 @@ plt.show()
|
|
|
194
166
|
angle_min2 = -1e6
|
|
195
167
|
angle_max2 = 0
|
|
196
168
|
|
|
169
|
+
plt.rcParams['lines.markersize'] = 3.0
|
|
170
|
+
|
|
197
171
|
mdc2 = xarpes.MDCs(*bmap.mdc_set(angle_min2, angle_max2, energy_range=energy_range))
|
|
198
172
|
|
|
199
173
|
guess_dists2 = xarpes.CreateDistributions([
|
|
@@ -202,8 +176,7 @@ xarpes.SpectralLinear(amplitude=450, peak=-7.25, broadening=0.01,
|
|
|
202
176
|
name='Linear_left', index='1'),
|
|
203
177
|
])
|
|
204
178
|
|
|
205
|
-
fig = plt.figure(figsize=(8, 6))
|
|
206
|
-
ax = fig.gca()
|
|
179
|
+
fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
207
180
|
|
|
208
181
|
fig = mdc2.visualize_guess(distributions=guess_dists2, energy_value=0, ax=ax)
|
|
209
182
|
```
|
|
@@ -213,15 +186,55 @@ fig = mdc2.visualize_guess(distributions=guess_dists2, energy_value=0, ax=ax)
|
|
|
213
186
|
|
|
214
187
|
fig = mdc2.fit_selection(distributions=guess_dists2, show=False, fig_close=True)
|
|
215
188
|
|
|
216
|
-
self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_1'
|
|
189
|
+
self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_1',
|
|
190
|
+
fermi_velocity=-2.67, fermi_wavevector=-0.354))
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
```{python}
|
|
194
|
+
# %matplotlib inline
|
|
195
|
+
|
|
196
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
197
|
+
|
|
198
|
+
self_energies= xarpes.CreateSelfEnergies([
|
|
199
|
+
self_energy, self_left])
|
|
200
|
+
|
|
201
|
+
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy',
|
|
202
|
+
self_energies=self_energies, plot_dispersions='full',
|
|
203
|
+
ax=ax)
|
|
217
204
|
```
|
|
218
205
|
|
|
219
206
|
```{python}
|
|
207
|
+
# %matplotlib inline
|
|
208
|
+
fig = plt.figure(figsize=(9, 6)); ax = fig.gca()
|
|
209
|
+
|
|
210
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
211
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
212
|
+
|
|
213
|
+
ax.set_xlim([-0.275, 0.025])
|
|
214
|
+
ax.set_ylim([-0.025, 0.275])
|
|
220
215
|
|
|
216
|
+
plt.legend(); plt.show()
|
|
221
217
|
```
|
|
222
218
|
|
|
223
219
|
```{python}
|
|
220
|
+
# %matplotlib inline
|
|
221
|
+
fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
222
|
+
|
|
223
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
224
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
225
|
+
|
|
226
|
+
ax.set_xlim([-0.275, 0.025]); ax.set_ylim([-0.025, 0.275])
|
|
224
227
|
|
|
228
|
+
# Replace labels with custom labels
|
|
229
|
+
left_real, left_imag, right_real, right_imag = ax.get_lines()
|
|
230
|
+
|
|
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
|
+
]
|
|
235
|
+
|
|
236
|
+
ax.legend([left_real, left_imag, right_real, right_imag], labels)
|
|
237
|
+
plt.show()
|
|
225
238
|
```
|
|
226
239
|
|
|
227
240
|
```{python}
|
|
@@ -413,4 +426,6 @@ self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_
|
|
|
413
426
|
# ax = fig.gca()
|
|
414
427
|
|
|
415
428
|
# fig = mdcs.plot(distributions=guess_dists, ax=ax, energy_value=-0.003)
|
|
429
|
+
|
|
430
|
+
|
|
416
431
|
```
|
|
@@ -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
|
|
@@ -28,8 +26,7 @@ extn = '.ibw' # Extension of the file
|
|
|
28
26
|
data_file_path = os.path.join(script_dir, dfld, flnm + extn)
|
|
29
27
|
|
|
30
28
|
|
|
31
|
-
fig = plt.figure(figsize=(8, 5))
|
|
32
|
-
ax = fig.gca()
|
|
29
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
33
30
|
|
|
34
31
|
bmap = xarpes.BandMap(data_file_path, energy_resolution=0.01,
|
|
35
32
|
angle_resolution=0.1, temperature=50)
|
|
@@ -41,13 +38,13 @@ fig = bmap.plot(abscissa='momentum', ordinate='kinetic_energy', ax=ax)
|
|
|
41
38
|
|
|
42
39
|
fig, ax = plt.subplots(2, 1, figsize=(6, 8))
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
bmap.correct_fermi_edge(
|
|
45
42
|
hnuminphi_guess=32, background_guess=1e2,
|
|
46
43
|
integrated_weight_guess=1e3, angle_min=-10, angle_max=10,
|
|
47
44
|
ekin_min=31.96, ekin_max=32.1, true_angle=0,
|
|
48
45
|
ax=ax[0], show=False, fig_close=False)
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
bmap.plot(ordinate='electron_energy', abscissa='momentum',
|
|
51
48
|
ax=ax[1], show=False, fig_close=False)
|
|
52
49
|
|
|
53
50
|
# Figure customization
|
|
@@ -94,9 +91,9 @@ ax = fig.gca()
|
|
|
94
91
|
fig = mdcs.visualize_guess(distributions=guess_dists, energy_value=energy_value, ax=ax)
|
|
95
92
|
|
|
96
93
|
# #### Note on interactive figures
|
|
97
|
-
# -
|
|
98
|
-
# -
|
|
99
|
-
# -
|
|
94
|
+
# - The interactive figure might not work inside the Jupyter notebooks, despite our best efforts to ensure stability.
|
|
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.
|
|
100
97
|
|
|
101
98
|
|
|
102
99
|
fig = plt.figure(figsize=(7, 5))
|
|
@@ -107,46 +104,30 @@ mdcs = xarpes.MDCs(*bmap.mdc_set(angle_min, angle_max, energy_range=energy_range
|
|
|
107
104
|
fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
108
105
|
|
|
109
106
|
|
|
110
|
-
|
|
111
|
-
# ax = fig.gca()
|
|
112
|
-
|
|
113
|
-
# mdcs.plot(energy_range=[-0.15, -0.05], ax=ax)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Linear_test_1',
|
|
117
|
-
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
118
|
-
|
|
107
|
+
plt.rcParams['lines.markersize'] = 0.8
|
|
119
108
|
|
|
120
109
|
fig = plt.figure(figsize=(8, 5))
|
|
121
110
|
ax = fig.gca()
|
|
122
111
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
126
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
127
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
128
|
-
|
|
129
|
-
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))
|
|
130
114
|
|
|
115
|
+
self_energies = xarpes.CreateSelfEnergies([self_energy])
|
|
131
116
|
|
|
132
|
-
fig =
|
|
133
|
-
|
|
117
|
+
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax,
|
|
118
|
+
self_energies=self_energies)
|
|
134
119
|
|
|
135
|
-
from xarpes.constants import stdv
|
|
136
120
|
|
|
137
|
-
|
|
138
|
-
yerr=stdv * self_energy.imag_sigma, label =r"$-\Sigma''(E)$")
|
|
139
|
-
ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
140
|
-
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'(E)$")
|
|
141
|
-
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()
|
|
142
122
|
|
|
143
|
-
|
|
144
|
-
plt.show()
|
|
123
|
+
fig = self_energy.plot_real(ax=ax)
|
|
145
124
|
|
|
146
125
|
|
|
147
126
|
angle_min2 = -1e6
|
|
148
127
|
angle_max2 = 0
|
|
149
128
|
|
|
129
|
+
plt.rcParams['lines.markersize'] = 3.0
|
|
130
|
+
|
|
150
131
|
mdc2 = xarpes.MDCs(*bmap.mdc_set(angle_min2, angle_max2, energy_range=energy_range))
|
|
151
132
|
|
|
152
133
|
guess_dists2 = xarpes.CreateDistributions([
|
|
@@ -155,8 +136,7 @@ xarpes.SpectralLinear(amplitude=450, peak=-7.25, broadening=0.01,
|
|
|
155
136
|
name='Linear_left', index='1'),
|
|
156
137
|
])
|
|
157
138
|
|
|
158
|
-
fig = plt.figure(figsize=(8, 6))
|
|
159
|
-
ax = fig.gca()
|
|
139
|
+
fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
160
140
|
|
|
161
141
|
fig = mdc2.visualize_guess(distributions=guess_dists2, energy_value=0, ax=ax)
|
|
162
142
|
|
|
@@ -164,11 +144,46 @@ fig = mdc2.visualize_guess(distributions=guess_dists2, energy_value=0, ax=ax)
|
|
|
164
144
|
|
|
165
145
|
fig = mdc2.fit_selection(distributions=guess_dists2, show=False, fig_close=True)
|
|
166
146
|
|
|
167
|
-
self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_1'
|
|
147
|
+
self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_1',
|
|
148
|
+
fermi_velocity=-2.67, fermi_wavevector=-0.354))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
fig = plt.figure(figsize=(8, 5)); ax = fig.gca()
|
|
152
|
+
|
|
153
|
+
self_energies= xarpes.CreateSelfEnergies([
|
|
154
|
+
self_energy, self_left])
|
|
155
|
+
|
|
156
|
+
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy',
|
|
157
|
+
self_energies=self_energies, plot_dispersions='full',
|
|
158
|
+
ax=ax)
|
|
159
|
+
|
|
160
|
+
fig = plt.figure(figsize=(9, 6)); ax = fig.gca()
|
|
168
161
|
|
|
162
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
163
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
169
164
|
|
|
165
|
+
ax.set_xlim([-0.275, 0.025])
|
|
166
|
+
ax.set_ylim([-0.025, 0.275])
|
|
170
167
|
|
|
168
|
+
plt.legend(); plt.show()
|
|
171
169
|
|
|
170
|
+
fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
171
|
+
|
|
172
|
+
self_left.plot_both(ax=ax, show=False, fig_close=False)
|
|
173
|
+
self_energy.plot_both(ax=ax, show=False, fig_close=False)
|
|
174
|
+
|
|
175
|
+
ax.set_xlim([-0.275, 0.025]); ax.set_ylim([-0.025, 0.275])
|
|
176
|
+
|
|
177
|
+
# Replace labels with custom labels
|
|
178
|
+
left_real, left_imag, right_real, right_imag = ax.get_lines()
|
|
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
|
+
]
|
|
184
|
+
|
|
185
|
+
ax.legend([left_real, left_imag, right_real, right_imag], labels)
|
|
186
|
+
plt.show()
|
|
172
187
|
|
|
173
188
|
|
|
174
189
|
# fig = plt.figure(figsize=(8, 5))
|
|
@@ -329,3 +344,5 @@ self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_
|
|
|
329
344
|
# ax = fig.gca()
|
|
330
345
|
|
|
331
346
|
# fig = mdcs.plot(distributions=guess_dists, ax=ax, energy_value=-0.003)
|
|
347
|
+
|
|
348
|
+
|