User interface for pdz-tool which converts Bruker XRF* spectral data PDZ files to open CSV and JPEG formats.
*Tested on PDZ files from Bruker Tracer 5i Handheld XRF.
You can download and run PDZ Extractor as a Windows executable or directly with Python.
For Windows, PDZ Extractor is available as a portable executable that runs directly by double-clicking or running from the command prompt. No installation is required.
Here's how:
-
Download the latest Windows version under
pdz-extractor_vx.y.z_win64_portable.exe.zip -
Extract
pdz-extractor_vx.y.z_win64_portable.exefrom the ZIP. -
Double-click the extracted
pdz-extractor_vx.y.z_win64_portable.exe. -
Wait up to 30 seconds for PDZ Extractor to open.
Note
Windows Defender SmartScreen might block you from running the executable via double-click:
Why is it unrecognized and blocked? In short, it’s because this executable has no certificate. If an executable's certificate isn't found by Windows when double-clicked, Windows will block it from immediately running.
If you have admin privileges:
- Double-click on
pdz-extractor_vx.y.z_win64_portable.exe. - On the Windows Defender SmartScreen pop-up, select More info.
- Select Run anyway. No Run anyway? Select Don't run and try Option 2.
- Wait for PDZ Extractor to open. This may take a few seconds.
If double-clicking the executable doesn’t work, try running it via the command prompt.
Not possible? You can try running on a virtual machine or contacting your machine admin.
You can find various ways online on how to run an executable via the command prompt, but I prefer these steps:
-
Copy the path of the executable:
- Right-click the file. (On Windows 10, press and hold the
Shiftkey and then right-click the file.) - Select Copy as path.
- Right-click the file. (On Windows 10, press and hold the
-
Open the Start menu (
⊞ Win). -
Type cmd.
-
Press the
Enterkey or select the Command Prompt app. -
Paste into the prompt the executable path you copied with
Ctrl·V. -
Run by pressing
Enter. -
Wait for the executable to load. This may take a few seconds.
For macOS, there is currently no app file available for PDZ Extractor.
PDZ Extractor runs on Python 3.11 with just a couple dependencies.
pdz-toolpython>=3.11tkpyinstaller<6if you need to create executables or packages (6.y.zversions ofpyinstallercan throw a error when closing the window on Windows)
If you use conda (Anaconda), it can be faster to manually create the environment instead of solving from environment.yml.
Change directory to the repo root and run these commands to manually create the environment in ./env:
conda create -y --prefix ./env python=3.11 --force
conda activate ./env
pip install pdz-tool
pip install "pyinstaller<6"
To activate the environment in the future, change directory to repo root and run conda activate ./env.
Run PyInstaller with the following arguments while in the source code directory.
For Windows:
pyinstaller --onefile --windowed --icon=icon.ico --add-data=C:\absolute\path\to\source\icon.ico;. main.py
For macOS:
pyinstaller --windowed --icon=icon.icns --add-data=\absolute\path\to\source\icon.icns;. main.py
The terminating ;. in the add-data path is necessary. The period
. indicates the directory in which to add the data, here root.
If the icons are moved to a subdirectory, this . will need to be replaced by
that subdirectory path.
pdz-tool by Bruno Ducraux
with extended features and fixes by Lars Maxfield
User interface created by Lars Maxfield
Image extraction adapted from read_pdz by Frank Ligterink
Icon by Good Stuff Non Sense, CC BY 4.0

