ENH:Add 3D PDF calculator support#49
Conversation
Need this for develop mode building
docs: add development instructions for compiling source code
sbillinge
left a comment
There was a problem hiding this comment.
I didn't see any tests. Are there tests?
Can we also try and think about if it makes sense to make shared functions for anything to avoid copy-paying code from the PDF calculator? The more we can separate into shared functions the less duplication we have to maintain in the future
| * | ||
| * libdiffpy by DANSE Diffraction group | ||
| * Simon J. L. Billinge | ||
| * (c) 2009 The Trustees of Columbia University |
There was a problem hiding this comment.
Please fix date and address. I am not sure we actually need this text block any more as we do the copyright and attribution differently do maybe just delete the whole block?
|
Thanks Simon. I updated the PR to address these review comments. I removed the copied legacy copyright/header blocks from the new I also refactored the shared structure-factor and normalization logic so The 3D grid deposition, spherical q-window, and delta-shell preprocessing remain I verified the updated libdiffpy build locally with scons -j2. |
|
This is great. Thanks. Please can you paste the results of running tests locally? Also, possibly on a new branch, please could you try and merge |
|
@joeseaer any updates on this? |
|
Sorry for the delayed update. This was tested on WSL2 Ubuntu 24.04 with GCC 13.3.0, Python 3.12.3, Boost 1.83.0, GSL 2.7.1, and libobjcryst 2022.1.4. I am now reviewing the work on migration-nano and confirming the integration details and required code changes with Rundong. Once that work is complete, I will push the integrated changes to a branch based on migration-nano and update this PR to target that branch. |
|
Hi Simon @sbillinge , renaming work is finished. After you or Rundong create a |
|
If the plan sounds good to you, please close this PR, no merging needed. We will make a new PR to the new migration branch. |
I am a little unclear on the request here. |
I can update the base branch of this PR so you may not need to redo the PR, though you may want to is you build a new branch from that new base. Just let me know what you decide. I will leave it open for now |
Hi @sbillinge @dragonyanglong ,
This PR adds a CPU PDF3DCalculator implementation to libdiffpy. The calculator
produces 3D real-space PDF data on a cubic grid, exposes radial histogram data,
supports binary dense-grid export, q-window post-processing, rho0 background
scaling, and 3D covariance delta controls.
It also includes the small supporting changes needed by the calculator:
a symmetric 3x3 eigen-solver helper in R3linalg, a PDFCalculator helper for
partial PDF scale, and an ObjCryst translation-vector type compatibility fix
for builds where ObjCryst::REAL is double.
I tested the libdiffpy build locally with ObjCryst/GSL/Boost available.