Skip to content

Commit 7719550

Browse files
committed
VV: Compute Kernel Average Misorientations fully V&V'ed
Summary: - Confirmed no SIMPLNX-side bugs (legacy D2 inner-x-loop typo was corrected at port time); - documented 2 deviations from DREAM3D 6.5.171 (D1 EbsdLib 2.4.1 precision, D2 legacy kernel-bound typo); - retired 1 test (circular-oracle exemplar consumer regenerated from pre-EbsdLib-2.4.1 SIMPLNX output); - unit tests replaced with 5 inlined *Class 1 (Analytical) + Class 4 (Invariant)* test fixtures; - added 3 V&V source-tree deliverables (report, deviations, provenance); - fixed user-facing doc (pipeline-name typo, dropped orphan MassifPipeline reference, added EBSD_File_Processing examples).
1 parent b0b1093 commit 7719550

7 files changed

Lines changed: 754 additions & 57 deletions

src/Plugins/OrientationAnalysis/docs/ComputeKernelAvgMisorientationsFilter.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ This **Filter** determines the Kernel Average Misorientation (KAM) for each **Ce
1111
1. Calculate the misorientation angle between each **Cell** in a kernel and the central **Cell** of the kernel
1212
2. Average all of the misorientations for the kernel and store at the central **Cell**
1313

14-
The calculation will **not** consider cells that belong to different 'feature Ids', ie.e, different grains.
14+
The calculation will **not** consider cells that belong to different 'feature Ids', i.e., different grains.
1515

1616
*Note:* All **Cells** in the kernel are weighted equally during the averaging, though they are not equidistant from the central **Cell**.
1717

1818
% Auto generated parameter table will be inserted here
1919

2020
## Example Pipelines
2121

22-
+ MassifPipeline
23-
+ (05) SmallIN100 Crystallographic Statistics
22+
+ (04) Small IN100 Crystallographic Statistics
23+
+ EBSD_File_Processing/aptr12_Analysis
24+
+ EBSD_File_Processing/avtr12_Analysis
2425

2526
## License & Copyright
2627

src/Plugins/OrientationAnalysis/test/ComputeFeatureNeighborMisorientationsTest.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ inline const Float32Array& GetOutputAvgMisorientations(const DataStructure& ds)
135135
{
136136
return ds.getDataRefAs<Float32Array>(k_FeatureDataPath.createChildPath(k_AvgMisorientationsOutName));
137137
}
138-
} // namespace ToyFixtures
138+
} // namespace DataFixtures
139139

140140
// Retired 2026-06-02 (V&V cycle): the main exemplar-comparison TEST_CASE that consumed
141141
// `6_6_stats_test_v2.tar.gz` and the `[.][UNIMPLEMENTED][!mayfail]` stub TEST_CASE for
@@ -200,8 +200,7 @@ TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: SIM
200200
// Closed-form: pure phi1 rotations about z, cubic 4-fold doesn't reduce phi1 in [0, 45deg], so
201201
// misorientation between (0deg) and (5deg) is 5.0deg; between (0deg) and (10deg) is 10.0deg.
202202
// Expected avg = (5 + 10) / 2 = 7.5deg.
203-
TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Class 1 - Single Phase Two Neighbors",
204-
"[OrientationAnalysis][ComputeFeatureNeighborMisorientationsFilter]")
203+
TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Class 1 - Single Phase Two Neighbors", "[OrientationAnalysis][ComputeFeatureNeighborMisorientationsFilter]")
205204
{
206205
UnitTest::LoadPlugins();
207206
DataFixtures::ToyData td = DataFixtures::CreateScaffold(/*numFeatures=*/4, /*numCrystalStructures=*/2);
@@ -284,8 +283,7 @@ TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Cla
284283
// Bug doesn't fire in this ordering because the decrement at algorithm.cpp:90 is the last write
285284
// to tempMisoList (no subsequent inner-loop iteration to clobber it). Both buggy and fixed code
286285
// produce avg = (5 + 10) / 2 = 7.5deg.
287-
TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Class 1 - Mismatch Last Order",
288-
"[OrientationAnalysis][ComputeFeatureNeighborMisorientationsFilter]")
286+
TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Class 1 - Mismatch Last Order", "[OrientationAnalysis][ComputeFeatureNeighborMisorientationsFilter]")
289287
{
290288
UnitTest::LoadPlugins();
291289
DataFixtures::ToyData td = DataFixtures::CreateScaffold(/*numFeatures=*/5, /*numCrystalStructures=*/3);
@@ -321,8 +319,7 @@ TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Cla
321319
// (no specific avg value), so this test catches a future regression that preserves specific values
322320
// but breaks the invariants. Use a different neighbor order from Fixture B so we sample a different
323321
// path through the per-feature loop.
324-
TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Class 4 - Invariants",
325-
"[OrientationAnalysis][ComputeFeatureNeighborMisorientationsFilter]")
322+
TEST_CASE("OrientationAnalysis::ComputeFeatureNeighborMisorientationsFilter: Class 4 - Invariants", "[OrientationAnalysis][ComputeFeatureNeighborMisorientationsFilter]")
326323
{
327324
UnitTest::LoadPlugins();
328325
DataFixtures::ToyData td = DataFixtures::CreateScaffold(/*numFeatures=*/5, /*numCrystalStructures=*/3);

src/Plugins/OrientationAnalysis/test/ComputeFeatureReferenceMisorientationsTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ inline void AssertClass4Invariants(const DataStructure& ds, bool isMode1)
232232
}
233233
}
234234

235-
} // namespace ToyFixtures
235+
} // namespace DataFixtures
236236

237237
// Retired 2026-06-01 (V&V cycle): the legacy anonymous namespace of array name constants and
238238
// the two TEST_CASEs `_AverageMisorientation` and `_EuclideanDistance` that consumed the

0 commit comments

Comments
 (0)