arpest 1.0.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.
- arpest-1.0.0/PKG-INFO +142 -0
- arpest-1.0.0/README.md +132 -0
- arpest-1.0.0/arpest/__init__.py +0 -0
- arpest-1.0.0/arpest/app.py +79 -0
- arpest-1.0.0/arpest/core/__init__.py +0 -0
- arpest-1.0.0/arpest/core/loaders/__init__.py +11 -0
- arpest-1.0.0/arpest/core/loaders/base.py +84 -0
- arpest-1.0.0/arpest/core/loaders/bloch.py +518 -0
- arpest-1.0.0/arpest/core/loaders/i05.py +553 -0
- arpest-1.0.0/arpest/models/__init__.py +12 -0
- arpest-1.0.0/arpest/models/dataset.py +336 -0
- arpest-1.0.0/arpest/models/file_stack.py +173 -0
- arpest-1.0.0/arpest/operations/__init__.py +5 -0
- arpest-1.0.0/arpest/operations/basic.py +125 -0
- arpest-1.0.0/arpest/operations/fermi.py +188 -0
- arpest-1.0.0/arpest/operations/k_space.py +326 -0
- arpest-1.0.0/arpest/ui/__init__.py +0 -0
- arpest-1.0.0/arpest/ui/dialogs/__init__.py +0 -0
- arpest-1.0.0/arpest/ui/dialogs/settings.py +133 -0
- arpest-1.0.0/arpest/ui/main_window.py +1269 -0
- arpest-1.0.0/arpest/ui/widgets/__init__.py +0 -0
- arpest-1.0.0/arpest/ui/widgets/file_catalog.py +104 -0
- arpest-1.0.0/arpest/ui/widgets/operations/__init__.py +5 -0
- arpest-1.0.0/arpest/ui/widgets/operations/base.py +70 -0
- arpest-1.0.0/arpest/ui/widgets/operations/basic.py +253 -0
- arpest-1.0.0/arpest/ui/widgets/operations/fermi_level.py +162 -0
- arpest-1.0.0/arpest/ui/widgets/operations/k_space.py +209 -0
- arpest-1.0.0/arpest/ui/widgets/operations/registry.py +22 -0
- arpest-1.0.0/arpest/ui/widgets/operations_panel.py +73 -0
- arpest-1.0.0/arpest/ui/widgets/state_history.py +47 -0
- arpest-1.0.0/arpest/utils/__init__.py +0 -0
- arpest-1.0.0/arpest/utils/config.py +117 -0
- arpest-1.0.0/arpest/utils/constants.py +8 -0
- arpest-1.0.0/arpest/utils/cursor/cursor_helpers.py +185 -0
- arpest-1.0.0/arpest/utils/cursor/cursor_manager.py +187 -0
- arpest-1.0.0/arpest/utils/cursor/pg_line_cursor.py +108 -0
- arpest-1.0.0/arpest/utils/functions/fermi_dirac_ditribution.py +73 -0
- arpest-1.0.0/arpest/utils/session.py +121 -0
- arpest-1.0.0/arpest/visualization/__init__.py +6 -0
- arpest-1.0.0/arpest/visualization/figure_2d.py +401 -0
- arpest-1.0.0/arpest/visualization/figure_3d.py +664 -0
- arpest-1.0.0/arpest.egg-info/PKG-INFO +142 -0
- arpest-1.0.0/arpest.egg-info/SOURCES.txt +48 -0
- arpest-1.0.0/arpest.egg-info/dependency_links.txt +1 -0
- arpest-1.0.0/arpest.egg-info/entry_points.txt +2 -0
- arpest-1.0.0/arpest.egg-info/requires.txt +12 -0
- arpest-1.0.0/arpest.egg-info/top_level.txt +1 -0
- arpest-1.0.0/pyproject.toml +56 -0
- arpest-1.0.0/setup.cfg +4 -0
- arpest-1.0.0/setup.py +23 -0
arpest-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: arpest
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: ARPES data analysis and visualization tool
|
|
5
|
+
Author: Ola Kenjiforslund
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.7.13
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Provides-Extra: dev
|
|
10
|
+
|
|
11
|
+
# ARpest
|
|
12
|
+
|
|
13
|
+
**A**ngle-**R**esolved **P**hotoemission **E**lectron **S**pectroscopy **T**ool
|
|
14
|
+
|
|
15
|
+
A modern, interactive Python application for analysing ARPES (Angle-Resolved Photoemission Spectroscopy) data from multiple synchrotron beamlines.
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
### Core Capabilities
|
|
24
|
+
- **Multi-beamline support**: Load data from Diamond Light Source (I05) and MAX IV (Bloch)
|
|
25
|
+
- **Multiple file formats**: `.nxs`, `.h5`, `.zip`, `.ibw`
|
|
26
|
+
- **2D & 3D visualisation**: Single cuts and photon energy/deflector angle scans
|
|
27
|
+
- **Interactive analysis**: Real-time cursor tracking with live EDC/MDC updates
|
|
28
|
+
- **State management**: Undo/redo functionality with complete processing history
|
|
29
|
+
- **Tabbed interface**: Work with multiple datasets simultaneously
|
|
30
|
+
- **Save dataset**: Save and comeback where you where
|
|
31
|
+
|
|
32
|
+
### Performance
|
|
33
|
+
- Optimized rendering for smooth visualisation
|
|
34
|
+
- Fast numpy slicing for data extraction
|
|
35
|
+
- In-place data updates (no memory reallocation)
|
|
36
|
+
- Efficient rendering for large datasets
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
### Requirements
|
|
43
|
+
- Python 3.9 or higher
|
|
44
|
+
- PyQt5
|
|
45
|
+
- NumPy
|
|
46
|
+
- SciPy
|
|
47
|
+
- h5py
|
|
48
|
+
- igor (optional, for `.ibw` files)
|
|
49
|
+
- pyqtgraph
|
|
50
|
+
|
|
51
|
+
### Quick Install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Clone the repository
|
|
55
|
+
git clone https://github.com/OlaKenji/ARpest.git
|
|
56
|
+
cd arpest
|
|
57
|
+
|
|
58
|
+
# Install dependencies
|
|
59
|
+
pip install PyQt5 numpy matplotlib scipy h5py igor, pyqtgraph
|
|
60
|
+
|
|
61
|
+
# Run the application
|
|
62
|
+
python run.py
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Usage
|
|
66
|
+
|
|
67
|
+
### Basic Workflow
|
|
68
|
+
|
|
69
|
+
1. **Launch the application**:
|
|
70
|
+
```bash
|
|
71
|
+
python run.py
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
2. **Load data**:
|
|
75
|
+
- Click the 📂 **Open File** button in the toolbar
|
|
76
|
+
- Select your ARPES data file (`.nxs`, `.h5`, `.zip`, or `.ibw`)
|
|
77
|
+
|
|
78
|
+
3. **Interactive analysis**:
|
|
79
|
+
- **Apply data processing**: Convert to k-space, correct the Fermi level based on a reference measurent and more
|
|
80
|
+
- **Click & drag**: Continuously update cuts in real-time
|
|
81
|
+
- **3D data**: Use energy slider to navigate through different energy slices
|
|
82
|
+
|
|
83
|
+
4. **Configure settings**:
|
|
84
|
+
- Click ⚙️ **Settings** to set default data directory
|
|
85
|
+
- Choose preferred colormap
|
|
86
|
+
- Settings persist between sessions
|
|
87
|
+
|
|
88
|
+
### Supported Beamlines
|
|
89
|
+
|
|
90
|
+
#### Diamond Light Source - I05
|
|
91
|
+
#### MAX IV - Bloch
|
|
92
|
+
|
|
93
|
+
## Roadmap
|
|
94
|
+
|
|
95
|
+
- [ ] Additional beamline support (SLS, SOLEIL, etc.)
|
|
96
|
+
- [ ] Additional Data processing operations
|
|
97
|
+
- [ ] Export processed data
|
|
98
|
+
- [ ] Analysis plugins system
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
## Contributing
|
|
102
|
+
|
|
103
|
+
Contributions are welcome! Please:
|
|
104
|
+
|
|
105
|
+
1. Fork the repository
|
|
106
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
107
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
108
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
109
|
+
5. Open a Pull Request
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
## Citation
|
|
118
|
+
|
|
119
|
+
If you use ARpest in your research, please cite:
|
|
120
|
+
|
|
121
|
+
```bibtex
|
|
122
|
+
@software{arpest2025,
|
|
123
|
+
author = {Ola Kenji Forslund},
|
|
124
|
+
title = {ARpest: Interactive ARPES Data Analysis Tool},
|
|
125
|
+
year = {2025},
|
|
126
|
+
url = {https://github.com/OlaKenji/arpest}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Screenshots
|
|
133
|
+
|
|
134
|
+
### 2D Single Cut Analysis
|
|
135
|
+

|
|
136
|
+
*Interactive band structure visualization with EDC and MDC*
|
|
137
|
+
|
|
138
|
+
### 3D Fermi Surface Mapping
|
|
139
|
+

|
|
140
|
+
*Fermi surface with momentum cuts*
|
|
141
|
+
|
|
142
|
+
---
|
arpest-1.0.0/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# ARpest
|
|
2
|
+
|
|
3
|
+
**A**ngle-**R**esolved **P**hotoemission **E**lectron **S**pectroscopy **T**ool
|
|
4
|
+
|
|
5
|
+
A modern, interactive Python application for analysing ARPES (Angle-Resolved Photoemission Spectroscopy) data from multiple synchrotron beamlines.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
### Core Capabilities
|
|
14
|
+
- **Multi-beamline support**: Load data from Diamond Light Source (I05) and MAX IV (Bloch)
|
|
15
|
+
- **Multiple file formats**: `.nxs`, `.h5`, `.zip`, `.ibw`
|
|
16
|
+
- **2D & 3D visualisation**: Single cuts and photon energy/deflector angle scans
|
|
17
|
+
- **Interactive analysis**: Real-time cursor tracking with live EDC/MDC updates
|
|
18
|
+
- **State management**: Undo/redo functionality with complete processing history
|
|
19
|
+
- **Tabbed interface**: Work with multiple datasets simultaneously
|
|
20
|
+
- **Save dataset**: Save and comeback where you where
|
|
21
|
+
|
|
22
|
+
### Performance
|
|
23
|
+
- Optimized rendering for smooth visualisation
|
|
24
|
+
- Fast numpy slicing for data extraction
|
|
25
|
+
- In-place data updates (no memory reallocation)
|
|
26
|
+
- Efficient rendering for large datasets
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
### Requirements
|
|
33
|
+
- Python 3.9 or higher
|
|
34
|
+
- PyQt5
|
|
35
|
+
- NumPy
|
|
36
|
+
- SciPy
|
|
37
|
+
- h5py
|
|
38
|
+
- igor (optional, for `.ibw` files)
|
|
39
|
+
- pyqtgraph
|
|
40
|
+
|
|
41
|
+
### Quick Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Clone the repository
|
|
45
|
+
git clone https://github.com/OlaKenji/ARpest.git
|
|
46
|
+
cd arpest
|
|
47
|
+
|
|
48
|
+
# Install dependencies
|
|
49
|
+
pip install PyQt5 numpy matplotlib scipy h5py igor, pyqtgraph
|
|
50
|
+
|
|
51
|
+
# Run the application
|
|
52
|
+
python run.py
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
### Basic Workflow
|
|
58
|
+
|
|
59
|
+
1. **Launch the application**:
|
|
60
|
+
```bash
|
|
61
|
+
python run.py
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
2. **Load data**:
|
|
65
|
+
- Click the 📂 **Open File** button in the toolbar
|
|
66
|
+
- Select your ARPES data file (`.nxs`, `.h5`, `.zip`, or `.ibw`)
|
|
67
|
+
|
|
68
|
+
3. **Interactive analysis**:
|
|
69
|
+
- **Apply data processing**: Convert to k-space, correct the Fermi level based on a reference measurent and more
|
|
70
|
+
- **Click & drag**: Continuously update cuts in real-time
|
|
71
|
+
- **3D data**: Use energy slider to navigate through different energy slices
|
|
72
|
+
|
|
73
|
+
4. **Configure settings**:
|
|
74
|
+
- Click ⚙️ **Settings** to set default data directory
|
|
75
|
+
- Choose preferred colormap
|
|
76
|
+
- Settings persist between sessions
|
|
77
|
+
|
|
78
|
+
### Supported Beamlines
|
|
79
|
+
|
|
80
|
+
#### Diamond Light Source - I05
|
|
81
|
+
#### MAX IV - Bloch
|
|
82
|
+
|
|
83
|
+
## Roadmap
|
|
84
|
+
|
|
85
|
+
- [ ] Additional beamline support (SLS, SOLEIL, etc.)
|
|
86
|
+
- [ ] Additional Data processing operations
|
|
87
|
+
- [ ] Export processed data
|
|
88
|
+
- [ ] Analysis plugins system
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
## Contributing
|
|
92
|
+
|
|
93
|
+
Contributions are welcome! Please:
|
|
94
|
+
|
|
95
|
+
1. Fork the repository
|
|
96
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
97
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
98
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
99
|
+
5. Open a Pull Request
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
## Citation
|
|
108
|
+
|
|
109
|
+
If you use ARpest in your research, please cite:
|
|
110
|
+
|
|
111
|
+
```bibtex
|
|
112
|
+
@software{arpest2025,
|
|
113
|
+
author = {Ola Kenji Forslund},
|
|
114
|
+
title = {ARpest: Interactive ARPES Data Analysis Tool},
|
|
115
|
+
year = {2025},
|
|
116
|
+
url = {https://github.com/OlaKenji/arpest}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Screenshots
|
|
123
|
+
|
|
124
|
+
### 2D Single Cut Analysis
|
|
125
|
+

|
|
126
|
+
*Interactive band structure visualization with EDC and MDC*
|
|
127
|
+
|
|
128
|
+
### 3D Fermi Surface Mapping
|
|
129
|
+

|
|
130
|
+
*Fermi surface with momentum cuts*
|
|
131
|
+
|
|
132
|
+
---
|
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ARpest application entry point.
|
|
3
|
+
|
|
4
|
+
This module initializes and runs the main PyQt5 application.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
from PyQt5.QtWidgets import QApplication
|
|
13
|
+
|
|
14
|
+
from arpest.ui.main_window import MainWindow
|
|
15
|
+
from arpest.utils.config import Config
|
|
16
|
+
|
|
17
|
+
#TODO
|
|
18
|
+
#subtarct, add and divide by MDC, EDC, bg_Matt
|
|
19
|
+
#divide by gold
|
|
20
|
+
|
|
21
|
+
#smooth, 2nd derivative, curvature
|
|
22
|
+
#normalise slices (for kz thingy)
|
|
23
|
+
#set cursor position
|
|
24
|
+
#rotate the map for allignment
|
|
25
|
+
#fully integrated MDC, EDC
|
|
26
|
+
#overlap plots to compare
|
|
27
|
+
#export data for additional analysis
|
|
28
|
+
#phi rotation in k convert?
|
|
29
|
+
|
|
30
|
+
#stuff:
|
|
31
|
+
#bg subtract (there may be angle dependence: bg_matt, bg_fermi)
|
|
32
|
+
#normalisation:
|
|
33
|
+
#1) by number of sweeps (can chekc the BG above FL to check for number of sweeps),
|
|
34
|
+
#2) MDC/EDC cuts divided by max value (fake data, just to enhance)
|
|
35
|
+
#select area:
|
|
36
|
+
#normalise based on some selected area?
|
|
37
|
+
#fermi level for photon ebergy scan? -> Chun does it manually for each hv measuerment
|
|
38
|
+
#range plots
|
|
39
|
+
#fitting?
|
|
40
|
+
|
|
41
|
+
class ARpestApp:
|
|
42
|
+
"""Main ARpest application class."""
|
|
43
|
+
|
|
44
|
+
def __init__(self):
|
|
45
|
+
"""Initialize the application."""
|
|
46
|
+
self.app = QApplication(sys.argv)
|
|
47
|
+
self.app.setApplicationName("ARpest")
|
|
48
|
+
self.app.setOrganizationName("ARpest")
|
|
49
|
+
|
|
50
|
+
# Load configuration
|
|
51
|
+
self.config = Config()
|
|
52
|
+
|
|
53
|
+
# Create main window
|
|
54
|
+
self.window = MainWindow(self.config)
|
|
55
|
+
|
|
56
|
+
def run(self) -> int:
|
|
57
|
+
"""
|
|
58
|
+
Run the application.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Exit code (0 for success)
|
|
62
|
+
"""
|
|
63
|
+
self.window.show()
|
|
64
|
+
return self.app.exec_()
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def main() -> int:
|
|
68
|
+
"""
|
|
69
|
+
Main entry point for ARpest application.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
Exit code (0 for success)
|
|
73
|
+
"""
|
|
74
|
+
app = ARpestApp()
|
|
75
|
+
return app.run()
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
if __name__ == "__main__":
|
|
79
|
+
sys.exit(main())
|
|
File without changes
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Base loader interface for beamline-specific data loaders.
|
|
3
|
+
|
|
4
|
+
All beamline loaders must inherit from BaseLoader and implement
|
|
5
|
+
the load() method to convert beamline-specific formats into
|
|
6
|
+
the standard Dataset model.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from abc import ABC, abstractmethod
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import Union
|
|
14
|
+
|
|
15
|
+
from ...models import Dataset
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class BaseLoader(ABC):
|
|
19
|
+
"""
|
|
20
|
+
Abstract base class for beamline data loaders.
|
|
21
|
+
|
|
22
|
+
Each beamline has its own data format. Loaders convert these
|
|
23
|
+
formats into the unified Dataset model.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def name(self) -> str:
|
|
29
|
+
"""Human-readable name of the beamline/instrument."""
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
@abstractmethod
|
|
34
|
+
def extensions(self) -> list[str]:
|
|
35
|
+
"""Supported file extensions (e.g., ['.txt', '.dat'])."""
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
@abstractmethod
|
|
39
|
+
def can_load(self, filepath: Union[str, Path]) -> bool:
|
|
40
|
+
"""
|
|
41
|
+
Check if this loader can handle the given file.
|
|
42
|
+
|
|
43
|
+
This should be a quick check (e.g., file extension, magic bytes,
|
|
44
|
+
header inspection) without fully parsing the file.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
filepath: Path to file to check
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
True if this loader can handle the file
|
|
51
|
+
"""
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
@abstractmethod
|
|
55
|
+
def load(self, filepath: Union[str, Path]) -> Dataset:
|
|
56
|
+
"""
|
|
57
|
+
Load data from file and convert to standard Dataset.
|
|
58
|
+
|
|
59
|
+
This is where the beamline-specific parsing happens.
|
|
60
|
+
The loader must:
|
|
61
|
+
1. Read the file
|
|
62
|
+
2. Extract axes, intensity data, and metadata
|
|
63
|
+
3. Normalize naming conventions (e.g., tilt angles)
|
|
64
|
+
4. Return a valid Dataset
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
filepath: Path to file to load
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
Dataset object with standardized format
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
ValueError: If file format is invalid
|
|
74
|
+
IOError: If file cannot be read
|
|
75
|
+
"""
|
|
76
|
+
pass
|
|
77
|
+
|
|
78
|
+
def __str__(self) -> str:
|
|
79
|
+
"""String representation."""
|
|
80
|
+
return f"{self.name} Loader"
|
|
81
|
+
|
|
82
|
+
def __repr__(self) -> str:
|
|
83
|
+
"""Detailed representation."""
|
|
84
|
+
return f"<{self.__class__.__name__}: {self.name} ({', '.join(self.extensions)})>"
|