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

Adjust reset flag interpolation to trigger at jump #511

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

pvillacorta
Copy link
Collaborator

Testing with FlowPath, I realized that the interpolation of the reset flag is performed using the Constant{Previous} option. This required the spin_reset matrix to be true one time step before the jump, which doesn't make much sense.

I believe it’s better for spin_reset to activate at the time node where the jump occurs, rather than the one before it. This approach simplifies phantom design and seems more intuitive.

For a single spin, where the jump occurs when the spin exits at the top (dz = 4) and reenters at the bottom (dz = -4):

Previously, the phantom had to be designed like this:

dz         = [1 2 3 4 -4 -3 -1 -1]  
spin_reset = [0 0 0 1  0  0  0  0]  

Now:

dz         = [1 2 3 4 -4 -3 -1 -1]  
spin_reset = [0 0 0 0  1  0  0  0]  

So, this PR only changes Previous to Next in outflow_spin_reset!.

@cncastillo cncastillo merged commit c6d2183 into JuliaHealth:master Nov 22, 2024
10 of 12 checks passed
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