Skip to content

ENH:Expose PDF3DCalculator in Python bindings#88

Open
joeseaer wants to merge 3 commits into
diffpy:mainfrom
joeseaer:main
Open

ENH:Expose PDF3DCalculator in Python bindings#88
joeseaer wants to merge 3 commits into
diffpy:mainfrom
joeseaer:main

Conversation

@joeseaer

@joeseaer joeseaer commented Jul 5, 2026

Copy link
Copy Markdown

Hi @sbillinge @dragonyanglong ,

This PR exposes the new libdiffpy PDF3DCalculator through diffpy.srreal.

It adds the Boost.Python binding for PDF3DCalculator, NumPy accessors for the
3D PDF and radial histogram outputs, binary grid export, delta pair filtering,
pickle support, and Python-side property wrappers for the 3D calculator
attributes.

This PR depends on the companion libdiffpy PR that adds PDF3DCalculator and
its supporting C++ helpers.

@sbillinge sbillinge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are moving from boost to nanobind. This is on the nano branch which is what we should use as base branch.

Also, we will have to migrate the libdiffpy code also. Maybe merge the nano branch into 3DPDF branch?

@joeseaer

joeseaer commented Jul 8, 2026

Copy link
Copy Markdown
Author

Thanks Simon. I agree that this should move away from the Boost.Python wrapper path.

I checked the currently visible branches on diffpy/diffpy.srreal. I see migration-nano, but it still appears to use the existing Boost.Python binding code and I do not see nanobind usage there. Could you confirm the exact nano/nanobind branch or PR that I should use as the base?

Once the correct base is clear, I will prepare a clean PDF3DCalculator binding branch against that nanobind base, rather than continuing to extend the current Boost.Python wrapper in this PR. I will also keep this dependent on the companion libdiffpy PDF3DCalculator PR.

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