Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions Sources/CuboEmbedding/CuboEmbedding.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
1 change: 0 additions & 1 deletion Sources/CuboPtycho/CuboPtycho.docc/CuboPtycho.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ CPU ptychography preprocessing, probe construction and single-slice, mixed-state
### Supported scope

- <doc:Scope>
- ``CuboPtycho``
10 changes: 0 additions & 10 deletions Sources/CuboPtycho/CuboPtycho.swift

This file was deleted.

6 changes: 0 additions & 6 deletions Sources/CuboStrain/CuboStrain.swift

This file was deleted.

2 changes: 1 addition & 1 deletion docs/open-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
5 changes: 5 additions & 0 deletions tools/consumer-check/Sources/consumer-check/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) })
Expand Down
Loading