VV: Compute C Axis Locations fully V&V'ed#1679
Open
JDuffeyBQ wants to merge 9 commits into
Open
Conversation
35 tasks
imikejackson
self-requested a review
July 22, 2026 22:32
imikejackson
requested changes
Jul 22, 2026
imikejackson
left a comment
Contributor
There was a problem hiding this comment.
See comments for required changes.
Contributor
|
The core science checks out: I independently re-derived all 15 oracle fixtures by hand ( Deviations file / legacy comparison
Code paths
ReferenceFrameNotes.rst
V&V report cleanup
Tests / conventions
User documentation
Suggested mixed-phase TEST_CASE (validated on this branch)TEST_CASE("OrientationAnalysis::ComputeCAxisLocationsFilter: Class 1 Oracle - Mixed hexagonal and non-hexagonal phases", "[OrientationAnalysis][ComputeCAxisLocationsFilter]")
{
DataStructure dataStructure;
const usize size = k_Fixtures.size();
Float32Array* quats = UnitTest::CreateTestDataArray<float32>(dataStructure, "Quats", {size}, {4});
for(usize i = 0; i < size; i++)
{
for(usize j = 0; j < 4; j++)
{
quats->setComponent(i, j, k_Fixtures[i].inputQuat[j]);
}
}
UInt32Array* crystalStructures = UnitTest::CreateTestDataArray<uint32>(dataStructure, "CrystalStructures", {3}, {1});
crystalStructures->setValue(0, ebsdlib::CrystalStructure::UnknownCrystalStructure);
crystalStructures->setValue(1, ebsdlib::CrystalStructure::Hexagonal_High);
crystalStructures->setValue(2, ebsdlib::CrystalStructure::Cubic_High);
// Alternate hexagonal (phase 1) and cubic (phase 2) cells so a single execution exercises
// both the computed c-axis path and the non-hexagonal NaN path, and verifies the NaN
// branch does not disturb neighboring computed values.
Int32Array* phases = UnitTest::CreateTestDataArray<int32>(dataStructure, "Phases", {size}, {1});
for(usize i = 0; i < size; i++)
{
phases->setValue(i, i % 2 == 0 ? 1 : 2);
}
DataPath cAxisLocationsPath({"CAxisLocations"});
ComputeCAxisLocationsFilter filter;
Arguments args;
args.insertOrAssign(ComputeCAxisLocationsFilter::k_QuatsArrayPath_Key, std::make_any<DataPath>(std::vector<std::string>{"Quats"}));
args.insertOrAssign(ComputeCAxisLocationsFilter::k_CellPhasesArrayPath_Key, std::make_any<DataPath>(std::vector<std::string>{"Phases"}));
args.insertOrAssign(ComputeCAxisLocationsFilter::k_CrystalStructuresArrayPath_Key, std::make_any<DataPath>(std::vector<std::string>{"CrystalStructures"}));
args.insertOrAssign(ComputeCAxisLocationsFilter::k_CAxisLocationsArrayName_Key, std::make_any<std::string>(cAxisLocationsPath.getTargetName()));
auto preflightResult = filter.preflight(dataStructure, args);
SIMPLNX_RESULT_REQUIRE_VALID(preflightResult.outputActions);
auto executeResult = filter.execute(dataStructure, args);
SIMPLNX_RESULT_REQUIRE_VALID(executeResult.result);
REQUIRE(ContainsCode(executeResult.result.warnings(), -3523));
REQUIRE(dataStructure.containsData(cAxisLocationsPath));
auto& cAxisLocations = dataStructure.getDataRefAs<Float32Array>(cAxisLocationsPath);
for(usize i = 0; i < size; i++)
{
const bool isHexCell = i % 2 == 0;
for(usize j = 0; j < 3; j++)
{
INFO(fmt::format("i = {} | j = {} | phase = {} | input_quat = ({}) | expected_vec = ({})", i, j, phases->getValue(i), fmt::join(k_Fixtures[i].inputQuat, ", "),
fmt::join(k_Fixtures[i].expectedOutput, ", ")));
if(isHexCell)
{
REQUIRE(cAxisLocations.getComponent(i, j) == Approx(k_Fixtures[i].expectedOutput[j]));
}
else
{
REQUIRE(std::isnan(cAxisLocations.getComponent(i, j)));
}
}
}
}A/B reproduction details (mixed and all-non-hex runs vs 6.5.171)
|
Summary: * Confirmed no bugs (clean port) * Confirmed no deviations from DREAM3D 6.5.171 * Retired 2 tests * Retired circular oracle test * One test superceded by more specific test * Added Class 1 Oracle test * Test data files replaced with 15 inline test fixtures * Added V&V report, deviations * Added ReferenceFrameNotes.rst to help explain how the filter calculations rotations * Providence file is not necessary due to test archive being replaced by inline data Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
* Comparison pipelines and results are working evidence, not source-tree deliverables; the distilled numbers belong in the vv/deviations entries * Removes the ConvertOrientationsFilter pipelines and comparison report that should not have been committed Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
* Exercises the computed c-axis path and the non-hexagonal NaN path in a single execution using the 15 Class 1 Oracle quaternions with phases alternating Hexagonal_High / Cubic_High * Verifies hexagonal cells match the hand-derived oracle values, cubic cells are NaN-filled, and warning -3523 is emitted * Same inputs were used for the legacy 6.5.171 A/B comparison documenting the non-hexagonal behavioral deviations Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
imikejackson
force-pushed
the
vv/ComputeCAxisLocationsFilter
branch
from
July 23, 2026 01:11
19387ad to
acc31a4
Compare
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Naming Conventions
Naming of variables should descriptive where needed. Loop Control Variables can use
iif warranted. Most of these conventions are enforced through the clang-tidy and clang-format configuration files. See the filesimplnx/docs/Code_Style_Guide.mdfor a more in depth explanation.Filter Checklist
The help file
simplnx/docs/Porting_Filters.mdhas documentation to help you port or write new filters. At the top is a nice checklist of items that should be noted when porting a filter.Unit Testing
The idea of unit testing is to test the filter for proper execution and error handling. How many variations on a unit test each filter needs is entirely dependent on what the filter is doing. Generally, the variations can fall into a few categories:
Code Cleanup