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

LEK SI2Conc edit #130

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

# Inputs:
# SIcurve numpy array of SI values
# TR TR for FLAHS sequence, in seconds
# TR TR for FLASH sequence, in seconds
# flip Flip angle for FLASH sequence in degrees
# T1base Native T1 corresponding to the baseline signal intensity, in seconds
# baselinepts Number of data points before the arrival of contrast agent
# baselinepts Range of data points to be used for baseline, indexes to start and end at [start,end]
# S0 Equilibrium signal, if known. Default is to calculate it here

# Output:
#H numpy array of curve as delta R1 in s^-1


def SI2Conc(SIcurve,TR,flip,T1base,baselinepts,S0=None):
def SI2Conc(SIcurve,TR,flip,T1base,baselinepts_range,S0=None):

# Convert flip angle to radians
rflip=flip*np.pi/180
Expand All @@ -31,7 +31,7 @@ def SI2Conc(SIcurve,TR,flip,T1base,baselinepts,S0=None):

# If S0 isn't specified, calculate from baseline
if S0 is None:
SIbase=np.mean(SIcurve[1:baselinepts])
SIbase=np.mean(SIcurve[baselinepts_range[0]:baselinepts_range[1]])
S0=CalcM0(SIbase,TR,flip,T1base)

# Now calculate the R1 curve
Expand Down
2 changes: 1 addition & 1 deletion test/SI_to_Conc/test_SI2Conc_LEK_Edinburgh_UK.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_LEK_UoEdinburgh_UK_SI2Conc(label, fa, tr, T1base, BLpts, r1, s_array, c

# run test
tic = perf_counter()
conc_curve = SI2Conc.SI2Conc(s_array,tr,fa,T1base,BLpts,S0=None)
conc_curve = SI2Conc.SI2Conc(s_array,tr,fa,T1base,[1,BLpts],S0=None)
exc_time = 1e6 * (perf_counter() - tic)

# log results
Expand Down