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

Tracking Mxy evolution #494

Open
gsahonero opened this issue Oct 4, 2024 · 1 comment
Open

Tracking Mxy evolution #494

gsahonero opened this issue Oct 4, 2024 · 1 comment

Comments

@gsahonero
Copy link
Member

Observing how the transverse magnetization evolves throughout a given sequence for sequence design and educational purposes could be useful. The conceptual code would be something like:
results = simulate(phantom, seq, sys, sim_params = Dict{String, Any}("return_type"=>"full", "sim_method" => Bloch(save_state_at = t))
Where t references time points where we want to know the values of Mxy, and results is a tuple. The first element of results has an array of states of size (length(t), n_spins) and the second has the (Nx, Ny) matrix that return_type=>"mat" returns.

Moreover, we could write a function that allows the evolution to be visualized as with the motion phantom, i.e.,
plot_state_evolution(Xt)
Where Xt = results[1] and the resulting plot shows the transverse magnetization per spin and includes a slider+play button for observing the evolution according to the time points declared in t.

@cncastillo
Copy link
Member

cncastillo commented Oct 4, 2024

This is a good idea, we can check what DifferentialEquations.jl is doing, to try to follow their logic, not sure if putting the save_state_at inside the simulation method would be the best, comparing it to putting save_state_at as an optional argument in simulate.

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

No branches or pull requests

2 participants