Skip to content

feat: expose March-Dollase preferred-orientation correction - #119

Merged
vincefn merged 1 commit into
diffpy:mainfrom
cadenmyers13:expose-march-dollase
Nov 2, 2026
Merged

vincefn merged 1 commit into
diffpy:mainfrom
cadenmyers13:expose-march-dollase

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

‼️PLEASE NOTE I DO NOT KNOW C++ AND THIS AND THE ISSUE ARE ENTIRELY CLAUDE GENERATED‼️

closes #118

Bind TextureMarchDollase in powderpatterndiffraction_ext.cpp and add PowderPatternDiffraction.GetTextureMarchDollase, which finds the component's texture object in its sub-object registry because ObjCryst++ has no public accessor. SetPhasePar sets values through the phase's RefinablePars, since ObjCryst++'s SetPhasePar does not click the texture clock and leaves the cached pattern stale. DeletePhase is not bound because libObjCryst does not define it.

Bind TextureMarchDollase in powderpatterndiffraction_ext.cpp and add
PowderPatternDiffraction.GetTextureMarchDollase, which finds the
component's texture object in its sub-object registry because ObjCryst++
has no public accessor. SetPhasePar sets values through the phase's
RefinablePars, since ObjCryst++'s SetPhasePar does not click the texture
clock and leaves the cached pattern stale. DeletePhase is not bound
because libObjCryst does not define it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cadenmyers13

Copy link
Copy Markdown
Contributor Author

I'm opening this PR because this is a feature I want exposed for a package I am working on

@sbillinge

Copy link
Copy Markdown
Contributor

@SYMSCAE, @vincefn , please could you check this?

@SYMSCAE

SYMSCAE commented Oct 28, 2026

Copy link
Copy Markdown

This LGTM.

@vincefn vincefn self-assigned this Oct 28, 2026
@vincefn

vincefn commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Looks good - the workaround for the texture cache should ideally be fixed first in objcryst, but we can accept the proposed workaround in the meantime.

@vincefn
vincefn merged commit 0786733 into diffpy:main Nov 2, 2026
5 checks passed
@cadenmyers13
cadenmyers13 deleted the expose-march-dollase branch November 2, 2026 14:13
@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@vincefn Thanks. Should we make an issue here to change this workaround when fixed in objcryst?

vincefn added a commit that referenced this pull request Nov 3, 2026
…obind (#122)

* feat: port March-Dollase texture (#119) and TOF profile (#120) to nanobind

- Bind TextureMarchDollase and PowderPatternDiffraction.GetTextureMarchDollase.
  SetPhasePar is bound directly (no RefinablePar workaround) since the
  objcryst submodule (ba6ca89, vincefn/objcryst#105) now clicks the texture
  clock; DeletePhase is also exposed.
- TextureMarchDollase has RefinableObj as a second (non-zero offset) base, so
  it is registered standalone with bind_refinableobj_forwarding and added to
  extractRefinableObjArg.
- Bind ReflectionProfileDoubleExponentialPseudoVoigt; SetProfile gives a TOF
  profile copy the crystal's unit cell.
- Port tests and news items, with extra DeletePhase tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit hooks

* ci: check out submodules and exclude vendored extern/ from pre-commit

- Pass submodules: 'true' to the scikit-package reusable workflows, so that
  extern/objcryst is available when building.
- Exclude extern/ (objcryst submodule, vendored cctbx and newmat) from
  pre-commit hooks.
- Remove duplicated test_lsq_compiled_refined_obj_erase_all_param_set (F811)
  and fix a typo flagged by codespell.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit hooks

* [pre-commit.ci] auto fixes from pre-commit hooks

* docs: keep inline code on one line so prettier output is stable

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* revert: restore vendored extern/ sources modified by pre-commit.ci autofix

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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.

feat: expose March-Dollase preferred-orientation correction (TextureMarchDollase) to Python

4 participants