diff --git a/src/original/LEK_UoEdinburgh_UK/SignalToConcentration/SI2Conc.py b/src/original/LEK_UoEdinburgh_UK/SignalToConcentration/SI2Conc.py index 74cec6e2..ceb8afbb 100644 --- a/src/original/LEK_UoEdinburgh_UK/SignalToConcentration/SI2Conc.py +++ b/src/original/LEK_UoEdinburgh_UK/SignalToConcentration/SI2Conc.py @@ -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 @@ -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 diff --git a/test/SI_to_Conc/test_SI2Conc_LEK_Edinburgh_UK.py b/test/SI_to_Conc/test_SI2Conc_LEK_Edinburgh_UK.py index ce094bf7..10cf84c6 100644 --- a/test/SI_to_Conc/test_SI2Conc_LEK_Edinburgh_UK.py +++ b/test/SI_to_Conc/test_SI2Conc_LEK_Edinburgh_UK.py @@ -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