Skip to content
NaNIsaacPublic

About

JAX-native, composable phase retrieval for coherent diffraction imaging (CDI, BCDI)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

QoraPhase

PyPI Tests License: MIT

Estimate a complex object from a coherent diffraction intensity array using composable JAX phase-retrieval recipes.

Synthetic object, diffraction intensity and reconstruction

Recorded synthetic, noiseless 64×64 example, best of 8 starts. A low intensity residual does not establish the correct or unique object; measured-data checks remain unresolved.

Install

Requires Python 3.12 or later and uv:

uv init --no-workspace --python 3.12 qoraphase-demo
uv add --directory qoraphase-demo qoraphase

Quick start

This small API check reconstructs a centred synthetic Gaussian intensity, without a data file:

$ uv run -q --directory qoraphase-demo python -c "import numpy as np; import qoraphase as qp; y,x=np.indices((32,32))-16; result=qp.reconstruct(np.exp(-(x*x+y*y)/20)); print(result.amplitude.shape)"
(32, 32)

The shape confirms execution, not reconstruction accuracy. The tutorial compares with a known object. For your own data, pass a centred 2D/3D intensity array, with mask=True for unusable pixels and support=True inside the object.

Documentation

License

MIT, see LICENSE.

About

JAX-native, composable phase retrieval for coherent diffraction imaging (CDI, BCDI)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages