xarpes 0.3.4__py3-none-any.whl → 0.5.0__py3-none-any.whl
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/__init__.py +35 -5
- xarpes/bandmap.py +829 -0
- xarpes/constants.py +9 -8
- xarpes/distributions.py +45 -43
- xarpes/functions.py +18 -6
- xarpes/mdcs.py +1035 -0
- xarpes/plotting.py +1 -17
- xarpes/selfenergies.py +621 -0
- xarpes/settings_parameters.py +30 -0
- xarpes/settings_plots.py +54 -0
- {xarpes-0.3.4.dist-info → xarpes-0.5.0.dist-info}/METADATA +7 -6
- xarpes-0.5.0.dist-info/RECORD +15 -0
- {xarpes-0.3.4.dist-info → xarpes-0.5.0.dist-info}/WHEEL +1 -1
- xarpes/spectral.py +0 -2175
- xarpes-0.3.4.dist-info/RECORD +0 -11
- {xarpes-0.3.4.dist-info/licenses → xarpes-0.5.0.dist-info}/LICENSE +0 -0
- {xarpes-0.3.4.dist-info → xarpes-0.5.0.dist-info}/entry_points.txt +0 -0
xarpes/settings_plots.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Copyright (C) 2025 xARPES Developers
|
|
2
|
+
# This program is free software under the terms of the GNU GPLv3 license.
|
|
3
|
+
|
|
4
|
+
"""Plotting and notebook behaviour settings for xARPES."""
|
|
5
|
+
|
|
6
|
+
import matplotlib.pyplot as plt
|
|
7
|
+
|
|
8
|
+
def plot_settings(name="default", register_pre_run=True):
|
|
9
|
+
"""Configure default plotting style for xARPES.
|
|
10
|
+
|
|
11
|
+
Parameters
|
|
12
|
+
----------
|
|
13
|
+
name : {"default", "large"}
|
|
14
|
+
Select a predefined style.
|
|
15
|
+
register_pre_run : bool
|
|
16
|
+
If True, register a Jupyter pre-run hook that closes figures.
|
|
17
|
+
"""
|
|
18
|
+
import matplotlib as mpl
|
|
19
|
+
|
|
20
|
+
mpl.rc("xtick", labelsize=10, direction="in")
|
|
21
|
+
mpl.rc("ytick", labelsize=10, direction="in")
|
|
22
|
+
plt.rcParams["legend.frameon"] = False
|
|
23
|
+
lw = dict(default=2.0, large=4.0)[name]
|
|
24
|
+
|
|
25
|
+
mpl.rcParams.update({
|
|
26
|
+
"lines.linewidth": lw,
|
|
27
|
+
"lines.markersize": 3,
|
|
28
|
+
"xtick.major.size": 4,
|
|
29
|
+
"xtick.minor.size": 2,
|
|
30
|
+
"xtick.major.width": 0.8,
|
|
31
|
+
"font.size": 16,
|
|
32
|
+
"axes.ymargin": 0.15,
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
if register_pre_run:
|
|
36
|
+
_maybe_register_pre_run_close_all()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _maybe_register_pre_run_close_all():
|
|
40
|
+
"""Register a pre_run_cell hook once, and only inside Jupyter."""
|
|
41
|
+
from IPython import get_ipython
|
|
42
|
+
|
|
43
|
+
if getattr(_maybe_register_pre_run_close_all, "_registered", False):
|
|
44
|
+
return
|
|
45
|
+
|
|
46
|
+
ip = get_ipython()
|
|
47
|
+
if ip is None or ip.__class__.__name__ != "ZMQInteractiveShell":
|
|
48
|
+
return
|
|
49
|
+
|
|
50
|
+
def _close_all(_info):
|
|
51
|
+
plt.close("all")
|
|
52
|
+
|
|
53
|
+
ip.events.register("pre_run_cell", _close_all)
|
|
54
|
+
_maybe_register_pre_run_close_all._registered = True
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: xarpes
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Extraction from angle resolved photoemission spectra
|
|
5
5
|
Author: xARPES Developers
|
|
6
6
|
Requires-Python: >=3.7.0
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
License-File: LICENSE
|
|
11
10
|
Requires-Dist: igor2>=0.5.8
|
|
12
11
|
Requires-Dist: jupyterlab
|
|
13
12
|
Requires-Dist: jupytext
|
|
@@ -33,7 +32,9 @@ This project is currently undergoing **beta testing**. Some of the functionaliti
|
|
|
33
32
|
|
|
34
33
|
# Contributing
|
|
35
34
|
|
|
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.
|
|
35
|
+
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. For development of the examples, the following scripts in `/dev_tools` could be useful:
|
|
36
|
+
- The `Rmd2ipynb.py` file, to generate the `.ipynb` from which the examples can conveniently be developed; to be executed after cloning/pulling updated `.Rmd` and `.py` files, or if you prefer developing with `.Rmd` files.
|
|
37
|
+
- The `ipynb2Rmd2py.py` file, to synchronise the `.Rmd` and `.py` files from the `.ipynb` file; to be executed right before pushing modifications to the repository. Note that this script resets some metadata in the `.Rmd` to prevent the tracking of their changes due to local virtual environments, etc.
|
|
37
38
|
|
|
38
39
|
# Installation
|
|
39
40
|
|
|
@@ -88,10 +89,10 @@ Example for Linux:
|
|
|
88
89
|
|
|
89
90
|
Answer `y` to questions. Create and activate a new environment:
|
|
90
91
|
|
|
91
|
-
conda create -n <my_env> -c
|
|
92
|
+
conda create -n <my_env> -c conda-forge
|
|
92
93
|
conda activate <my_env>
|
|
93
94
|
|
|
94
|
-
Where `<my_env>` must be replaced by your desired name.
|
|
95
|
+
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
96
|
|
|
96
97
|
### Installing xARPES
|
|
97
98
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
xarpes/__init__.py,sha256=ZcX2N--vv1R2afnf7UkFZ-ScTCbnyktDs7-MU9D0aaM,756
|
|
2
|
+
xarpes/bandmap.py,sha256=izeL19ohznmBsphaf7LFsIf9lQzbKA7p48gC3b9sedM,31920
|
|
3
|
+
xarpes/constants.py,sha256=XOdgSzyrmHr5xocHZfmcFHHoVAa1G05a305hm3XOTtY,504
|
|
4
|
+
xarpes/distributions.py,sha256=pC8V5MlZDNFdooMonFREEASiN5QodHiyKc2ehnxMKvQ,23498
|
|
5
|
+
xarpes/functions.py,sha256=KEgRs0_OFzyf40M6Tg7bwWOdjjeJX_K9lSDkGKhhS-4,14566
|
|
6
|
+
xarpes/mdcs.py,sha256=Df1Yd3B3rfu6nL1KcnReAwRuxB5ag8wmhyR8gICQZtQ,41097
|
|
7
|
+
xarpes/plotting.py,sha256=lGCReHcXhYLQXR5ns3EHFjCQjJ9Sc-HifV7n4BnWby4,5189
|
|
8
|
+
xarpes/selfenergies.py,sha256=9rGECk7lX64--aAd_-5gvLA4lhD2bRTVHY03PVkd3Xs,21568
|
|
9
|
+
xarpes/settings_parameters.py,sha256=P2_uZC4VUUIzrTVwjqbeSHWtEssRXjUQZbTmfX3ROis,923
|
|
10
|
+
xarpes/settings_plots.py,sha256=X-qteB2fIbBKOAcLMvMYDfQ8QdlUeA5xYQqF_Nyb4uA,1562
|
|
11
|
+
xarpes-0.5.0.dist-info/entry_points.txt,sha256=917UR-cqFTMMI_vMqIbk7boYSuFX_zHwQlXKcj9vlCE,79
|
|
12
|
+
xarpes-0.5.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
13
|
+
xarpes-0.5.0.dist-info/WHEEL,sha256=jPMR_Dzkc4X4icQtmz81lnNY_kAsfog7ry7qoRvYLXw,81
|
|
14
|
+
xarpes-0.5.0.dist-info/METADATA,sha256=4HY_kT0eFmWmTJrHaM-duP_Ih3P2eT6DomcBj_ZFEv8,6996
|
|
15
|
+
xarpes-0.5.0.dist-info/RECORD,,
|