Skip to content

Add de la Vallée Poussin kernel on SO(3)#926

Open
bnmajor wants to merge 1 commit into
masterfrom
texture-DeLaValleePoussinKernel
Open

Add de la Vallée Poussin kernel on SO(3)#926
bnmajor wants to merge 1 commit into
masterfrom
texture-DeLaValleePoussinKernel

Conversation

@bnmajor
Copy link
Copy Markdown
Collaborator

@bnmajor bnmajor commented Apr 22, 2026

Overview

Adds a de la Vallée Poussin kernel implementation on SO(3) for constructing smooth orientation distribution functions.

New modules:

  • SO3Kernel
  • DeLaValleePoussinKernel

New public API:

  • DeLaValleePoussinKernel(halfwidth: float) - constructor, halfwidth in radians
  • .eval(R1, R2) - evaluate kernel between rotation matrices
  • .eval_centered(R, center) - convenience wrapper for unimodal distributions
  • .misorientation_angle(R1, R2) - compute misorientation angle from 3×3 rotation matrices

Mathematical basis:
The kernel is defined as K(ω) = C · cos(ω/2)^(2κ), where C is a Beta-function normalization constant and κ is derived analytically from the halfwidth via κ = ln(0.5) / (2·ln(cos(h/2))).

Affected Workflows

N/A

Documentation Changes

User-facing documentation for the texture module will be added in the module integration PR once the full API is finalized.

Implements the radially symmetric kernel K(ω) = C · cos(ω/2)^(2κ)
with normalization constant C = B(3/2, 1/2) / B(3/2, κ + 1/2) and
shape parameter κ derived analytically from the half-width.

- Abstract SO3Kernel base class for rotation group kernels
- Concrete DeLaValleePoussinKernel with eval, eval_centered,
  and misorientation_angle methods

Signed-off-by: Brianna Major <brianna.major@kitware.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.48%. Comparing base (3029df0) to head (fd1dc01).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
hexrd/texture/kernels.py 87.50% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #926      +/-   ##
==========================================
+ Coverage   71.44%   71.48%   +0.03%     
==========================================
  Files         142      143       +1     
  Lines       21935    21983      +48     
==========================================
+ Hits        15672    15714      +42     
- Misses       6263     6269       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@psavery
Copy link
Copy Markdown
Collaborator

psavery commented May 6, 2026

To do:

  • move the texture directory inside the phase_transition directory
  • Add a simple test for running the __str__ and __repr__ functions
  • Keep in mind that for misorientation_angle, we may need to take into account crystal symmetry (depending on how it will be used), and misorientation in the rotations.py file may be able to work.

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.

2 participants