Skip to content
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

Refactor Shift for efficiency #34

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

dcookman
Copy link

Following in the footsteps of the efficiency gains made in PR #25 for the Scale systematic, the same approach has been applied to the Shift systematic.

In order to construct the shift systematic response matrix, we:

  1. Cache the bin mapping between elements of the matrix in the full space to the shifting subspace once at the start;
  2. Construct the shifting response matrix in the 1D shifting axis only;
  3. Use the bin mapping to create the full response matrix.

I have also moved the contents of the calculation of the fractional bin contribution for a given element into its own private method, using the same code as in Scale - so the bug fix there is included here too.

@willp240 willp240 added the merge soon to be merged soon if no objections label Nov 22, 2023
@willp240 willp240 merged commit e425fe2 into snoplus:master Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge soon to be merged soon if no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants