ENH: ODF & MDF Generation support codes - #57
Open
imikejackson wants to merge 16 commits into
Open
imikejackson wants to merge 16 commits into
imikejackson wants to merge 16 commits into
Conversation
… count * Accumulate the reserved sample counts per folded misorientation bin instead of overwriting, so duplicate rows add up * Scale the reserved counts to the 10,000-sample budget when the weights sum past the MDF bin count; previously the random-sampling loop was skipped and the array summed to weight/binCount instead of 1 * Normalize by the actual total instead of the hard-coded budget * Document the multiples-of-random weight semantics and add TextureTest cases for a half-weight row, an overflowing row, duplicate rows, and empty weights Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Two defects made every ODF sample unreliable in the low-symmetry Laue classes. The ODF bin grid is a rectangular box that circumscribes the homochoric ball, so a large share of it holds no valid orientation. Homochoric::toAxisAngle recovers the rotation angle from a 16-term fit that is only valid out to the ball radius R1. Between R1 and 1.69247 the fit still returns a value inside the domain of acos, so the function succeeded and handed back a rotation angle above 180 degrees, which is not a valid axis-angle pair, with no diagnostic of any kind; beyond that it returned NaN. The NaN rate therefore understated the damage several times over. Measured invalid share against NaN rate: Triclinic 47.7 against 12.9 percent, Monoclinic 84.0 against 18.4, Tetragonal 4/m 29.9 against 3.8, Trigonal -3 22.4 against 2.3, Hexagonal 6/m 22.4 against 2.3. Separately, MonoclinicOps and CubicLowOps computed their ODF step as init/numBins/2 where the other nine classes use init/(numBins/2), a quarter of the intended value. _calcODFBin maps an orientation to a bin assuming the grid spans -init to +init, but the inverse then spanned only -init to -init/2, so the forward and inverse maps disagreed inside the same class and the grid never contained the origin. Monoclinic could not sample below roughly 140 degrees. determineEulerAngles now draws through a new deterministic in-ball sampler that redraws inside the chosen bin until the point is valid, seeded from the caller's own random triple and the bin indices so results stay reproducible, and falls back to a radial clamp for a bin with no valid volume. toAxisAngle clamps an out-of-range magnitude to R1 before evaluating the series and clamps the fitted value before acos, leaving the valid path untouched. The dead OrientationTransformation copy of the routine carries the same guard. After the fix every Laue class reports a 0.00 percent non-finite rate, the conversion sweep returns no angle above 180 degrees against 326 before, and grid round-trip agreement rises from 0.33 to 47.5 percent for Monoclinic and from 0.00 to 23.9 for Cubic m-3, both inside the band their peers occupy. Two regression tests cover the sampler and the conversion domain. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
…F sampling * LaueOps::randomizeEulerAngles and getRandomSymmetryOperatorIndex gain overloads that draw from a caller-supplied std::mt19937_64, implemented once in the base class through getNumSymOps and getQuatSymOp; every subclass re-exposes the hidden base overload with a using-declaration * Texture::CalculateMDFData and StatsGen::GenMDFPlotData gain the same overload; the existing signatures keep their per-call clock seeding and delegate, so current callers see no behavior change * Callers that hold a seed can now make symmetry-equivalent orientation selection and the 10,000-pair MDF background sample reproducible * Tests cover same-seed reproducibility, symmetry equivalence and full operator coverage across all 11 Laue classes, and MDF normalization Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Remove the duplicate operator retained after AxisOrthoRhombic was retired. Return one entry for each of the eleven crystal structures. Update count assertions, preserve all fundamental-zone reference rows, and correct stale duplicate-entry comments. Validation: Release build, 413/413 CTest tests, and clang-format 19.1.1. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
…backs * Store each Laue class's ODF grid origin and step in the LaueOps base so bin geometry can be queried without re-deriving it in every sampler * Add odfBinInBallFraction() and isOdfBinReachable(): exact corner bounds decide bins fully inside or outside the homochoric ball, and a fixed 6x6x6 sub-grid estimates the fraction of boundary bins * Raise the in-ball rejection sampler to 4096 redraws and count every radial clamp fallback through clampFallbackCount(), so callers can prove that a random texture never lands on the ball surface Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
* CalculateODFData spread the random-texture baseline over every bin of the homochoric grid, including bins that hold no valid orientation. Sampling those bins fell through to the radial clamp and returned 180 degree rotations: one draw in five for Hexagonal 6/m and nearly half for Triclinic, visible as a spot at the centre of the (0001) pole figure and as a skewed random texture in Match Crystallography * Distribute the baseline in proportion to odfBinInBallFraction() and renormalize, which is the uniform orientation measure in homochoric space. Grids entirely inside the ball keep their previous arithmetic bit for bit, so Cubic m-3m and Hexagonal 6/mmm results are unchanged * Tests: bin fractions match a Monte Carlo estimate, unreachable bins carry zero weight, and 200k draws per Laue class trigger zero clamp fallbacks Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Reserve a measured gutter for vertical titles and numeric labels. Select labels from rendered widths with endpoint padding while retaining all tick hashes. Verify composed glyphs and bounds at three panel sizes. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
* Compile canvas_ity directly into the unit-test executable * Resolve Windows linker errors from compositor tests that use canvas directly * Keep third-party canvas symbols out of the EbsdLib public DLL interface Signed-off-by: Michael Jackson <mike.jackson@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.
No description provided.