Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/testing/template_data' into test…
Browse files Browse the repository at this point in the history
…ing/wrapper
  • Loading branch information
IvanARashid committed Aug 29, 2023
2 parents ac3125f + 9a66cac commit 6e03b0e
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 418 deletions.
9 changes: 5 additions & 4 deletions phantoms/MR_XCAT_qMRI/sim_ivim_sig.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,15 @@ def XCAT_to_MR_DCE(XCAT, TR, TE, bvalue, D, f, Ds, b0=3, ivim_cont = True):

if __name__ == '__main__':
bvalue = np.array([0., 1, 2, 5, 10, 20, 30, 50, 75, 100, 150, 250, 350, 400, 550, 700, 850, 1000])
noise = 0.0 # 0.005
noise = 0.0005
motion = False
sig, XCAT, Dim, fim, Dpim, legend = phantom(bvalue, noise,motion=motion,interleaved=False)
sig, XCAT, Dim, fim, Dpim, legend = phantom(bvalue, noise, motion=motion, interleaved=False)
# sig = np.flip(sig,axis=0)
# sig = np.flip(sig,axis=1)
res=np.eye(4)
res[2]=2

voxel_selector_fraction = 0.5
D, f, Ds = contrast_curve_calc()
ignore = np.isnan(D)
generic_data = {}
Expand All @@ -383,9 +384,9 @@ def XCAT_to_MR_DCE(XCAT, TR, TE, bvalue, D, f, Ds, b0=3, ivim_cont = True):
voxels = sig[selector]
if len(voxels) < 1:
continue
signals = np.mean(voxels, axis=0).tolist()
std = np.std(XCAT[selector], axis=0).tolist()
signals = np.squeeze(voxels[int(voxels.shape[0] * voxel_selector_fraction)]).tolist()
generic_data[name] = {
'noise': noise,
'D': np.mean(Dim[selector], axis=0),
'f': np.mean(fim[selector], axis=0),
'Dp': np.mean(Dpim[selector], axis=0),
Expand Down
Loading

0 comments on commit 6e03b0e

Please sign in to comment.