diff --git a/Sources/CuboEmbedding/CuboEmbedding.swift b/Sources/CuboEmbedding/CuboEmbedding.swift index e79118f..67407a8 100644 --- a/Sources/CuboEmbedding/CuboEmbedding.swift +++ b/Sources/CuboEmbedding/CuboEmbedding.swift @@ -1,14 +1,7 @@ import Foundation -/// PCA, k-means and the diffraction-pattern featurisation behind them. -/// -/// The primary entry points follow scikit-learn 1.4.2 (``PCA/Variant/scikitLearn``, ``KMeans/fit(_:rows:columns:initialCentroids:maxIterations:tolerance:isCancelled:)``). -/// The numerics of mac4DSTEM's diffraction-embedding pipeline are separate, explicitly named options. -public enum CuboEmbedding { - /// What this module computes. - @available(*, deprecated, message: "scope carries no information and will be removed") - public static let scope = "PCA (scikit-learn and mac4DSTEM covariance variants), Lloyd k-means (scikit-learn and mac4DSTEM k-means++ variants), binned diffraction feature vectors, and py4DSTEM's Featurization (scikit-learn NMF and Gaussian mixtures, NumPy RandomState)." -} +// PCA, k-means and the diffraction-pattern featurisation behind them. The primary entry points follow scikit-learn 1.4.2; +// the numerics of mac4DSTEM's diffraction-embedding pipeline are separate, explicitly named options. /// Why an embedding computation was refused. public enum EmbeddingError: Error, Sendable, Equatable, CustomStringConvertible { diff --git a/Sources/CuboPtycho/CuboPtycho.docc/CuboPtycho.md b/Sources/CuboPtycho/CuboPtycho.docc/CuboPtycho.md index 0876f32..030ab18 100644 --- a/Sources/CuboPtycho/CuboPtycho.docc/CuboPtycho.md +++ b/Sources/CuboPtycho/CuboPtycho.docc/CuboPtycho.md @@ -24,4 +24,3 @@ CPU ptychography preprocessing, probe construction and single-slice, mixed-state ### Supported scope - -- ``CuboPtycho`` diff --git a/Sources/CuboPtycho/CuboPtycho.swift b/Sources/CuboPtycho/CuboPtycho.swift deleted file mode 100644 index 670c6a8..0000000 --- a/Sources/CuboPtycho/CuboPtycho.swift +++ /dev/null @@ -1,10 +0,0 @@ -// CPU ptychography preprocessing, probe construction and single-slice, mixed-state and multislice reconstruction. - -import CuboCore - -/// The numerical algorithms currently available in this module. -public enum CuboPtycho { - /// Preprocessing, probe construction and the CPU single-slice, mixed-state and multislice engines. - @available(*, deprecated, message: "scope carries no information and will be removed") - public static let scope = "Preprocessing (amplitudes, scan positions, object canvas, starting probe), probe construction and CPU single-slice, mixed-state and multislice ptychography; full batches; probe-centre, probe-amplitude, aperture and support constraints; py4DSTEM's error normalisation; position correction (single-slice)." -} diff --git a/Sources/CuboStrain/CuboStrain.swift b/Sources/CuboStrain/CuboStrain.swift deleted file mode 100644 index 2ef1acc..0000000 --- a/Sources/CuboStrain/CuboStrain.swift +++ /dev/null @@ -1,6 +0,0 @@ -/// CPU strain maps from indexed Bragg vectors. -public enum CuboStrain { - /// Supported numerical scope. - @available(*, deprecated, message: "scope carries no information and will be removed") - public static let scope = "Basis selection, intensity-weighted lattice fits, reference lattices and strain tensors; the Bragg-vector histogram and the scan-level strain map." -} diff --git a/docs/open-items.md b/docs/open-items.md index 69e459d..878aed9 100644 --- a/docs/open-items.md +++ b/docs/open-items.md @@ -11,7 +11,7 @@ Slower than py4DSTEM at the typical size (100 x 100 x 64 x 64, Float32); the num Missing, in the order the study needs them (`docs/parity.md`, "study" rows): -- The app asks that remain: a vDSP-backed shifter for padded parallax sizes, names that clash with module names. The +- The app asks that remain: a vDSP-backed shifter for padded parallax sizes. The hot-pixel mean stays Float32 on purpose (`HotPixelFilter` documents why). - A single `reconstruct` for parallax; ptychography probe constraints, mixed-state and multislice engines. diff --git a/tools/consumer-check/Sources/consumer-check/main.swift b/tools/consumer-check/Sources/consumer-check/main.swift index 0a078ee..830b460 100644 --- a/tools/consumer-check/Sources/consumer-check/main.swift +++ b/tools/consumer-check/Sources/consumer-check/main.swift @@ -471,6 +471,11 @@ check("SyntheticProbe.make is 1/2 on the radius, near 1 inside and near 0 outsid let pixelCentred = try SyntheticProbe.make(radius: 5, width: 2, detectorRows: 31, detectorColumns: 31, centre: (row: 15, column: 15)) check("SyntheticProbe.make with a pixel centre peaks on that pixel", pixelCentred[15, 20] == 0.5 && pixelCentred[15, 10] == 0.5 && pixelCentred[10, 15] == 0.5) +// No type shares its module's name, so module-qualified names resolve to the module. +check("module-qualified names (CuboStrain., CuboPtycho., CuboEmbedding.)", + ObjectIdentifier(CuboStrain.LatticeStrain.self) == ObjectIdentifier(LatticeStrain.self) + && ObjectIdentifier(CuboPtycho.PtychographyError.self) == ObjectIdentifier(PtychographyError.self) + && ObjectIdentifier(CuboEmbedding.PCA.self) == ObjectIdentifier(PCA.self)) check("FloatFFT2D.supports", FloatFFT2D.supports(rows: 64, columns: 48) && !FloatFFT2D.supports(rows: 7, columns: 64)) check("SyntheticProbe.make: a zero width is invalidInput", await isInvalidInput { _ = try SyntheticProbe.make(radius: 5, width: 0, detectorRows: 32, detectorColumns: 32) })