Skip to content

Commit 5ec1a55

Browse files
authored
Merge pull request #1 from olive-groves/developer/lars
Initial working commit with `pdz-tool` with full CSV export
2 parents ef4743f + 28c95d6 commit 5ec1a55

20 files changed

+2137
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ celerybeat.pid
124124
# Environments
125125
.env
126126
.venv
127-
env/
127+
env*/
128128
venv/
129129
ENV/
130130
env.bak/
@@ -160,3 +160,5 @@ cython_debug/
160160
# and can be added to the global gitignore or merged into this file. For a more nuclear
161161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162162
#.idea/
163+
164+
source/test/output/

README.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,65 @@
11
# pdz-tool-gui
2-
User interface for `pdz-tool` which converts XRF spectral data PDZ files to open CSV, JSON, TXT, and JPEG formats
2+
![Logo for pdz-tool GUI, an illustration of a sci-fi ray-blaster.](source/icon.svg)
3+
4+
User interface for [`pdz-tool`](https://github.com/bducraux/pdz-tool) which converts Bruker XRF spectral data PDZ files to open CSV and JPEG formats.
5+
6+
![Interface of pdz-tool GUI showing a folder of PDZs files and their output spectra and image files.](source/screenshot.png)
7+
8+
`pdz-tool` by [Bruno Ducraux](https://github.com/bducraux)
9+
with features and fixes by [Lars Maxfield](https://github.com/larsmaxfield)
10+
11+
Interface created by [Lars Maxfield](https://github.com/larsmaxfield)
12+
13+
Image extraction adapted from `read_pdz` by [Frank Ligterink](https://github.com/fligt)
14+
15+
Icon by Good Stuff Non Sense, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
16+
17+
18+
## Developers
19+
20+
### Dependencies
21+
22+
- `pdz-tool`
23+
- `python>=3.11`
24+
- `tk`
25+
- `pyinstaller<6` if you need to create executables or packages ([`6.y.z` versions of `pyinstaller` can throw a error when closing the window on Windows](https://stackoverflow.com/questions/60502431/files-built-using-pyinstaller-onefile-no-longer-deletes-their-temporary-mei-d))
26+
27+
28+
### Virtual environments
29+
30+
#### `conda`
31+
32+
If you use `conda` (Anaconda), it can be faster to manually create the environment instead of solving from `environment.yml`.
33+
34+
Change directory to the repo root and run these commands to manually create the environment in `./env`:
35+
36+
````
37+
conda create -y --prefix ./env python=3.11 --force
38+
conda activate ./env
39+
pip install pdz-tool
40+
pip install "pyinstaller<6"
41+
````
42+
43+
To activate the environment in the future, change directory to repo root and run `conda activate ./env`.
44+
45+
46+
### Creating portable executable and package
47+
48+
Run PyInstaller with the following arguments while in the source code directory.
49+
50+
For Windows:
51+
52+
```
53+
pyinstaller --onefile --windowed --icon=icon.ico --add-data=C:\absolute\path\to\source\icon.ico;. main.py
54+
```
55+
56+
For macOS:
57+
58+
```
59+
pyinstaller --windowed --icon=icon.icns --add-data=\absolute\path\to\source\icon.icns;. main.py
60+
```
61+
62+
The terminating `;.` in the `add-data` path is necessary.
63+
`.` indicates the directory in which to add the data, here root.
64+
If the icons are moved to a subdirectory, this `.` will need to be replaced by
65+
that subdirectory path.

environment.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
channels:
2+
- defaults
3+
- conda-forge
4+
dependencies:
5+
- python>=3.11
6+
- pip
7+
- tk
8+
- pyinstaller
9+
- pip:
10+
- pdz-tool

source/icon.icns

8 Bytes
Binary file not shown.

source/icon.ico

66.1 KB
Binary file not shown.

source/icon.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)