-
Notifications
You must be signed in to change notification settings - Fork 29
Description
What happened?
When discussing #620 , @cncastillo and I came across a possible issue with how outflow_spin_reset is called during ADC samples.
Currently, in BlochCPU.jl , run_spin_precession!, outflow_spin_reset is called once per ADC point, and once at the end of the call. From my understanding, the one at the end of the call looks at all time points (seq.t) and resets all spins that have seen a reset signal during this time. To me, this makes sense.
However, for ADC sample events, it appears to only check the current time point, which may or may not be a reset flag. The problem arises if a reset flag comes many samples before the ADC, but still within the same call of run_spin_precession!. Since the reset is only being checked at ADC calls and at the end of the function, this reset flag will be missed.
One solution could be to check the reset flag at every time step. Alternatively, the call of outflow_spin_reset during an ADC sample could check all previous time points, and if any contain a flag, reset that spin.
On a side note, it seemsBlochGPU.jl is not performing any resets during ADC sampling?
Overall, while this does introduce unrealistic signal accumulation, I think the effect is rather minor, since it only should influence the signals near the inlet regions, which is often already heavily corrupted by transients due to the inflow of fresh magnetization.
Environment
Discussion only, not tested