xarpes 0.3.0__tar.gz → 0.3.2__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.0 → xarpes-0.3.2}/PKG-INFO +22 -14
- {xarpes-0.3.0 → xarpes-0.3.2}/README.md +20 -14
- {xarpes-0.3.0 → xarpes-0.3.2}/dev_tools/Rmd2py.py +6 -2
- {xarpes-0.3.0 → xarpes-0.3.2}/examples/graphene/graphene.Rmd +37 -25
- {xarpes-0.3.0 → xarpes-0.3.2}/examples/graphene/graphene.py +28 -15
- {xarpes-0.3.0 → xarpes-0.3.2}/examples/srtio3/srtio3.Rmd +15 -9
- {xarpes-0.3.0 → xarpes-0.3.2}/examples/srtio3/srtio3.py +11 -4
- {xarpes-0.3.0 → xarpes-0.3.2}/pyproject.toml +1 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/xarpes/__init__.py +2 -2
- {xarpes-0.3.0 → xarpes-0.3.2}/.gitignore +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/.readthedocs.yaml +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/LICENSE +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/Makefile +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/README.md +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/_static/xarpes_small.svg +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/conf.py +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/index.rst +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/modules/distributions.rst +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/modules/functions.rst +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/modules/plotting.rst +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/modules/spectral.rst +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/doc/requirements.txt +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/examples/graphene/data_sets/graphene_152.ibw +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/examples/srtio3/data_sets/STO_2_0010STO_2_.ibw +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/logo/Makefile +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/logo/exubi.svg +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/logo/xarpes.svg +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/xarpes/constants.py +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/xarpes/distributions.py +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/xarpes/functions.py +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/xarpes/plotting.py +0 -0
- {xarpes-0.3.0 → xarpes-0.3.2}/xarpes/spectral.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xarpes
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Extraction from angle resolved photoemission spectra
|
|
5
5
|
Author: xARPES Developers
|
|
6
6
|
Requires-Python: >=3.7.0
|
|
@@ -17,6 +17,7 @@ Requires-Dist: scipy
|
|
|
17
17
|
Requires-Dist: lmfit
|
|
18
18
|
Requires-Dist: pyqt5
|
|
19
19
|
Requires-Dist: ipympl
|
|
20
|
+
Requires-Dist: ipykernel<6.32.0
|
|
20
21
|
Project-URL: Documentation, https://xarpes.github.io
|
|
21
22
|
|
|
22
23
|
# xARPES
|
|
@@ -35,7 +36,7 @@ Contributions to the code are most welcome. xARPES is intended to co-develop alo
|
|
|
35
36
|
|
|
36
37
|
# Installation
|
|
37
38
|
|
|
38
|
-
xARPES can be
|
|
39
|
+
xARPES installation can be divided into graphical package manager instructions, and command-line instructions for either conda or pip. With command-line instructions, an editable installation of xARPES can be created; on Windows, we strongly recommend Windows Powershell to do so. Here is a summary for the three options:
|
|
39
40
|
- via a graphical package manager (Anaconda Navigator, VS Code, PyCharm, Spyder, JupyterLab)
|
|
40
41
|
- via conda-forge, out-of-the-box or editable installation, sourcing the [conda-forge package](https://anaconda.org/conda-forge/xarpes).
|
|
41
42
|
- via Pip, out-of-the-box or editable installation, sourcing the [PyPI package](https://pypi.org/project/xarpes).
|
|
@@ -89,14 +90,19 @@ Create and activate an environment:
|
|
|
89
90
|
|
|
90
91
|
### Installing xARPES
|
|
91
92
|
|
|
92
|
-
#### Option A —
|
|
93
|
+
#### Option A — Out-of-the-box installation (from conda-forge)
|
|
93
94
|
|
|
94
95
|
conda install conda-forge::xarpes
|
|
95
96
|
|
|
96
|
-
#### Option B —
|
|
97
|
+
#### Option B — Editable installation (GitHub)
|
|
98
|
+
|
|
99
|
+
First, clone the repository:
|
|
97
100
|
|
|
98
101
|
git clone git@github.com:xARPES/xARPES.git
|
|
99
|
-
cd xARPES
|
|
102
|
+
cd xARPES
|
|
103
|
+
|
|
104
|
+
Then perform editable installation (this mixes conda and pip):
|
|
105
|
+
|
|
100
106
|
pip install -e .
|
|
101
107
|
|
|
102
108
|
## Pip installation
|
|
@@ -120,25 +126,26 @@ Upgrade pip:
|
|
|
120
126
|
|
|
121
127
|
### Installing xARPES
|
|
122
128
|
|
|
123
|
-
#### Option A —
|
|
129
|
+
#### Option A — Out-of-the-box installation (PyPI)
|
|
124
130
|
|
|
125
131
|
python3 -m pip install xarpes
|
|
126
132
|
|
|
127
|
-
#### Option B —
|
|
133
|
+
#### Option B — Editable installation (GitHub)
|
|
134
|
+
|
|
135
|
+
First, clone the repository:
|
|
128
136
|
|
|
129
137
|
git clone git@github.com:xARPES/xARPES.git
|
|
130
|
-
cd xARPES
|
|
131
|
-
python3 -m pip install -e .
|
|
138
|
+
cd xARPES
|
|
132
139
|
|
|
133
|
-
|
|
140
|
+
Then perform editable installation:
|
|
134
141
|
|
|
135
|
-
|
|
142
|
+
pip install -e .
|
|
136
143
|
|
|
137
|
-
|
|
144
|
+
# Examples
|
|
138
145
|
|
|
139
|
-
|
|
146
|
+
After installation of xARPES, the `examples/` folder can be downloaded to the current directory:
|
|
140
147
|
|
|
141
|
-
|
|
148
|
+
python -c "import xarpes; xarpes.download_examples()"
|
|
142
149
|
|
|
143
150
|
# Execution
|
|
144
151
|
|
|
@@ -158,3 +165,4 @@ Copyright (C) 2025 xARPES Developers
|
|
|
158
165
|
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.
|
|
159
166
|
|
|
160
167
|
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.
|
|
168
|
+
|
|
@@ -14,7 +14,7 @@ Contributions to the code are most welcome. xARPES is intended to co-develop alo
|
|
|
14
14
|
|
|
15
15
|
# Installation
|
|
16
16
|
|
|
17
|
-
xARPES can be
|
|
17
|
+
xARPES installation can be divided into graphical package manager instructions, and command-line instructions for either conda or pip. With command-line instructions, an editable installation of xARPES can be created; on Windows, we strongly recommend Windows Powershell to do so. Here is a summary for the three options:
|
|
18
18
|
- via a graphical package manager (Anaconda Navigator, VS Code, PyCharm, Spyder, JupyterLab)
|
|
19
19
|
- via conda-forge, out-of-the-box or editable installation, sourcing the [conda-forge package](https://anaconda.org/conda-forge/xarpes).
|
|
20
20
|
- via Pip, out-of-the-box or editable installation, sourcing the [PyPI package](https://pypi.org/project/xarpes).
|
|
@@ -68,14 +68,19 @@ Create and activate an environment:
|
|
|
68
68
|
|
|
69
69
|
### Installing xARPES
|
|
70
70
|
|
|
71
|
-
#### Option A —
|
|
71
|
+
#### Option A — Out-of-the-box installation (from conda-forge)
|
|
72
72
|
|
|
73
73
|
conda install conda-forge::xarpes
|
|
74
74
|
|
|
75
|
-
#### Option B —
|
|
75
|
+
#### Option B — Editable installation (GitHub)
|
|
76
|
+
|
|
77
|
+
First, clone the repository:
|
|
76
78
|
|
|
77
79
|
git clone git@github.com:xARPES/xARPES.git
|
|
78
|
-
cd xARPES
|
|
80
|
+
cd xARPES
|
|
81
|
+
|
|
82
|
+
Then perform editable installation (this mixes conda and pip):
|
|
83
|
+
|
|
79
84
|
pip install -e .
|
|
80
85
|
|
|
81
86
|
## Pip installation
|
|
@@ -99,25 +104,26 @@ Upgrade pip:
|
|
|
99
104
|
|
|
100
105
|
### Installing xARPES
|
|
101
106
|
|
|
102
|
-
#### Option A —
|
|
107
|
+
#### Option A — Out-of-the-box installation (PyPI)
|
|
103
108
|
|
|
104
109
|
python3 -m pip install xarpes
|
|
105
110
|
|
|
106
|
-
#### Option B —
|
|
111
|
+
#### Option B — Editable installation (GitHub)
|
|
112
|
+
|
|
113
|
+
First, clone the repository:
|
|
107
114
|
|
|
108
115
|
git clone git@github.com:xARPES/xARPES.git
|
|
109
|
-
cd xARPES
|
|
110
|
-
python3 -m pip install -e .
|
|
116
|
+
cd xARPES
|
|
111
117
|
|
|
112
|
-
|
|
118
|
+
Then perform editable installation:
|
|
113
119
|
|
|
114
|
-
|
|
120
|
+
pip install -e .
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
# Examples
|
|
117
123
|
|
|
118
|
-
|
|
124
|
+
After installation of xARPES, the `examples/` folder can be downloaded to the current directory:
|
|
119
125
|
|
|
120
|
-
|
|
126
|
+
python -c "import xarpes; xarpes.download_examples()"
|
|
121
127
|
|
|
122
128
|
# Execution
|
|
123
129
|
|
|
@@ -136,4 +142,4 @@ Copyright (C) 2025 xARPES Developers
|
|
|
136
142
|
|
|
137
143
|
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.
|
|
138
144
|
|
|
139
|
-
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.
|
|
145
|
+
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.
|
|
@@ -88,8 +88,11 @@ def convert_rmd_to_py(rmd_path: str) -> None:
|
|
|
88
88
|
if "%matplotlib widget" in line or "%matplotlib inline" in line:
|
|
89
89
|
continue
|
|
90
90
|
|
|
91
|
+
# Remove global Jupyter hooks (e.g. get_ipython().events.register(...))
|
|
92
|
+
if "get_ipython" in line:
|
|
93
|
+
continue
|
|
94
|
+
|
|
91
95
|
# Replace first Jupyter magic comment with Qt5Agg backend
|
|
92
|
-
# (lines like "# %load_ext ..." often end up as "#%..." after export)
|
|
93
96
|
if line.replace(" ", "").startswith("#%"):
|
|
94
97
|
if first_magic_comment:
|
|
95
98
|
text.write("import matplotlib as mpl\n")
|
|
@@ -99,6 +102,7 @@ def convert_rmd_to_py(rmd_path: str) -> None:
|
|
|
99
102
|
|
|
100
103
|
# Otherwise, write code verbatim
|
|
101
104
|
text.write(line)
|
|
105
|
+
|
|
102
106
|
else:
|
|
103
107
|
# ---- Outside code fence: Markdown -> Python comments ---------------
|
|
104
108
|
if line.strip() == "":
|
|
@@ -146,4 +150,4 @@ def main() -> None:
|
|
|
146
150
|
convert_rmd_to_py(rmd)
|
|
147
151
|
|
|
148
152
|
if __name__ == "__main__":
|
|
149
|
-
main()
|
|
153
|
+
main()
|
|
@@ -8,7 +8,7 @@ jupyter:
|
|
|
8
8
|
format_version: '1.2'
|
|
9
9
|
jupytext_version: 1.15.2
|
|
10
10
|
kernelspec:
|
|
11
|
-
display_name:
|
|
11
|
+
display_name: 3.7_env
|
|
12
12
|
language: python
|
|
13
13
|
name: python3
|
|
14
14
|
---
|
|
@@ -23,11 +23,16 @@ jupyter:
|
|
|
23
23
|
# %load_ext autoreload
|
|
24
24
|
# %autoreload 2
|
|
25
25
|
|
|
26
|
+
# Necessary packages
|
|
26
27
|
import xarpes
|
|
27
28
|
import matplotlib.pyplot as plt
|
|
28
29
|
import os
|
|
29
30
|
|
|
31
|
+
# Default plot configuration from xarpes.plotting.py
|
|
30
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'))
|
|
31
36
|
```
|
|
32
37
|
|
|
33
38
|
```{python}
|
|
@@ -118,6 +123,11 @@ ax = fig.gca()
|
|
|
118
123
|
fig = mdcs.visualize_guess(distributions=guess_dists, energy_value=energy_value, ax=ax)
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
#### Note on interactive figures
|
|
127
|
+
- Operability of the interactive figure is sensitive to configuration of the plotting backend.
|
|
128
|
+
- With Python V>=3.13 in a conda environment, the figure may fail to show up more than once. In that case, the user could try to run "conda env config vars unset MPLBACKEND" inside the conda environment; in Python, this command can be preceded with an exclamation mark ("!conda env ...") such that the command is executed in the terminal. The reset should work after restarting the conda environment.
|
|
129
|
+
- As a fallback, the user may switch "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
130
|
+
|
|
121
131
|
```{python}
|
|
122
132
|
# %matplotlib widget
|
|
123
133
|
|
|
@@ -129,6 +139,15 @@ mdcs = xarpes.MDCs(*bmap.mdc_set(angle_min, angle_max, energy_range=energy_range
|
|
|
129
139
|
fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
130
140
|
```
|
|
131
141
|
|
|
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
|
+
|
|
132
151
|
```{python}
|
|
133
152
|
# %matplotlib inline
|
|
134
153
|
|
|
@@ -152,6 +171,8 @@ fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
|
152
171
|
```
|
|
153
172
|
|
|
154
173
|
```{python}
|
|
174
|
+
# %matplotlib inline
|
|
175
|
+
|
|
155
176
|
fig = plt.figure(figsize=(7, 5))
|
|
156
177
|
ax = fig.gca()
|
|
157
178
|
|
|
@@ -163,7 +184,8 @@ ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
|
163
184
|
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'(E)$")
|
|
164
185
|
ax.set_xlabel(r'$E-\mu$ (eV)'); ax.set_ylabel(r"$\Sigma'(E), -\Sigma''(E)$ (eV)")
|
|
165
186
|
|
|
166
|
-
plt.legend()
|
|
187
|
+
plt.legend()
|
|
188
|
+
plt.show()
|
|
167
189
|
```
|
|
168
190
|
|
|
169
191
|
```{python}
|
|
@@ -195,22 +217,7 @@ self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_
|
|
|
195
217
|
```
|
|
196
218
|
|
|
197
219
|
```{python}
|
|
198
|
-
# %matplotlib inline
|
|
199
|
-
|
|
200
|
-
fig = plt.figure(figsize=(8, 5))
|
|
201
|
-
ax = fig.gca()
|
|
202
220
|
|
|
203
|
-
from xarpes.constants import stdv
|
|
204
|
-
|
|
205
|
-
ax.errorbar(self_left.peak_positions, self_left.enel_range,
|
|
206
|
-
xerr=stdv * self_left.peak_positions_sigma,
|
|
207
|
-
markersize=2, color='tab:red', label=self_left.label)
|
|
208
|
-
|
|
209
|
-
ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
210
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
211
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
212
|
-
|
|
213
|
-
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
214
221
|
```
|
|
215
222
|
|
|
216
223
|
```{python}
|
|
@@ -218,11 +225,22 @@ fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
|
218
225
|
```
|
|
219
226
|
|
|
220
227
|
```{python}
|
|
228
|
+
# # %matplotlib inline
|
|
221
229
|
|
|
222
|
-
|
|
230
|
+
# fig = plt.figure(figsize=(8, 5))
|
|
231
|
+
# ax = fig.gca()
|
|
223
232
|
|
|
224
|
-
|
|
233
|
+
# from xarpes.constants import stdv
|
|
225
234
|
|
|
235
|
+
# ax.errorbar(self_left.peak_positions, self_left.enel_range,
|
|
236
|
+
# xerr=stdv * self_left.peak_positions_sigma,
|
|
237
|
+
# markersize=2, color='tab:red', label=self_left.label)
|
|
238
|
+
|
|
239
|
+
# ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
240
|
+
# xerr=stdv * self_energy.peak_positions_sigma,
|
|
241
|
+
# markersize=2, color='tab:blue', label=self_energy.label)
|
|
242
|
+
|
|
243
|
+
# fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
226
244
|
```
|
|
227
245
|
|
|
228
246
|
```{python}
|
|
@@ -288,8 +306,6 @@ fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
|
288
306
|
```
|
|
289
307
|
|
|
290
308
|
```{python}
|
|
291
|
-
|
|
292
|
-
|
|
293
309
|
# # %matplotlib inline
|
|
294
310
|
|
|
295
311
|
# fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
@@ -398,7 +414,3 @@ fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
|
398
414
|
|
|
399
415
|
# fig = mdcs.plot(distributions=guess_dists, ax=ax, energy_value=-0.003)
|
|
400
416
|
```
|
|
401
|
-
|
|
402
|
-
```{python}
|
|
403
|
-
|
|
404
|
-
```
|
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
import matplotlib as mpl
|
|
10
10
|
mpl.use('Qt5Agg')
|
|
11
11
|
|
|
12
|
+
# Necessary packages
|
|
12
13
|
import xarpes
|
|
13
14
|
import matplotlib.pyplot as plt
|
|
14
15
|
import os
|
|
15
16
|
|
|
17
|
+
# Default plot configuration from xarpes.plotting.py
|
|
16
18
|
xarpes.plot_settings('default')
|
|
17
19
|
|
|
20
|
+
# If needed, close figures before running other cells, if figures show up in the wrong places.
|
|
21
|
+
|
|
18
22
|
script_dir = xarpes.set_script_dir()
|
|
19
23
|
|
|
20
24
|
dfld = 'data_sets' # Folder containing the data
|
|
@@ -89,6 +93,11 @@ ax = fig.gca()
|
|
|
89
93
|
|
|
90
94
|
fig = mdcs.visualize_guess(distributions=guess_dists, energy_value=energy_value, ax=ax)
|
|
91
95
|
|
|
96
|
+
# #### Note on interactive figures
|
|
97
|
+
# - Operability of the interactive figure is sensitive to configuration of the plotting backend.
|
|
98
|
+
# - With Python V>=3.13 in a conda environment, the figure may fail to show up more than once. In that case, the user could try to run "conda env config vars unset MPLBACKEND" inside the conda environment; in Python, this command can be preceded with an exclamation mark ("!conda env ...") such that the command is executed in the terminal. The reset should work after restarting the conda environment.
|
|
99
|
+
# - As a fallback, the user may switch "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
100
|
+
|
|
92
101
|
|
|
93
102
|
fig = plt.figure(figsize=(7, 5))
|
|
94
103
|
ax = fig.gca()
|
|
@@ -98,6 +107,12 @@ mdcs = xarpes.MDCs(*bmap.mdc_set(angle_min, angle_max, energy_range=energy_range
|
|
|
98
107
|
fig = mdcs.fit_selection(distributions=guess_dists, ax=ax)
|
|
99
108
|
|
|
100
109
|
|
|
110
|
+
# fig = plt.figure(figsize=(7, 5))
|
|
111
|
+
# ax = fig.gca()
|
|
112
|
+
|
|
113
|
+
# mdcs.plot(energy_range=[-0.15, -0.05], ax=ax)
|
|
114
|
+
|
|
115
|
+
|
|
101
116
|
self_energy = xarpes.SelfEnergy(*mdcs.expose_parameters(select_label='Linear_test_1',
|
|
102
117
|
fermi_velocity=2.85, fermi_wavevector=0.358))
|
|
103
118
|
|
|
@@ -113,6 +128,7 @@ ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
|
113
128
|
|
|
114
129
|
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
115
130
|
|
|
131
|
+
|
|
116
132
|
fig = plt.figure(figsize=(7, 5))
|
|
117
133
|
ax = fig.gca()
|
|
118
134
|
|
|
@@ -124,7 +140,8 @@ ax.errorbar(self_energy.enel_range, self_energy.real,
|
|
|
124
140
|
yerr=stdv * self_energy.real_sigma, label =r"$\Sigma'(E)$")
|
|
125
141
|
ax.set_xlabel(r'$E-\mu$ (eV)'); ax.set_ylabel(r"$\Sigma'(E), -\Sigma''(E)$ (eV)")
|
|
126
142
|
|
|
127
|
-
plt.legend()
|
|
143
|
+
plt.legend()
|
|
144
|
+
plt.show()
|
|
128
145
|
|
|
129
146
|
|
|
130
147
|
angle_min2 = -1e6
|
|
@@ -150,26 +167,24 @@ fig = mdc2.fit_selection(distributions=guess_dists2, show=False, fig_close=True)
|
|
|
150
167
|
self_left = xarpes.SelfEnergy(*mdc2.expose_parameters(select_label='Linear_left_1'))
|
|
151
168
|
|
|
152
169
|
|
|
153
|
-
fig = plt.figure(figsize=(8, 5))
|
|
154
|
-
ax = fig.gca()
|
|
155
170
|
|
|
156
|
-
from xarpes.constants import stdv
|
|
157
171
|
|
|
158
|
-
ax.errorbar(self_left.peak_positions, self_left.enel_range,
|
|
159
|
-
xerr=stdv * self_left.peak_positions_sigma,
|
|
160
|
-
markersize=2, color='tab:red', label=self_left.label)
|
|
161
|
-
|
|
162
|
-
ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
163
|
-
xerr=stdv * self_energy.peak_positions_sigma,
|
|
164
|
-
markersize=2, color='tab:blue', label=self_energy.label)
|
|
165
|
-
|
|
166
|
-
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
167
172
|
|
|
168
173
|
|
|
174
|
+
# fig = plt.figure(figsize=(8, 5))
|
|
175
|
+
# ax = fig.gca()
|
|
169
176
|
|
|
177
|
+
# from xarpes.constants import stdv
|
|
170
178
|
|
|
179
|
+
# ax.errorbar(self_left.peak_positions, self_left.enel_range,
|
|
180
|
+
# xerr=stdv * self_left.peak_positions_sigma,
|
|
181
|
+
# markersize=2, color='tab:red', label=self_left.label)
|
|
171
182
|
|
|
183
|
+
# ax.errorbar(self_energy.peak_positions, self_energy.enel_range,
|
|
184
|
+
# xerr=stdv * self_energy.peak_positions_sigma,
|
|
185
|
+
# markersize=2, color='tab:blue', label=self_energy.label)
|
|
172
186
|
|
|
187
|
+
# fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
173
188
|
|
|
174
189
|
|
|
175
190
|
# fig = plt.figure(figsize=(8, 5))
|
|
@@ -223,8 +238,6 @@ fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax)
|
|
|
223
238
|
# distributions=guess_dists, ax=ax, show=True)
|
|
224
239
|
|
|
225
240
|
|
|
226
|
-
|
|
227
|
-
|
|
228
241
|
# fig = plt.figure(figsize=(8, 6)); ax = fig.gca()
|
|
229
242
|
|
|
230
243
|
# guess_dists = xarpes.CreateDistributions([
|
|
@@ -7,7 +7,7 @@ jupyter:
|
|
|
7
7
|
format_version: '1.2'
|
|
8
8
|
jupytext_version: 1.15.2
|
|
9
9
|
kernelspec:
|
|
10
|
-
display_name:
|
|
10
|
+
display_name: 3.7_env
|
|
11
11
|
language: python
|
|
12
12
|
name: python3
|
|
13
13
|
---
|
|
@@ -20,11 +20,16 @@ jupyter:
|
|
|
20
20
|
# %load_ext autoreload
|
|
21
21
|
# %autoreload 2
|
|
22
22
|
|
|
23
|
+
# Necessary packages
|
|
23
24
|
import xarpes
|
|
24
25
|
import matplotlib.pyplot as plt
|
|
25
26
|
import os
|
|
26
27
|
|
|
28
|
+
# Default plot configuration from xarpes.plotting.py
|
|
27
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'))
|
|
28
33
|
```
|
|
29
34
|
|
|
30
35
|
```{python}
|
|
@@ -98,6 +103,11 @@ fig = mdcs.visualize_guess(distributions=guess_dists, matrix_element=mat_el,
|
|
|
98
103
|
matrix_args=mat_args, energy_value=-0.000, ax=ax)
|
|
99
104
|
```
|
|
100
105
|
|
|
106
|
+
#### Note on interactive figures
|
|
107
|
+
- Operability of the interactive figure is sensitive to configuration of the plotting backend.
|
|
108
|
+
- With Python V>=3.13 in a conda environment, the figure may fail to show up more than once. In that case, the user could try to run "conda env config vars unset MPLBACKEND" inside the conda environment; in Python, this command can be preceded with an exclamation mark ("!conda env ...") such that the command is executed in the terminal. The reset should work after restarting the conda environment.
|
|
109
|
+
- As a fallback, the user may switch "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
110
|
+
|
|
101
111
|
```{python}
|
|
102
112
|
# %matplotlib widget
|
|
103
113
|
|
|
@@ -140,14 +150,6 @@ ax = fig.gca()
|
|
|
140
150
|
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', self_energies=self_energies, ax=ax)
|
|
141
151
|
```
|
|
142
152
|
|
|
143
|
-
```{python}
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
```{python}
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
153
|
```{python}
|
|
152
154
|
fig = plt.figure(figsize=(7, 5))
|
|
153
155
|
ax = fig.gca()
|
|
@@ -584,3 +586,7 @@ plt.show()
|
|
|
584
586
|
|
|
585
587
|
# plt.show()
|
|
586
588
|
```
|
|
589
|
+
|
|
590
|
+
```{python}
|
|
591
|
+
|
|
592
|
+
```
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
import matplotlib as mpl
|
|
8
8
|
mpl.use('Qt5Agg')
|
|
9
9
|
|
|
10
|
+
# Necessary packages
|
|
10
11
|
import xarpes
|
|
11
12
|
import matplotlib.pyplot as plt
|
|
12
13
|
import os
|
|
13
14
|
|
|
15
|
+
# Default plot configuration from xarpes.plotting.py
|
|
14
16
|
xarpes.plot_settings('default')
|
|
15
17
|
|
|
18
|
+
# If needed, close figures before running other cells, if figures show up in the wrong places.
|
|
19
|
+
|
|
16
20
|
script_dir = xarpes.set_script_dir()
|
|
17
21
|
|
|
18
22
|
dfld = 'data_sets' # Folder containing the data
|
|
@@ -73,6 +77,11 @@ ax = fig.gca()
|
|
|
73
77
|
fig = mdcs.visualize_guess(distributions=guess_dists, matrix_element=mat_el,
|
|
74
78
|
matrix_args=mat_args, energy_value=-0.000, ax=ax)
|
|
75
79
|
|
|
80
|
+
# #### Note on interactive figures
|
|
81
|
+
# - Operability of the interactive figure is sensitive to configuration of the plotting backend.
|
|
82
|
+
# - With Python V>=3.13 in a conda environment, the figure may fail to show up more than once. In that case, the user could try to run "conda env config vars unset MPLBACKEND" inside the conda environment; in Python, this command can be preceded with an exclamation mark ("!conda env ...") such that the command is executed in the terminal. The reset should work after restarting the conda environment.
|
|
83
|
+
# - As a fallback, the user may switch "%matplotlib widget" to "%matplotlib qt", after which the figure should pop up in an external window.
|
|
84
|
+
|
|
76
85
|
|
|
77
86
|
fig = plt.figure(figsize=(7, 5))
|
|
78
87
|
ax = fig.gca()
|
|
@@ -105,10 +114,6 @@ ax = fig.gca()
|
|
|
105
114
|
|
|
106
115
|
fig = bmap.plot(abscissa='momentum', ordinate='electron_energy', self_energies=self_energies, ax=ax)
|
|
107
116
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
117
|
fig = plt.figure(figsize=(7, 5))
|
|
113
118
|
ax = fig.gca()
|
|
114
119
|
|
|
@@ -475,3 +480,5 @@ plt.show()
|
|
|
475
480
|
# bmap.plot(abscissa='momentum', ordinate='electron_energy', ax=ax, zorder=0.5)
|
|
476
481
|
|
|
477
482
|
# plt.show()
|
|
483
|
+
|
|
484
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|