Releases: bjheinen/LiquidDiffract
LiquidDiffract v1.2.5
Patch release to fix crashing bug in v1.2.4 when using Qt6
v1.2.4 Release Notes:
Major Changes
-
Compute χ2 Map Toolbox
This new toolbox allows the user to compute a map of χ2 from the data and two chosen parameters.
Options are:- ρ
- b (background scaling factor)
- rmin
- No. iterations
Options for setting parameter, normalising χ2, and plotting the data are provided.
Computed data can be saved or the plot directly exported as an image. -
Optional corrections for self-shielding attenuation factor
Optional corrections for self-shielding presuming a slab-type geometry can be made in the Background Subtraction tab. More complex geometries (e.g. cylindrical, including a container, etc.) may be added if there is demand. -
Support for Qt 6 via qtpy
This gives support for all major Qt bindings (PyQt5, PyQt6, PySide2 and PySide6). PyQt6 preferred over PySide6.
Minor Changes
- Option to plot self-scattering/compton scattering to compare against I(Q) in the data/optimisation UI
- Automatic plotting of αI(Q) to compare with f(Q)
- Optional zero-shift corrections in background subtraction tab
- Rebinned I(Q) data is now filled with I(Qmin) at 0 <= Q < Qmin
- Auto rebinning when data and background have different ranges or step sizes
- More robust peak search for finding integration limits in structural information tab
- Refactored form factor / average scattering functions for memory efficiency and speed.
Creation of large arrays for compositions with many components is now avoided. - Support for user input of fractional chemical compositions added for Faber-Ziman method. This avoids users having to multiply their formulae to get integer number of atoms. Ashcroft-Langreth structure factors set to only support molecular compositions.
(fixes issue #1) - Minor improvements to user interface, including logic, optimisations, and bugfixes
- Minor optimisations to core modules
Bug Fixes
- Removed non-implemented chemical species
- Fixed breaking bug in 2θ to Q conversion toolbox
- Updated usage of code deprecated in dependencies
- Fixed small errors in LiquidDiffract/scripts/
- Fixed rebinning errors when raw data has nans
- Minor bugfixes in core modules
Development Changes
- A changelog
- Unit tests / functional tests for core module.
runpython -m unittest discover ./tests - v
- Unit tests run remotely on push to develop branch via github actions.
Test matrix of:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - Deprecated support for python < 3.8
Python 3.8 support maintained via importlib_resources. Support will be dropped in next release.
LiquidDiffract v1.2.4
Major Changes
-
Compute χ2 Map Toolbox
This new toolbox allows the user to compute a map of χ2 from the data and two chosen parameters.
Options are:- ρ
- b (background scaling factor)
- rmin
- No. iterations
Options for setting parameter, normalising χ2, and plotting the data are provided.
Computed data can be saved or the plot directly exported as an image. -
Optional corrections for self-shielding attenuation factor
Optional corrections for self-shielding presuming a slab-type geometry can be made in the Background Subtraction tab. More complex geometries (e.g. cylindrical, including a container, etc.) may be added if there is demand. -
Support for Qt 6 via qtpy
This gives support for all major Qt bindings (PyQt5, PyQt6, PySide2 and PySide6). PyQt6 preferred over PySide6.
Minor Changes
- Option to plot self-scattering/compton scattering to compare against I(Q) in the data/optimisation UI
- Automatic plotting of αI(Q) to compare with f(Q)
- Optional zero-shift corrections in background subtraction tab
- Rebinned I(Q) data is now filled with I(Qmin) at 0 <= Q < Qmin
- Auto rebinning when data and background have different ranges or step sizes
- More robust peak search for finding integration limits in structural information tab
- Refactored form factor / average scattering functions for memory efficiency and speed.
Creation of large arrays for compositions with many components is now avoided. - Support for user input of fractional chemical compositions added for Faber-Ziman method. This avoids users having to multiply their formulae to get integer number of atoms. Ashcroft-Langreth structure factors set to only support molecular compositions.
(fixes issue #1) - Minor improvements to user interface, including logic, optimisations, and bugfixes
- Minor optimisations to core modules
Bug Fixes
- Removed non-implemented chemical species
- Fixed breaking bug in 2θ to Q conversion toolbox
- Updated usage of code deprecated in dependencies
- Fixed small errors in LiquidDiffract/scripts/
- Fixed rebinning errors when raw data has nans
- Minor bugfixes in core modules
Development Changes
- A changelog
- Unit tests / functional tests for core module.
runpython -m unittest discover ./tests - v
- Unit tests run remotely on push to develop branch via github actions.
Test matrix of:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - Deprecated support for python < 3.8
Python 3.8 support maintained via importlib_resources. Support will be dropped in next release.
LiquidDiffract v1.1.12
Bug Fixes
-
Fixed a breaking bug due to the deprecation of np.float/np.int/np.str etc. as of numpy v1.20.0 in favour of built-in types.
-
Fixed some possible buggy behaviour in user inputs
Minor Changes
-
An option has been added to plot log(I(Q)) in the background subtraction tab to make small differences between the measured and background I(Q) more obvious
-
Added a prompt to select a file header when a file load error occurs.
LiquidDiffract v1.1.11
Patch release to fix errors in tabulated Compton scattering data
- The data in LiquidDiffract/LiquidDiffract/resources/hubbel_compton/ was incorrect for several elements due to a filename issue. Some filenames dropped a character and overwrote data for elements with single-character symbols. The affected elements were C, F, N, P, and S, and data for Ac, Am, Cm, Fm, Np, Pm, Sc, Tc, and Tm were missing. Using Hg resulted in a (crashing) error due to a mislabeling as hg. Data has been corrected for all elements and now matches the human-readable tabulations in LiquidDiffract/LiquidDiffract/resources/human_readable/hubbel_compton/
LiquidDiffract v1.1.10
Patch release to fix minor (but crashing) bug in v1.1.9 when using Python v>=3.10
- LiquidDiffract/gui/optim_ui.py line 705: setResizeMode --> setSectionResizeMode
The QHeaderView attribute setResizeMode is deprecated in PyQt5 and causes an AttributeError in some version combinations of PyQt5 and Python. setSectionResizeMode replaces it and is compatible with all versions.
LiquidDiffract v1.1.9
Major Changes
-
Background refinement
The background scaling factor (b) can now be refined alongside the density in the Refinement Tab
Background refinement is optional and can be done independently from or simultaneously with density refinement.
The background scaling factor set in the Background Subtraction Tab is used as the initial estimate by the solver.
The figure of merit is redefined to take into account the background scaling - Χ^2(ρ;b) -
LiquidDIffraction publication
There is now a paper describing LiquidDiffract:
Heinen, B. J., & Drewitt, J. W. (2022). LiquidDiffract: Software for liquid total scattering analysis. Physics and Chemistry of Minerals, 49:9. doi:10.1007/s00269-022-01186-6
Please cite this paper if you use LiquidDiffraction in your work!
Minor Changes
- LiquidDiffract.core.core now uses a separate objective function for density and/or background refinement - core.refinement_objfun.
As a result, the arguments taken by core.calc_impr_interference_function have been redefined. The docs and example scripts have been updated to reflect this. - Fixed some documentation issues and removed some dead code
LiquidDiffract v1.1.8
Major Changes
- Gaussian fitting toolbox
The calculation of the x-ray weighting factors for partial pair correlations used by the curve-fitting toolbox has been altered slightly. The default behaviour is now to calculate the WKM approximation for the effective atomic number of each species, K_p, at Q=0. The previous behaviour of calculating the average K_p across the whole Q-range of the data is still available by selecting the option in the Additional Preferences dialog. However, this option may lead to unphysical results for some sample if the Q-range is >~10, as the x-ray weights are affected by the Q-range.
Minor Changes
- Fixed a bug in the gaussian fitting toolbox where the plot view reset when the first peak was added
LiquidDiffract v1.1.7
Major Changes
-
The Structural Information Tab
This new tab provides functionality to extract information on average bond lengths and coordination number from the calculated RDF(r) and/or T(r) functions.There are two toolboxes provided:
- An Integration Toolbox: Integrate over the first peak in the RDF(r) or T(r) to estimate the bond-length and average coordination number of the first coordination shell for monatomic samples. Three different methods of calculating the coordination number are provided. The limits can be set manually, but there is also an auto-find feature to automatically refine the integration limits using optimisation/root-finding routines.
- A Curve-fitting Toolbox: Fit an arbitrary number of gaussian-type peaks to the RDF(r) or T(r) to estimate bond lengths and coordination numbers of correlated atomic pairs in polyatomic samples. X-ray weighting factors are applied automatically and the bond length and coordination number are actual fitting parameters. Any combination of individual peaks or parameters can be fixed or refined during the fit. There is also an optional skewness parameter to fit a skew-normal distribution that can be toggled for any peak.
-
Fixed several bugs in the calculation of the S(Q) and g(r) for polyatomic samples
-
LiquidDiffract is now distributed on PyPI
Minor Changes
- Added an option to calculate PDF functions directly without refining the g(r) / S(Q)
- Added an option to load data in nm-1
- Added an option to plot re-scaled Ashcroft-Langreth functions
- Added an option to use a modification function in the iterative refinement procedure
- Added a button to copy the refined value of ρ to the inital value input
- Faber-Ziman formalism is now the default
- The composition table is now scroll-able and easier to use
- Fixed several minor bugs in the GUI
- Fixed several Qt garbage collection errors when running LiquidDiffract on Windows
- Simplified the iterative refinement procedure in the code
- Changed references to the differential correlation function from F(r) to D(r) to be more consistent with the literature
- Updated the documentation
LiquidDiffract v1.0.0
Initial release/major version - LiquidDiffract v1.0.0