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

simulating MRI signal #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

stadmill
Copy link
Collaborator

@stadmill stadmill commented Dec 3, 2024

added forward model for C to R1
added example in user guide for simulating an MRI signal

this step is needed to them implement the example for fitting the data to a tofts model.

added forward model for C to R1
added example in user guide for simulating an MRI signal
@stadmill stadmill requested a review from LucyKershaw December 3, 2024 03:04
@LucyKershaw
Copy link
Collaborator

I think this looks great, my only thought is whether it would be useful to comment the examples to state exactly what is being done at each step, what the units are for the input parameters etc to kind of lead users through? I think you could work it out by reading alongside the documentation and we don't want to duplicate work so I'm in two minds.

Copy link
Collaborator

@ltorres6 ltorres6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line with what Lucy mentioned, I've left some suggestions you should be able to apply directly. Otherwise looks good.

import numpy as np
import matplotlib.pyplot as plt
import osipi

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Compute Parker AIF and Simulate Tissue Signal

Ktrans = 0.6
ve = 0.2
ct = osipi.tofts(t, ca, Ktrans=Ktrans/60, ve=ve)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Set Relaxivity Constants (Maybe include the agent you are assuming here) and Compute Longitudinal Relaxation Rate

R10 = 0.5
r1 = 4.5
R1t = osipi.C_to_R1_linear_relaxivity(ct, R10, r1)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Compute MR signal using Relaxation Rate, Initial signal, Repetition Time, and Flip Angle.

Although maybe not directly related we should probably discuss: Rather than assuming signal_SPGR is the T1 weighted approximation, we should probably make the function general, and have it break down to it's simpler forms based on an argument. If not, we should at least indicate that this model assumes the T2* effects are negligible (maybe in the actual function, rather than in the example...

TR = 0.004
a = 12
St = osipi.signal_SPGR(R1t, S0, TR, a)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Display

@plaresmedima
Copy link
Collaborator

plaresmedima commented Dec 11, 2024 via email

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.

4 participants