-
Notifications
You must be signed in to change notification settings - Fork 0
Basic PDF calculator #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fixed path to example gr file
added a way to set additional attributes on a Component. Modified the PDF instrument param class accordingly
Tried installing diffpy.pdffit2==0.0.2 from https://easyscience.github.io/pypi, but ran into runtime errors when using it in a Python 3.12 virtual environment on macOS 14 (Apple Silicon):
Gives:
This suggests the GSL shared library isn’t found at runtime, or it’s not properly linked during packaging. I installed GSL with Checked the dynamic libraries with:
Output:
No GSL dependency listed here — looks like it wasn’t linked into the ‘.so’. So it’s likely a packaging/build issue with diffpy.pdffit2==0.0.2. I then uninstalled that version and accidentally let pip install the default one (diffpy.pdffit2==1.5.1 from PyPI). Surprisingly, it worked - I was able to run the example and see both measured and calculated patterns (see screenshot) 😁🤔 Just to confirm: is this the expected plot? |
re-enable fitting in the pdf example
Holy cow! Indeed! PDFFIT2 is now available as binary distribution on pypi, as of Feb 7, 2025. |
I’ve made some updates to the code - mainly extending the plotting functionality and doing a bit of intermediate refactoring to improve clarity. I also replaced the existing PDF analysis example with two others that provide a better quality of fit. That said, some PDF-specific parameters are currently defined in the Instrument class but should eventually be moved to the Peak class. Before making that change, though, we need a broader set of PDF examples using Diffpy. In particular, we’re still missing examples for constant-wavelength and time-of-flight neutron diffraction. So far, we only have an X-ray-based case. Getting at least one example for each type will help us understand what additional parameters or adjustments might be needed - especially for DREAM. |
Functional tests now fail with
|
* attempt to install cblas on the windows runner * use s-weigand action * install requirements into the conda virtenv * added note in README.md
Removed the Al2O3 example for now, as it requires additional work to achieve a proper fit.
This adds the PDF functionality to the new EDL.
Unfortunately, the built-in charts don't work with the PDF data so I had to reimplement bokeh plotting for the included example.