Skip to content

Conversation

john-halloran
Copy link

The original apply_interpolation_matrix() was kind of a mess. The core logic, which is honestly not that complicated, was buried under a sea of indexing and biasing hacks, many of which were unnecessary mimicry of the data format of the original MATLAB code.

It should be hopefully now be clear that this function:

  1. Takes the original sample indices and stretches them.
  2. Finds the sample before and after the stretched position, and linearly interpolates between them.
  3. Weights the samples per component.
  4. Computes derivatives of these stretched components with respect to stretch for use by solvers.

To fit this theme of simplicity, the function has been renamed to better match what it is used for.

@sbillinge sbillinge merged commit d83619e into diffpy:john-development Aug 25, 2025
1 check passed
@sbillinge
Copy link
Contributor

merging to keep this going, but can we think about a test for this function? some very small matrix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants