Crystal Orientation in nBragg
Understanding Crystal Orientation
Crystal orientation is fundamental to Bragg edge neutron transmission analysis. Unlike polycrystalline materials where Bragg edges appear at fixed wavelengths regardless of orientation, single crystals produce Bragg dips whose positions depend critically on how the crystal is oriented relative to the neutron beam.
nBragg provides a straightforward framework for specifying crystal orientations while maintaining full compatibility with NCrystal’s underlying physics engine.
Quick Start
The simplest way to specify orientation in nBragg:
import nbragg
# Define crystal orientation
# [hkl]_z: Miller indices along beam direction (z-axis)
# [hkl]_y: Miller indices along y-axis
crystal = nbragg.Crystal(
material='Fe',
orientation_z=[0, 0, 1], # (001) plane perpendicular to beam
orientation_y=[0, 1, 0] # (010) plane along y-axis
)
Why Orientation Matters
- For Single Crystals
The position and intensity of Bragg dips in the transmission spectrum depend on the crystal’s orientation relative to the beam. Accurate orientation specification enables:
Texture analysis of materials
Strain/stress measurements via Bragg dip shifts
Crystallographic phase identification
Quantitative microstructure characterization
- For Polycrystals
While Bragg edges are orientation-independent, understanding orientation becomes crucial when analyzing:
Textured materials with preferred orientations
Transition from polycrystalline to single-crystal behavior
Orientation distribution functions (ODFs)
Coordinate System Convention
nBragg uses a fixed laboratory coordinate system to simplify orientation specification:
Incident beam: Always along the positive z-axis (\(\mathbf{k}_i \parallel +\mathbf{z}\))
Laboratory frame: Right-handed orthogonal system \((x, y, z)\)
Crystal frame: Defined by two reciprocal lattice vectors
This differs from NCrystal’s fully flexible approach but makes orientation specification more intuitive for neutron imaging experiments where the beam direction is typically fixed.
Note
This simplification does not limit the analysis - any crystal orientation can still be described using the two-vector specification method.
Documentation Structure
We provide three complementary resources:
Resource |
Best For |
Level |
|---|---|---|
Complete theory and detailed examples |
Beginner to Advanced |
|
Quick lookup during analysis |
Intermediate to Advanced |
|
../examples/orientation_examples |
Working Python code |
All Levels |
Getting Started
- New to crystal orientations?
Start with the basic-concept section of the Crystal Orientation in nBragg to understand the fundamentals.
- Experienced with crystallography?
Jump directly to the Crystal Orientation Quick Reference for equations and code snippets.
- Learning by doing?
Download and run ../examples/orientation_examples to see practical implementations.
Common Use Cases
Standard Cubic Orientation
Most common starting point:
orientation_z = [0, 0, 1] orientation_y = [0, 1, 0]
Rotated Crystal (Texture Analysis)
For textured samples:
orientation_z = [1, 1, 1] # {111} texture orientation_y = [1, -1, 0]
Fitting to Experimental Data
Refine orientation to match Bragg dip positions:
# Start with initial guess # Apply small rotations φ (x-axis) and θ (y-axis) # Minimize difference with experimental spectrum
Key Concepts
Before diving into the detailed documentation, familiarize yourself with these concepts:
- Miller Indices [hkl]
Describe crystal planes in reciprocal lattice space. The vector \(\mathbf{n}_{hkl}\) is perpendicular to the (hkl) crystal plane.
- Reciprocal Space
Orientation is specified using reciprocal lattice vectors, not real-space crystal axes. For cubic systems, these are parallel, but for other crystal systems they differ.
- Mosaicity
Real crystals have imperfections - crystal planes are spread over a range of orientations described by a Gaussian distribution with FWHM \(\eta\).
- Bragg Circles
At a given wavelength, neutrons satisfying the Bragg condition form a circle in reciprocal space. The crystal orientation determines if this circle intersects the crystal planes.
Mathematical Framework
The orientation is mathematically described by a rotation \(g \in SO(3)\) that maps the laboratory frame to the crystal frame:
where \(\alpha, \beta, \gamma\) are Euler angles in Matthies convention.
In practice, you specify this rotation implicitly through the two Miller index vectors [hkl]_z and [hkl]_y, which nBragg converts internally to the appropriate rotation.
See the Crystal Orientation in nBragg for complete mathematical details.
Next Steps
Read the theory: Crystal Orientation in nBragg
Try the examples: ../examples/orientation_examples
Keep the reference handy: Crystal Orientation Quick Reference
Apply to your data: See ../tutorials/bragg_dip_fitting
Additional Resources
NCrystal Documentation: For underlying physics implementation
Crystallography Primers: For Miller indices and reciprocal space basics
nBragg Tutorials: For complete analysis workflows
Questions?
If you encounter issues with orientation specification:
Check the troubleshooting-checklist in the quick reference
Verify orthogonality of your orientation vectors
Ensure Miller indices are appropriate for your crystal system
Review the examples for similar crystal systems
Contact the nBragg community via [your support channel]