From 7aae60f87b5e8dea2fa423db883f59c3ed9f0146 Mon Sep 17 00:00:00 2001 From: Kevin Dalton Date: Tue, 28 Nov 2023 12:40:39 -0500 Subject: [PATCH] increase accuracy of dHKL from harmonic expansion --- careless/utils/laue.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/careless/utils/laue.py b/careless/utils/laue.py index 067c8d7..3e03dfc 100644 --- a/careless/utils/laue.py +++ b/careless/utils/laue.py @@ -71,8 +71,11 @@ def expand_harmonics(ds, dmin=None, wavelength_key='Wavelength'): ds = ds.iloc[idx] ds.reset_index(inplace=True, drop=True) ds['H_0'],ds['K_0'],ds['L_0'] = H_0[idx].T - ds['dHKL'] = (d_0[idx] / n) ds[wavelength_key] = (Wavelength_0[idx] / n) ds['H'],ds['K'],ds['L'] = (n[:,None] * H_0[idx]).T + #Update dHKL using the cell and not harmonics + #d_0[idx] / n is not numerically precise enough + ds.compute_dHKL(inplace=True) + return ds