solvephase 0.1.0__py3-none-any.whl
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.
- solvephase/__about__.py +3 -0
- solvephase/__init__.py +110 -0
- solvephase/algorithms/__init__.py +4 -0
- solvephase/algorithms/cdi.py +967 -0
- solvephase/algorithms/fast_furious.py +494 -0
- solvephase/algorithms/gerchberg_saxton.py +255 -0
- solvephase/algorithms/lift.py +553 -0
- solvephase/algorithms/phase_diversity.py +658 -0
- solvephase/algorithms/tie.py +693 -0
- solvephase/algorithms/wirtinger.py +865 -0
- solvephase/api.py +228 -0
- solvephase/backend.py +24 -0
- solvephase/basis.py +516 -0
- solvephase/cli.py +131 -0
- solvephase/focal.py +367 -0
- solvephase/interop.py +173 -0
- solvephase/losses.py +169 -0
- solvephase/metrics.py +5 -0
- solvephase/operators.py +391 -0
- solvephase/optimize.py +404 -0
- solvephase/propagation.py +26 -0
- solvephase/pupil.py +5 -0
- solvephase/py.typed +0 -0
- solvephase/result.py +228 -0
- solvephase/retrieval.py +627 -0
- solvephase/simulate.py +113 -0
- solvephase/unwrap.py +5 -0
- solvephase-0.1.0.dist-info/METADATA +198 -0
- solvephase-0.1.0.dist-info/RECORD +32 -0
- solvephase-0.1.0.dist-info/WHEEL +4 -0
- solvephase-0.1.0.dist-info/entry_points.txt +2 -0
- solvephase-0.1.0.dist-info/licenses/LICENSE +21 -0
solvephase/__about__.py
ADDED
solvephase/__init__.py
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""solvephase: fast, GPU-optional phase retrieval.
|
|
2
|
+
|
|
3
|
+
The most common entry points:
|
|
4
|
+
|
|
5
|
+
* :func:`retrieve` - one call from focal-plane images to a wavefront;
|
|
6
|
+
* :class:`Pupil`, :class:`Basis`, :class:`FocalPlaneModel` - describe the optics;
|
|
7
|
+
* :class:`FocalPlaneProblem` + :func:`solve` - full control of the
|
|
8
|
+
nonlinear focal-plane solver;
|
|
9
|
+
* :func:`phase_diversity`, :func:`lift`, :class:`FastAndFurious`,
|
|
10
|
+
:func:`cdi`, :func:`wirtinger`, :func:`tie`, :func:`gerchberg_saxton` - the algorithm
|
|
11
|
+
families (see :mod:`solvephase.algorithms`).
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from .__about__ import __version__
|
|
15
|
+
from .algorithms.cdi import (
|
|
16
|
+
CDIResult,
|
|
17
|
+
ShrinkwrapConfig,
|
|
18
|
+
align_object,
|
|
19
|
+
autocorrelation_support,
|
|
20
|
+
cdi,
|
|
21
|
+
simulate_cdi,
|
|
22
|
+
)
|
|
23
|
+
from .algorithms.fast_furious import ClosedLoopResult, FastAndFurious, simulate_closed_loop
|
|
24
|
+
from .algorithms.gerchberg_saxton import gerchberg_saxton
|
|
25
|
+
from .algorithms.lift import LIFT, lift, lift_crlb
|
|
26
|
+
from .algorithms.phase_diversity import PhaseDiversityProblem, phase_diversity
|
|
27
|
+
from .algorithms.tie import TIEResult, simulate_defocus_stack, tie
|
|
28
|
+
from .algorithms.wirtinger import GenericResult, relative_error, wirtinger
|
|
29
|
+
from .api import retrieve
|
|
30
|
+
from .backend import Backend, backend_of, get_backend, gpu_available, to_numpy
|
|
31
|
+
from .basis import Basis
|
|
32
|
+
from .focal import FocalPlaneModel, zernike_diversity
|
|
33
|
+
from .losses import AmplitudeLoss, GaussianLoss, Loss, PoissonLoss
|
|
34
|
+
from .metrics import remove_modes, rms, strehl_from_rms, wavefront_error
|
|
35
|
+
from .operators import (
|
|
36
|
+
CodedDiffractionOperator,
|
|
37
|
+
LinearOperator,
|
|
38
|
+
MatrixOperator,
|
|
39
|
+
OversampledFourierOperator,
|
|
40
|
+
)
|
|
41
|
+
from .propagation import (
|
|
42
|
+
AngularSpectrumPropagator,
|
|
43
|
+
FFTPropagator,
|
|
44
|
+
FocalPlanePropagator,
|
|
45
|
+
MFTPropagator,
|
|
46
|
+
)
|
|
47
|
+
from .pupil import Pupil
|
|
48
|
+
from .result import Result
|
|
49
|
+
from .retrieval import FocalPlaneProblem, noise_weights, solve
|
|
50
|
+
from .simulate import random_aberration, simulate_images
|
|
51
|
+
from .unwrap import unwrap_phase, wrap
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"LIFT",
|
|
55
|
+
"AmplitudeLoss",
|
|
56
|
+
"AngularSpectrumPropagator",
|
|
57
|
+
"Backend",
|
|
58
|
+
"Basis",
|
|
59
|
+
"CDIResult",
|
|
60
|
+
"ClosedLoopResult",
|
|
61
|
+
"CodedDiffractionOperator",
|
|
62
|
+
"FFTPropagator",
|
|
63
|
+
"FastAndFurious",
|
|
64
|
+
"FocalPlaneModel",
|
|
65
|
+
"FocalPlaneProblem",
|
|
66
|
+
"FocalPlanePropagator",
|
|
67
|
+
"GaussianLoss",
|
|
68
|
+
"GenericResult",
|
|
69
|
+
"LinearOperator",
|
|
70
|
+
"Loss",
|
|
71
|
+
"MFTPropagator",
|
|
72
|
+
"MatrixOperator",
|
|
73
|
+
"OversampledFourierOperator",
|
|
74
|
+
"PhaseDiversityProblem",
|
|
75
|
+
"PoissonLoss",
|
|
76
|
+
"Pupil",
|
|
77
|
+
"Result",
|
|
78
|
+
"ShrinkwrapConfig",
|
|
79
|
+
"TIEResult",
|
|
80
|
+
"__version__",
|
|
81
|
+
"align_object",
|
|
82
|
+
"autocorrelation_support",
|
|
83
|
+
"backend_of",
|
|
84
|
+
"cdi",
|
|
85
|
+
"gerchberg_saxton",
|
|
86
|
+
"get_backend",
|
|
87
|
+
"gpu_available",
|
|
88
|
+
"lift",
|
|
89
|
+
"lift_crlb",
|
|
90
|
+
"noise_weights",
|
|
91
|
+
"phase_diversity",
|
|
92
|
+
"random_aberration",
|
|
93
|
+
"relative_error",
|
|
94
|
+
"remove_modes",
|
|
95
|
+
"retrieve",
|
|
96
|
+
"rms",
|
|
97
|
+
"simulate_cdi",
|
|
98
|
+
"simulate_closed_loop",
|
|
99
|
+
"simulate_defocus_stack",
|
|
100
|
+
"simulate_images",
|
|
101
|
+
"solve",
|
|
102
|
+
"strehl_from_rms",
|
|
103
|
+
"tie",
|
|
104
|
+
"to_numpy",
|
|
105
|
+
"unwrap_phase",
|
|
106
|
+
"wavefront_error",
|
|
107
|
+
"wirtinger",
|
|
108
|
+
"wrap",
|
|
109
|
+
"zernike_diversity",
|
|
110
|
+
]
|