Skip to content

Texture unimodal odf#941

Draft
bnmajor wants to merge 2 commits into
texture-UniformODFfrom
texture-UnimodalODF
Draft

Texture unimodal odf#941
bnmajor wants to merge 2 commits into
texture-UniformODFfrom
texture-UnimodalODF

Conversation

@bnmajor
Copy link
Copy Markdown
Collaborator

@bnmajor bnmajor commented Jun 4, 2026

Overview

  • Adds the UnimodalODF class and a shared ODF evaluation layer to hexrd.phase_transition.texture
  • This branch stacks on the kernel and UniformODF branches

What's new

  • unimodal_odf.py: kernel-based ODF with one or more modal orientations and optional weights, f(g) = Σᵢ wᵢ K(g, g₀ᵢ) with Σ wᵢ = 1. Because the de la Vallée Poussin kernel integrates to mean 1 over SO(3), the weighted sum is already a valid ODF in MRD units
  • Symmetry is owned solely by the kernel. UnimodalODF takes no symmetry arguments; it delegates crystal_symmetry/sample_symmetry to its kernel
  • Added a TODO(perf) at the symmetry-reduced misorientation loop: it calls rotations.misorientation once per orientation and is ~1400× slower than the no-symmetry path; vectorization is deferred to the texture-normalization branch.
    • New test_unimodal_odf.py: construction (single/multi-modal, weights), symmetry delegation to the kernel, MRD normalization via a Monte-Carlo mean ≈ 1.0 check, estimated_max_value, getters-return-copies, repr/str
  • New test_evaluation.py: real ODFs through the public package path
  • test_delavalleepoussin_kernel.py: symmetry-label property tests and test_trivial_symmetry_takes_fast_path regression test

Affected Workflows

  • Additive only - no existing public APIs change.
  • Anyone building or evaluating ODFs in the phase-transition texture module.

Documentation Changes

None.

Depends on #939

bnmajor added 2 commits June 3, 2026 15:26
Core Functions:
- validate_orientations(): Input validation for orientation matrices
- eval_odf(): Unified evaluation interface for any ODF object
- eval_odf_batch(): Memory-efficient processing of large orientation datasets
- eval_at_identity(): Convenience function for identity orientation evaluation
- eval_random_orientations(): Random orientation generation with proper rotation matrices

Signed-off-by: Brianna Major <brianna.major@kitware.com>
Implement basic unimodal orientation distribution function representing textured materials with
preferred orientations using kernel functions.

Signed-off-by: Brianna Major <brianna.major@kitware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant