holowizard
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.3%) to scientific vocabulary
Scientific Fields
Repository
Basic Info
- Host: GitHub
- Owner: DESY-FS-PETRA
- License: mit
- Language: Python
- Default Branch: main
- Size: 28.6 MB
Statistics
- Stars: 8
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 4
Metadata Files
README.md
HoloWizard
HoloWizard is a collection of software tools for phase retrieval in the setting of near-field holographic microscopy and tomography. It is developed at DESY, Hamburg in the group X-Ray Nanoscience and X-Ray Optics. The software is designed to cover all steps in experimental/algorithm development: - The Forge generates datasets within given variation bouds either for testing new algorithms or provide training data sets for ML applications - The Core implements the ASRM algorithm, our phase retrieval engine. It includes also all neccessary auxillary functions to load and preprocess single holograms/diffraction patterns. - The Pipe enables the online and offline batch processing of holo tomograms, i.e. the phase retrieval of individual projections(along with all preprocessing steps) and the computation of the tomographic volume from the retrieved projections. - The Livereco module can show online reconstructions of single projections during an experiment i.e. for finding a suited region of interest. It can be integrated in existing experimental control software.
Table of Contents
Installation
Python Environment
Create a new environment with python 3.11., i.e. with mamba
bash
$ mamba create -p <path_to_env> python=3.11
Activate enviroment
bash
$ mamba activate <path_to_env>
Install package
bash
$ pip install holowizard
Tools
The Core
To create examples, open a terminal and run
{bash}
$ holowizard_core_create_examples <directory>
The Pipe
Setting Up an Instance
We provide a CLI command to initialize everything:
bash
$ holowizard_pipe_start beamtime.name=YOUR_BEAMTIME_NAME beamtime.year=YEAR_OF_BEAMTIME
This command sets up the pipeline. You can override any other configuration value using Hydra’s override syntax:
👉 Hydra Override Syntax Documentation
If the startup is successful, you’ll see output like:
INFO: Uvicorn running on http://MY_IP_ADDRESS:MY_PORT (Press CTRL+C to quit)
Click the address to open a browser window showing that holopipe is running.
Visit: http://MY_IP_ADDRESS:MY_PORT/dashboard for useful runtime information.
Add a scan with default parameters.
You can submit scans using a simple curl POST request:
bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{ "a0": 1.0,
"scan-name": "nano145014_s7_1_tum",
"holder": 220,
"base_dir": "holopipe",
"reconstruction": "wire",
"find_focus": "wire",
"energy": 17.0
}' \
http://MY_IP_ADDRESS:MY_PORT/api/submit_scan
If you are on the same machine as the server is running you can use the python script:
bash
holowizard_pipe_reconstruct_scan --help # will tell you all important parameters
Required Parameters
name: Folder name of the current scanholder: Height of the holderenergy: Scan energy in keV
Optional Parameters
a0: Optional numeric parameter; if not provided, it will be computed automaticallyreconstruction: Instruction set for reconstruction —wire(default) orspiderfind_focus: Instruction set to find focus —wire(default) orspiderbase_dir: Root directory for output files (default:holopipe)
Parameter Optimization
To performe parameter optimization go to http://MY_IP_ADDRESS:MY_PORT/parameter. Here you can set all parameter for all stages. To test them click Reconstruct. If the parameters work well, you can save them to the current beamtime folder using the Save as at the lower left.
If you want to reconstruct the whole scan you can click Submit All after chosing the Options. If you select Custom it will take the parameters from the left.
Other changes during beamtime
If you change the detector or anything else like removing tasks adapt parameters the full config files are located in the beamtime/processed/holowizard_config/folder. Changes here will reflect onto future curl requests!
The Forge
This framework can be used to generate large datasets of simulated holograms of randomly sampled objects.
Create New Dataset
Open a terminal and create a new config file with
{bash}
$ holowziard_forge_create_testconfig <args>
| Argument | Description | Position |
|-----------------|-----------------------------------------------------------|----------|
| name | Name of the new config file (without file name extension) | 1 |
| --output_dir | Output directory | optional |
| --override | Overrides existing configuration file | optional |
The config file can then be customized and used to create a new dataset with
{bash}
$ holowizard_forge_generate_data <args>
| Argument | Description | Position |
|---------------|------------------------------------------------------|----------|
| config | Path to the custom configuration file. | 1 |
| output_dir | Output directory where the generated data is stored. | 2 |
| num_samples | Number of data samples that should be generated. | 3 |
| --override | Override the output folder if it already exists. | optional |
Output Structure
output/
└── train.hdf5
└── train.json
The file train.hdf5 contains the training data
The file train.json contains the config parameters which have been used for the training data creation.
Developer Info
Add new Parameters
To add a new parameter, add it to the default configuration holowizard/forge/configs/default.json.
The Livereco
Start the online reconstruction server with
{bash}
$ holowizard_livereco_server_start
Citations
Artifact-suppressing reconstruction method:
- URL: https://opg.optica.org/oe/fulltext.cfm?uri=oe-32-7-10801&id=547807###
- DOI: 10.1364/OE.514641
{bibtex}
@article{Dora:24,
author = {Johannes Dora and Martin M\"{o}ddel and Silja Flenner and Christian G. Schroer and Tobias Knopp and Johannes Hagemann},
journal = {Opt. Express},
keywords = {Free electron lasers; Holographic microscopy; Imaging techniques; Phase shift; X-ray imaging; Zone plates},
number = {7},
pages = {10801--10828},
publisher = {Optica Publishing Group},
title = {{Artifact-suppressing reconstruction of strongly interacting objects in X-ray near-field holography without a spatial support constraint}},
volume = {32},
month = {Mar},
year = {2024},
url = {https://opg.optica.org/oe/abstract.cfm?URI=oe-32-7-10801},
doi = {10.1364/OE.514641},
abstract = {The phase problem is a well known ill-posed reconstruction problem of coherent lens-less microscopic imaging, where only the squared magnitude of a complex wavefront is measured by a detector while the phase information of the wave field is lost. To retrieve the lost information, common algorithms rely either on multiple data acquisitions under varying measurement conditions or on the application of strong constraints such as a spatial support. In X-ray near-field holography, however, these methods are rendered impractical in the setting of time sensitive in situ and operando measurements. In this paper, we will forego the spatial support constraint and propose a projected gradient descent (PGD) based reconstruction scheme in combination with proper preprocessing and regularization that significantly reduces artifacts for refractive reconstructions from only a single acquired hologram without a spatial support constraint. We demonstrate the feasibility and robustness of our approach on different data sets obtained at the nano imaging endstation of P05 at PETRA III (DESY, Hamburg) operated by Helmholtz-Zentrum Hereon.},
}
Model-based autofocus:
- URL: https://opg.optica.org/oe/abstract.cfm?doi=10.1364/OE.544573
- DOI: 10.1364/OE.544573
{bibtex}
@article{Dora:25,
author = {Johannes Dora and Martin M\"{o}ddel and Silja Flenner and Jan Reimers and Berit Zeller-Plumhoff and Christian G. Schroer and Tobias Knopp and Johannes Hagemann},
journal = {Opt. Express},
keywords = {Image analysis; Image metrics; Imaging systems; Phase retrieval; X-ray imaging; Zone plates},
number = {4},
pages = {6641--6657},
publisher = {Optica Publishing Group},
title = {Model-based autofocus for near-field phase retrieval},
volume = {33},
month = {Feb},
year = {2025},
url = {https://opg.optica.org/oe/abstract.cfm?URI=oe-33-4-6641},
doi = {10.1364/OE.544573},
}
Further links
https://helmholtz.software/software/holowizard \ https://connect.helmholtz-imaging.de/solution/71 \ https://connect.helmholtz-imaging.de/blog_gallery/blogpost/10
Owner
- Name: X-Ray Nanoscience and X-Ray Optics
- Login: DESY-FS-PETRA
- Kind: organization
- Location: Germany
- Repositories: 1
- Profile: https://github.com/DESY-FS-PETRA
X-Ray Nanoscience and X-Ray Optics Group at DESY
Citation (citation.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
title: "HoloWizard: A Python framework for processing X-ray near-field holography data"
date-released: 2025-07-21
url: "https://github.com/DESY-FS-PETRA/holowizard"
repository-code: "https://github.com/DESY-FS-PETRA/holowizard"
doi: 10.5281/zenodo.16275928
license: MIT
abstract: |
HoloWizard is a collection of software tools for phase retrieval in the setting of
near-field holographic microscopy and tomography. It is developed at DESY, Hamburg
in the group X-Ray Nanoscience and X-Ray Optics. The software is designed to cover
all steps in experimental/algorithm development:
- The Forge generates datasets within given variation bounds either for testing new
algorithms or provide training data sets for ML applications
- The Core implements the ASRM algorithm, our phase retrieval engine. It includes
also all necessary auxiliary functions to load and preprocess single holograms/diffraction patterns.
- The Pipe enables the online and offline batch processing of holo tomograms, i.e.
the phase retrieval of individual projections(along with all preprocessing steps)
and the computation of the tomographic volume from the retrieved projections.
- The Livereco module can show online reconstructions of single projections during
an experiment i.e. for finding a suited region of interest. It can be integrated
in existing experimental control software.
keywords:
- "X-ray holography"
- "phase retrieval"
- "tomography"
- "microscopy"
- "Python"
- "scientific computing"
authors:
- family-names: "Dora"
given-names: "Johannes"
orcid: "https://orcid.org/0009-0001-4283-8499"
affiliation: "Deutsches Elektronen-Synchrotron DESY"
- family-names: "Flenner"
given-names: "Silja"
orcid: "https://orcid.org/0000-0002-2951-2304"
affiliation: "Helmholtz-Zentrum Hereon GmbH"
- family-names: "Lopes Marinho"
given-names: "André"
orcid: "https://orcid.org/0009-0008-5205-7822"
affiliation: "Deutsches Elektronen-Synchrotron DESY"
- family-names: "Grün"
given-names: "Johannes"
orcid: "https://orcid.org/0000-0002-9154-3929"
affiliation: "Deutsches Elektronen-Synchrotron DESY"
- family-names: "Hagemann"
given-names: "Johannes"
orcid: "https://orcid.org/0000-0003-2768-9496"
affiliation: "Deutsches Elektronen-Synchrotron DESY"
contact:
- family-names: "Dora"
given-names: "Johannes"
orcid: "https://orcid.org/0009-0001-4283-8499"
affiliation: "Deutsches Elektronen-Synchrotron DESY"
references:
- type: article
title: "Artifact-suppressing reconstruction of strongly interacting objects in X-ray near-field holography without a spatial support constraint"
doi: 10.1364/OE.514641
journal: "Optics Express"
- type: article
title: "Model-based autofocus for near-field phase retrieval"
doi: 10.1364/OE.544573
journal: "Optics Express"
GitHub Events
Total
- Release event: 2
- Watch event: 7
- Delete event: 3
- Member event: 2
- Public event: 1
- Push event: 17
- Create event: 8
Last Year
- Release event: 2
- Watch event: 7
- Delete event: 3
- Member event: 2
- Public event: 1
- Push event: 17
- Create event: 8
Packages
- Total packages: 2
-
Total downloads:
- pypi 79 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 6
- Total maintainers: 3
pypi.org: holowizard-livereco-client
- Documentation: https://holowizard-livereco-client.readthedocs.io/
- License: mit
-
Latest release: 2.0.1
published 5 months ago
Rankings
Maintainers (1)
pypi.org: holowizard
- Documentation: https://holowizard.readthedocs.io/
- License: mit
-
Latest release: 2.0.1
published 5 months ago
Rankings
Dependencies
- GitPython *
- astra-toolbox *
- bokeh *
- bs4 *
- cupy-cuda12x *
- dask *
- dask_jobqueue *
- fastapi *
- h5py *
- hdf5plugin *
- hydra-core *
- markdown *
- matplotlib *
- numpy ==1.26.4
- pandas *
- plotly *
- pyqt5-tools *
- pyqtgraph *
- pytest *
- pyzmq *
- requests *
- scikit-image *
- scikit-learn *
- scipy *
- selenium *
- torch *
- torchvision *
- tqdm *
- uvicorn *
- xraylib *
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- numpy *
- pyzmq *