Skip to content

Add preferred-orientation (March–Dollase) correction for textured powder samples#200

Merged
AndrewSazonov merged 35 commits into
developfrom
preferred-orientation-category
Jun 11, 2026
Merged

Add preferred-orientation (March–Dollase) correction for textured powder samples#200
AndrewSazonov merged 35 commits into
developfrom
preferred-orientation-category

Conversation

@AndrewSazonov

Copy link
Copy Markdown
Member

Powder samples whose crystallites pack with a preferred orientation — platy or needle-like grains — no longer have to be modelled as ideal random powders. You can now add a March–Dollase preferred-orientation correction to each phase of a constant-wavelength Bragg neutron experiment: set the March coefficient and a crystallographic direction, optionally a random-fraction term, then refine them alongside the scale to improve the fit. The setting is saved to and restored from your project CIF and appears in the IUCr-aligned report. Corrections run on the CrysPy engine, and a new cross-engine verification example built on the LBCO dataset demonstrates that the refined result reproduces the equivalent FullProf March–Dollase correction.

@AndrewSazonov AndrewSazonov added the [scope] enhancement Adds/improves features (major.MINOR.patch) label Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.07692% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.26%. Comparing base (beba720) to head (680fdea).

Files with missing lines Patch % Lines
src/easydiffraction/analysis/calculators/cryspy.py 73.52% 4 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #200      +/-   ##
===========================================
+ Coverage    90.22%   90.26%   +0.03%     
===========================================
  Files          271      274       +3     
  Lines        23273    23403     +130     
  Branches      2718     2729      +11     
===========================================
+ Hits         20999    21124     +125     
+ Misses        1707     1705       -2     
- Partials       567      574       +7     
Flag Coverage Δ
unittests 90.26% <93.07%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ocks/experiment/categories/pref_orient/__init__.py 100.00% <100.00%> (ø)
...locks/experiment/categories/pref_orient/default.py 100.00% <100.00%> (ø)
...locks/experiment/categories/pref_orient/factory.py 100.00% <100.00%> (ø)
...easydiffraction/datablocks/experiment/item/base.py 95.83% <ø> (ø)
...diffraction/datablocks/experiment/item/bragg_pd.py 95.23% <100.00%> (+0.30%) ⬆️
src/easydiffraction/io/cif/iucr_writer.py 96.51% <100.00%> (+0.06%) ⬆️
src/easydiffraction/analysis/calculators/cryspy.py 45.28% <73.52%> (+2.47%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndrewSazonov AndrewSazonov merged commit be00bc7 into develop Jun 11, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant