Table of Contents
Fetching ...

diffpy.morph: Python tools for model independent comparisons between sets of 1D functions

Andrew Yang, Christopher L. Farrow, Pavol Juhás, Luis Kitsu Iglesias, Chia-Hao Liu, Samuel D. Marks, Vivian R. K. Wall, Joshua Safin, Sean M. Drewry, Caden Myers, Dillon F. Hanlon, Nicholas Leonard, Cedomir Petrovic, Ahhyun Jeong, Dmitri V. Talapin, Linda F. Nazar, Haidong Zhou, Samuel W. Teitelbaum, Tim B. van Driel, Soham Banerjee, Emil S. Bozin, Michael F. Toney, Katharine Page, Naomi S. Ginsberg, Simon J. L. Billinge

TL;DR

diffpy.morph delivers a fast, model-free framework for comparing 1D spectra by applying morphs to align a morphed dataset with a target. The approach covers scaling, stretching, smearing, shifting, shape, and grid transformations, and can be chained within a regression framework to minimize residuals $R_w$ while preserving physically meaningful information. Its applications span phase-transition detection, thermal-property extraction (e.g., $\beta$ and Debye temperature), in situ thermometry, nanoparticle-shape analysis, and high-throughput data processing, all demonstrated on diffraction and PDF data from X-rays and neutrons. By avoiding explicit structural models, diffpy.morph enables real-time, interpretable insights and is extensible to other 1D signals beyond PDFs and $I(Q)$, making it a versatile tool for 1D spectral analysis. The work also provides theoretical underpinnings for lattice-expansion effects and practical guidance for using morphs in calibration, data-reduction, and rapid exploratory analysis.

Abstract

diffpy.morph addresses a need to gain scientific insights from 1D scientific spectra in model independent ways. A powerful approach for this is to take differences between pairs of spectra and look for meaningful changes that might indicate underlying chemical, structural, or other modifications. The challenge is that the difference curve may contain uninteresting differences such as experimental inconsistencies and benign physical changes such as the effects of thermal expansion. diffpy$.$morph allows researchers to apply simple transformations, or "morphs", to one of the datasets to remove the unwanted differences revealing, when they are present, non-trivial differences. diffpy$.$morph is an open-source Python package available on the Python Package Index and conda-forge. Here, we describe its functionality and apply it to solve a range of experimental challenges on diffraction and PDF data from x-rays and neutrons, though we note that it may be applied to any 1D function in principle.

diffpy.morph: Python tools for model independent comparisons between sets of 1D functions

TL;DR

diffpy.morph delivers a fast, model-free framework for comparing 1D spectra by applying morphs to align a morphed dataset with a target. The approach covers scaling, stretching, smearing, shifting, shape, and grid transformations, and can be chained within a regression framework to minimize residuals while preserving physically meaningful information. Its applications span phase-transition detection, thermal-property extraction (e.g., and Debye temperature), in situ thermometry, nanoparticle-shape analysis, and high-throughput data processing, all demonstrated on diffraction and PDF data from X-rays and neutrons. By avoiding explicit structural models, diffpy.morph enables real-time, interpretable insights and is extensible to other 1D signals beyond PDFs and , making it a versatile tool for 1D spectral analysis. The work also provides theoretical underpinnings for lattice-expansion effects and practical guidance for using morphs in calibration, data-reduction, and rapid exploratory analysis.

Abstract

diffpy.morph addresses a need to gain scientific insights from 1D scientific spectra in model independent ways. A powerful approach for this is to take differences between pairs of spectra and look for meaningful changes that might indicate underlying chemical, structural, or other modifications. The challenge is that the difference curve may contain uninteresting differences such as experimental inconsistencies and benign physical changes such as the effects of thermal expansion. diffpymorph allows researchers to apply simple transformations, or "morphs", to one of the datasets to remove the unwanted differences revealing, when they are present, non-trivial differences. diffpymorph is an open-source Python package available on the Python Package Index and conda-forge. Here, we describe its functionality and apply it to solve a range of experimental challenges on diffraction and PDF data from x-rays and neutrons, though we note that it may be applied to any 1D function in principle.
Paper Structure (37 sections, 100 equations, 18 figures, 1 table)

This paper contains 37 sections, 100 equations, 18 figures, 1 table.

Figures (18)

  • Figure 1: PDFs of IrTe$_2$ samples with various forms of supstitution measured at $10$ K (blue) and $300$ K (red). The difference curves (green) are plotted below. All $R_w$ values are computed on the grid $r \in [0~\text{\AA}, 35~\text{\AA}]$ with spacing $dr\xspace = 0.01$. (a) Samples are Rhodium-substituted Ir$_{\text{0.8}}$Rh$_{\text{0.2}}$Te$_2$. (b) Platinum-substituted Ir$_{\text{0.95}}$Pt$_{\text{0.05}}$Te$_2$. (c) Pure IrTe$_2$. Plots (d), (e), and (f) have the same high-temperature PDF as (a), (b), and (c) respectively, but a "stretching", "scaling", and "smearing" morph has been applied to the low-temperature PDF to best fit the high-temperature target PDF.
  • Figure 2: $I(Q)$s of IrTe$_2$ samples with various forms of substitution measured at $10$ K (blue) and $300$ K (red). The difference curves (green) are plotted below. All $R_w$ values are computed on the grid $Q \in [0~\text{\AA}^{-1}, 12~\text{\AA}^{-1}]$ with spacing $dQ\xspace = 0.02$. (a) Rhodium-substituted Ir$_{\text{0.8}}$Rh$_{\text{0.2}}$Te$_2$. (b) Platinum-substituted Ir$_{\text{0.95}}$Pt$_{\text{0.05}}$Te$_2$. (c) Pure IrTe$_2$. The $I(Q)$s plotted in (a-c) were used to generate the PDFs in Fig. \ref{['fig:10-300-Morph']}(a-c). Plots (d), (e), and (f) have the same high-temperature $I(Q)$ as (a), (b), and (c) respectively, but a stretch and scale morph has been applied to the low-temperature $I(Q)$ to best fit the high-temperature target $I(Q)$.
  • Figure 3: Morphed PDFs of Ir$_{\text{0.8}}$Rh$_{\text{0.2}}$Te$_2$ samples measured at $250$ K (blue) plotted against unmorphed PDFs measured at $300$ K (red). The difference curves (green) are plotted below. All $R_w$ values are computed on the grid $r\xspace \in [0~\text{\AA}, 35~\text{\AA}]$ with spacing $dr\xspace = 0.01$. (a) No morph is applied. (b) A stretch and scale morph is applied to the lower-temperature PDF. (c) A stretch, scale, and smear morph is applied to the lower-temperature PDF. Plots (d), (e), and (f) are the same as (a), (b), and (c) respectively zoomed into the region $30~\text{\AA} \leq r \leq 35~\text{\AA}$.
  • Figure 4: (a) $R_w$ (blue) and Pearson correlation coefficient (red) computed between a morphed and target PDF from IrTe$_2$ PDFs measured at temperatures ranging from $9$ K to $297$ K. (b) The stretch parameter $\eta$ found in each morph indicating thermal expansion. This parameter sharply drops above 263 K. The drop indicates contraction at the phase transition. Dashed lines are linear fits to the low and high temperature regions.
  • Figure 5: (a) $R_w$ (blue) and PCC (red) after morphing the PDF from SrFe$_2$As$_2$ measured at $T=150$ K on to the PDF measured at target at temperatures up to $246$ K. (b) The stretch parameter $\eta$ obtained from each morph. The dashed and dotted lines show best-fit linear curves in the temperature ranges $156$ K to $192$ K and $198$ K to $246$ K, respectively. The slope gives the thermal expansion coefficient in the respective temperature ranges. (c) The $R_w$s obtained by fitting a tetragonal (blue) and orthorhombic (red) structure to each PDF on the $r$-range $[0.5~\text{\AA},\;100~\text{\AA}]$. The black vertical dashed line is a guide to the eye at the first measured point above the structural phase transition.
  • ...and 13 more figures