Astimator 0.0.1__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.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.4
2
+ Name: Astimator
3
+ Version: 0.0.1
4
+ Summary: Estimate Hermite-Gauss mode coefficients from intensity images taken through a (tilted) lens.
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: numpy
8
+ Requires-Dist: scipy
9
+ Requires-Dist: torch
10
+
11
+ # Astimator
12
+
13
+ The ASTIgmatic estiMATOR. Estimate complex mode coefficients from several intensity pictures of the same
14
+ beam, each taken after a different transformation. PyTorch based.
15
+
16
+ ```
17
+ images (K*H, W) ─┐
18
+ ├─> Estimator ──> coefficients
19
+ basis (K, P, M) ─┘ (L-BFGS-B, torch autodiff, random restarts)
20
+ ```
21
+
22
+ ## Inputs
23
+
24
+ - **images**: the K pictures of one sample v-stacked, shape `(K*H, W)` (array or
25
+ tensor). A 3D input `(n_samples, K*H, W)` fits every sample. Each picture is
26
+ normalised to max 1 internally; background subtraction / flips / cropping are
27
+ up to you, beforehand.
28
+ - **basis**: tensor `(K, n_pix, n_modes)` or a list of K tensors `(n_pix, n_modes)`.
29
+ `basis[k]` is the basis already transformed for picture k, `n_pix = H*W`
30
+ (C-order ravel of an `(H, W)` picture).
31
+
32
+ ```python
33
+ est = Estimator(basis, EstimationConfig(device="auto", n_restarts=10))
34
+ result = est.estimate(images) # dict: results, coeffs (n_restarts, M), best (M,)
35
+ ```
36
+
37
+ ## Helpers
38
+
39
+ - `make_hg_basis(N, (H, W), pixel_size, waist)` — fast HG basis. Separable 1D
40
+ recurrence + one batched product on the device; only modes with n+m<=N are built.
41
+ Returns `HGBasis(basis, ni, mi, N, shape)`.
42
+ - `transform_hg_basis(hg, phis)` — applies `exp(i(phi_x n + phi_y m))` per picture
43
+ → `(K, n_pix, n_modes)`. `phis` is K pairs `(phi_x, phi_y)`.
44
+ - `transform_basis(my_basis, hg, phis)` — same for a non-HG basis: project onto
45
+ `hg`, apply the phases, recombine. `hg`'s order must be high enough to
46
+ represent `my_basis`.
47
+ - `coeffs_to_matrix(coef, ni, mi, N)` — flat coefficients → `[n, m]` matrix.
48
+
49
+
50
+ ## Files
51
+
52
+ `pipeline.py` Estimator · `torch_engine.py` device + loss/grad · `hg_basis.py` ·
53
+ `lens_transform.py` · `config.py` · `examples/run_estimation.py`
@@ -0,0 +1,4 @@
1
+ astimator-0.0.1.dist-info/METADATA,sha256=rElElIrnpo3UtBeajghlC8mzCjaWL9G-LRxaiAtFrek,2129
2
+ astimator-0.0.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
3
+ astimator-0.0.1.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ astimator-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+