Skip to content

Commit d76735f

Browse files
adjusted some of the values for tissue with no signal
1 parent a5267de commit d76735f

File tree

7 files changed

+110
-108
lines changed

7 files changed

+110
-108
lines changed

phantoms/MR_XCAT_qMRI/sim_ivim_sig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def contrast_curve_calc():
9999
D[17] = 1.67e-3 # 17 esophagus : Huang et al. doi: 10.1259/bjr.20170421
100100
D[18] = 1.67e-3 # 18 esophagus cont : Huang et al. doi: 10.1259/bjr.20170421
101101
D[20] = 1.5e-3 # 20 stomach wall: Li et al. doi: 10.3389/fonc.2022.821586
102-
D[21] = 2.0e-3 # 21 stomach content
102+
D[21] = 3.0e-3 # 21 stomach content
103103
D[22] = 1.3e-3 # 22 Pancreas (from literature)
104104
D[23] = 2.12e-3 # 23 right kydney cortex : van Baalen et al. Doi: jmri.25519
105105
D[24] = 2.09e-3 # 23 right kydney medulla : van Baalen et al. Doi: jmri.25519
@@ -165,7 +165,7 @@ def contrast_curve_calc():
165165
Ds[17] = 0.03 # 17 esophagus : Huang et al. doi: 10.1259/bjr.20170421
166166
Ds[18] = 0.03 # 18 esophagus cont : Huang et al. doi: 10.1259/bjr.20170421
167167
Ds[20] = 0.012 # 20 stomach wall: Li et al. doi: 10.3389/fonc.2022.821586
168-
Ds[21] = 0.1 # 20 stomach content
168+
Ds[21] = 0.0 # 20 stomach content
169169
Ds[22] = 0.01 # 22 Pancreas (from literature)
170170
Ds[23] = 0.02 # 23 right kydney cortex : van Baalen et al. Doi: jmri.25519
171171
Ds[24] = 0.019 # 23 right kydney medulla : van Baalen et al. Doi: jmri.25519
@@ -297,7 +297,7 @@ def XCAT_to_MR_DCE(XCAT, TR, TE, bvalue, D, f, Ds, b0=3, ivim_cont = True):
297297
Tissue[19] = [1045.5, 37.3, 1201, 44]
298298
Tissue[20] = [981.5, 36, 1232.9, 37.20]
299299
#Tissue[20] = [981.5, 36, 1232.9, 37.20]
300-
Tissue[21] = [0, 0, 0, 0]
300+
Tissue[21] = [2500, 1250, 4000, 2000]
301301
Tissue[22] = [584, 46, 725, 43]
302302
Tissue[23] = [828, 71, 1168, 66]
303303
Tissue[24] = [1412, 85, 1545, 81]

tests/IVIMmodels/unit_tests/generic.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -287,28 +287,28 @@
287287
},
288288
"Stomach Contents": {
289289
"noise": 0.0005,
290-
"D": 0.002000000000000001,
290+
"D": 0.0030000000000000005,
291291
"f": 0.0,
292-
"Dp": 0.10000000000000002,
292+
"Dp": 0.0,
293293
"data": [
294-
5.80074394810416e-05,
295-
5.107581409413805e-05,
296-
-0.00012425433616179758,
297-
-0.0003012924365816795,
298-
0.00012758643047470927,
299-
0.0004170165250105098,
300-
8.461158236131148e-05,
301-
-0.00016202394652097316,
302-
-0.000958161107821496,
303-
0.000452036540223895,
304-
-0.0006338373896442981,
305-
-6.407697371328715e-05,
306-
6.664092464539553e-05,
307-
0.0005538785306771071,
308-
-1.2423671933829899e-05,
309-
0.0004053531904869084,
310-
7.083433682752305e-05,
311-
0.0008320566959464623
294+
0.5126018871088376,
295+
0.5110596279871825,
296+
0.5093535694210771,
297+
0.5046118029961769,
298+
0.4975235052032258,
299+
0.4831126643032834,
300+
0.4685144470320901,
301+
0.44098858155273923,
302+
0.4083164396340143,
303+
0.3801538814981812,
304+
0.32617856922898014,
305+
0.24204450859420612,
306+
0.17942509249683888,
307+
0.15492912843811152,
308+
0.09842158158269289,
309+
0.06316964601772247,
310+
0.04009111436010544,
311+
0.02635011387457495
312312
]
313313
},
314314
"pancreas": {

tests/IVIMmodels/unit_tests/generic_four.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -287,28 +287,28 @@
287287
},
288288
"Stomach Contents": {
289289
"noise": 0.0005,
290-
"D": 0.002000000000000001,
290+
"D": 0.0030000000000000005,
291291
"f": 0.0,
292-
"Dp": 0.10000000000000002,
292+
"Dp": 0.0,
293293
"data": [
294-
5.80074394810416e-05,
295-
5.107581409413805e-05,
296-
-0.00012425433616179758,
297-
-0.0003012924365816795,
298-
0.00012758643047470927,
299-
0.0004170165250105098,
300-
8.461158236131148e-05,
301-
-0.00016202394652097316,
302-
-0.000958161107821496,
303-
0.000452036540223895,
304-
-0.0006338373896442981,
305-
-6.407697371328715e-05,
306-
6.664092464539553e-05,
307-
0.0005538785306771071,
308-
-1.2423671933829899e-05,
309-
0.0004053531904869084,
310-
7.083433682752305e-05,
311-
0.0008320566959464623
294+
0.5126018871088376,
295+
0.5110596279871825,
296+
0.5093535694210771,
297+
0.5046118029961769,
298+
0.4975235052032258,
299+
0.4831126643032834,
300+
0.4685144470320901,
301+
0.44098858155273923,
302+
0.4083164396340143,
303+
0.3801538814981812,
304+
0.32617856922898014,
305+
0.24204450859420612,
306+
0.20845143168394226,
307+
0.15492912843811152,
308+
0.11435157428178726,
309+
0.0851282866646102,
310+
0.06283512716406309,
311+
0.047328988430565426
312312
]
313313
},
314314
"pancreas": {

tests/IVIMmodels/unit_tests/generic_one.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -309,30 +309,30 @@
309309
},
310310
"Stomach Contents": {
311311
"noise": 0.0005,
312-
"D": 0.002000000000000001,
312+
"D": 0.0030000000000000005,
313313
"f": 0.0,
314-
"Dp": 0.10000000000000002,
314+
"Dp": 0.0,
315315
"data": [
316-
-0.0006891569843084475,
317-
-0.000350349205760221,
318-
-0.000917113669609909,
319-
4.602241579321293e-08,
320-
-0.00018302139591143602,
321-
0.00018186374664528606,
322-
-0.0004530159152872634,
323-
2.8535519125183674e-05,
324-
-0.00045237992205407436,
325-
0.0001590664107331867,
326-
-0.0002977007140224263,
327-
0.0001680245153855177,
328-
-0.00021378084344275637,
329-
-2.973881510708059e-05,
330-
-0.0005213401147112412,
331-
-0.00018130926334482638,
332-
-0.00029702560689974104,
333-
0.0001829254096871082,
334-
-6.193284334855272e-05,
335-
4.118162939074253e-05
316+
0.5118547226850481,
317+
0.5106582029673281,
318+
0.508560710087629,
319+
0.5049131414551744,
320+
0.49721289737683966,
321+
0.4828775115249182,
322+
0.46797681953444153,
323+
0.4411791410183854,
324+
0.40882222081978176,
325+
0.3798609113686905,
326+
0.326514705904602,
327+
0.24227661008330495,
328+
0.17914467072875073,
329+
0.1543455110923273,
330+
0.09791266513991548,
331+
0.06258298356389073,
332+
0.03972325441637818,
333+
0.025700982588315595,
334+
0.018842308870977337,
335+
0.014045788339534756
336336
]
337337
},
338338
"pancreas": {

tests/IVIMmodels/unit_tests/generic_three.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -276,27 +276,27 @@
276276
},
277277
"Stomach Contents": {
278278
"noise": 0.0005,
279-
"D": 0.002000000000000001,
279+
"D": 0.0030000000000000005,
280280
"f": 0.0,
281-
"Dp": 0.10000000000000002,
281+
"Dp": 0.0,
282282
"data": [
283-
-0.00015283463313758177,
284-
0.0001016610871739754,
285-
0.0007074038187109081,
286-
0.00036841293881897637,
287-
0.00021476864205758202,
288-
0.0003864380804761366,
289-
-0.0009806012679601853,
290-
0.0007615651897909676,
291-
7.007298111510775e-05,
292-
-0.0007165444873753203,
293-
0.0004936886427893894,
294-
0.0018016206647201063,
295-
-0.0004921881101895262,
296-
0.00032495269107461994,
297-
0.00036673577745912576,
298-
7.404966351412328e-05,
299-
6.03246126200487e-05
283+
0.512391045036219,
284+
0.5111102132602624,
285+
0.5101852275759499,
286+
0.5052815083715776,
287+
0.4976106874148087,
288+
0.483082085858749,
289+
0.4674492341817686,
290+
0.4419121706890512,
291+
0.4093446737229509,
292+
0.37898530047058193,
293+
0.3273060952614138,
294+
0.24391020623263954,
295+
0.17886626346200396,
296+
0.13319696164901507,
297+
0.09880074103208585,
298+
0.0677266861434733,
299+
0.04655725634723901
300300
]
301301
},
302302
"pancreas": {

tests/IVIMmodels/unit_tests/generic_two.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -309,30 +309,30 @@
309309
},
310310
"Stomach Contents": {
311311
"noise": 0.0005,
312-
"D": 0.002000000000000001,
312+
"D": 0.0030000000000000005,
313313
"f": 0.0,
314-
"Dp": 0.10000000000000002,
314+
"Dp": 0.0,
315315
"data": [
316-
-0.0006891569843084475,
317-
-0.000350349205760221,
318-
-0.000917113669609909,
319-
4.602241579321293e-08,
320-
-0.00018302139591143602,
321-
0.00018186374664528606,
322-
-0.0004530159152872634,
323-
2.8535519125183674e-05,
324-
-0.00045237992205407436,
325-
0.0001590664107331867,
326-
-0.0002977007140224263,
327-
0.0001680245153855177,
328-
-0.00021378084344275637,
329-
-2.973881510708059e-05,
330-
-0.0005213401147112412,
331-
-0.00018130926334482638,
332-
-0.00029702560689974104,
333-
0.0001829254096871082,
334-
-6.193284334855272e-05,
335-
4.118162939074253e-05
316+
0.5118547226850481,
317+
0.5106582029673281,
318+
0.508560710087629,
319+
0.5049131414551744,
320+
0.49721289737683966,
321+
0.4828775115249182,
322+
0.46797681953444153,
323+
0.4411791410183854,
324+
0.40882222081978176,
325+
0.3798609113686905,
326+
0.326514705904602,
327+
0.24227661008330495,
328+
0.17914467072875073,
329+
0.1543455110923273,
330+
0.11384265783900985,
331+
0.06258298356389073,
332+
0.04619990612771922,
333+
0.025700982588315595,
334+
0.018842308870977337,
335+
0.014045788339534756
336336
]
337337
},
338338
"pancreas": {

tests/IVIMmodels/unit_tests/test_ivim_fit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ def test_ivim_fit_saved(name, bvals, data, algorithm, xfail, kwargs, tolerances,
169169
tolerances = tolerances_helper(tolerances, ratio, data["noise"])
170170
[f_fit, Dp_fit, D_fit] = fit.osipi_fit(signal, bvals)
171171
npt.assert_allclose(data['f'], f_fit, rtol=tolerances["rtol"]["f"], atol=tolerances["atol"]["f"])
172-
npt.assert_allclose(data['D'], D_fit, rtol=tolerances["rtol"]["D"], atol=tolerances["atol"]["D"])
173-
npt.assert_allclose(data['Dp'], Dp_fit, rtol=tolerances["rtol"]["Dp"], atol=tolerances["atol"]["Dp"])
172+
if data['f']<0.80: # we need some signal for D to be detected
173+
npt.assert_allclose(data['D'], D_fit, rtol=tolerances["rtol"]["D"], atol=tolerances["atol"]["D"])
174+
if data['f']>0.03: #we need some f for D* to be interpretable
175+
npt.assert_allclose(data['Dp'], Dp_fit, rtol=tolerances["rtol"]["Dp"], atol=tolerances["atol"]["Dp"])
174176

0 commit comments

Comments
 (0)