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

README MR simulation equation #2

Open
evaalonsoortiz opened this issue Jun 25, 2024 · 4 comments
Open

README MR simulation equation #2

evaalonsoortiz opened this issue Jun 25, 2024 · 4 comments

Comments

@evaalonsoortiz
Copy link
Member

The README has the following equation for MR GRE signal modeling:

$$S=M_0\sin(\alpha)\frac{1-e^{-TR.R_1}}{1-\cos(\alpha)e^{-TR.R_1}}e^{-TE.(R_2+D_r(|\chi^+|+|\chi^-|))+i(\Phi_0+2\pi{\gamma}TE.B_0(D(\chi^++\chi^-)))}$$

I'm concerned about the last term:
$$e^{i(\Phi_0+2\pi{\gamma}TE.B_0(D(\chi^++\chi^-)))}$$

Ignoring the initial phase offset, and the pos/neg susceptibility, you have:

$$e^{2i\pi{\gamma}TE.B_0.D.\chi}$$

The periodic component of the signal should be represented by:
$$e^{i\Delta\omega TE}$$

where
$$\Delta \omega = \gamma \Delta B$$
and
$$\Delta B = D \star \Delta \chi $$

resulting in:
$$e^{i{\gamma}TE.D \star \Delta \chi}$$

In your equation, why is there a B0 and a 2pi? Why is there a multiplication and not a convolution? Am I missing something?

In your code, I think things match the equations that I derived here.

sigHR = (M0.*(1-exp(-TR.*R1)).*sind(theta)./(1-cosd(theta).*exp(-TR.*R1))...
.*exp(1i.* (field * TE + PhaseOffset)) .*exp(-TE.*(R2+(Drpos).*abs(Chipos)+(Drneg).*abs(Chineg))));

There's no gamma in the above code though, where can I find the definition? What units is field in?

@Danirid
Copy link
Collaborator

Danirid commented Jun 26, 2024

In my code, I also multiply by $B_0$, $2\pi$, and $\gamma$, it's not shown in the GRE signal equation but rather here:

TissueParam.field=field * SimParams.B0 * gyro*2*pi;

Regarding the $2\pi$ it is usually added when computing the acquired phase as seen here in this equation:
image

Also in the $\chi -separation$ article when writing the signal equation they included a $2\pi$ factor:
image

I think it comes from the fact that $w$= $2\pi$ x $f$

And regarding $B_0$ I've some resources that include $B_0$ when writing the field distribution equation:
image
But I've also seen articles that do not include $B_0$

@evaalonsoortiz
Copy link
Member Author

Ok, I missed the B0. You're correct:
$$\Delta B = B_0 \cdot (d(r) \star \chi)$$
If you see equations without the B0 it is because the deltaB0 is expressed in ppm.

For the 2pi, your response doesn't really address my question. After looking in your code, I found that your definition of gamma is:
$$\gamma = 42.58$$
there should be units in a comment beside the definition. This value is in units of MHz/T.

  1. Are you accounting for the missing 10^6?
  2. This is why you have a 2pi in your equations:
    $$\gamma = 2.86\cdot 10^8 \left[ \frac{rad}{s \cdot T} \right] $$
    whereas
    $$\rlap{\gamma}- = \frac{\gamma}{2\pi} = 42.6\cdot 10^6 \left[ \frac{1}{s \cdot T} \right] $$

@Danirid
Copy link
Collaborator

Danirid commented Jun 26, 2024

Oh yes, that's correct I did add the $2\pi$. In the original QSM phantom $\gamma$ was not multiplied by $2\pi$.
Regarding the units, the missing $\ 10^6$ has to be accounted for in the code. Because I ran the code 2 times ( with and without the $\ 10^6$):

image

When I added the $\ 10^6$ (image on the left) I got random phase values. But when excluding the $\ 10^6$ (image on the right) the phase looked great. I will have a closer look at the code maybe we are missing something.

@evaalonsoortiz
Copy link
Member Author

Indeed, it must be accounted for somewhere ... let me know here once you've identified it.

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