Skip to content

Commit d625dc2

Browse files
bugfixes; text edits
1 parent 1821d03 commit d625dc2

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

Fit_qMT_to_literatureT1.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ extrema(T1_literature)
286286
variation(T1_literature)
287287

288288
# ### Median absolute deviation
289-
# In the paper, the median absolute deviation wrt. the mean value is used, as it is more robust to outliers compared to the mean absolute deviation or the standard deviation. Note, however, that the median absolute deviation of the mono-exponential fit is dominated by an outlier, artificially inflating the corresponding reduction.
289+
# In the paper, the median absolute deviation from the mean value is used, as it is more robust to outliers compared to the mean absolute deviation or the standard deviation. Note, however, that the median absolute deviation of the mono-exponential fit is dominated by an outlier, artificially inflating the corresponding reduction.
290290

291291
# A mono-exponential model explains the following fraction of the T₁ variability in the literature:
292292
1 - mad(fit_mono.resid; center=mean(fit_mono.resid)) / mad(T1_literature; center=mean(T1_literature))
@@ -334,7 +334,7 @@ write(io, "\n") #src
334334

335335
for i_seq in eachindex(T1_literature) #src
336336
write(io, @sprintf("%1.3f ", T1_literature[i_seq])) #src
337-
[write(io, @sprintf("%1.3f ", T1_simulated[i_fit][i_seq])) for i_fit in eachindex(T1_simulated)] #src
337+
[write(io, @sprintf("%1.3f ", T1_simulated_v[i_fit][i_seq])) for i_fit in eachindex(T1_simulated_v)] #src
338338
write(io, @sprintf("%s ", string(seq_type[i_seq])[1])) #src
339339
write(io, "\n") #src
340340
end #src
@@ -358,11 +358,11 @@ println("model & \$T_1^s\$ constraint & \$\\Delta\$AIC & \$\\Delta\$BIC \\\\") #
358358
println("\\midrule") #src
359359
println("mono-exponential & none & 0 & 0 \\\\") #src
360360
i = findfirst(fit_name .== "unconstr_Graham") #src
361-
println(@sprintf("Graham's & none & %1.1f & %1.1f \\\\", ΔAIC[i], ΔBIC[i])) #src
361+
println(@sprintf("Graham's & none & %1.1f & %1.1f \\\\", ΔAIC_v[i], ΔBIC_v[i])) #src
362362
i = findfirst(fit_name .== "constr_gBloch") #src
363-
println(@sprintf("generalized Bloch & \$T_1^s = T_1^f\$ & %1.1f & %1.1f \\\\", ΔAIC[i], ΔBIC[i])) #src
363+
println(@sprintf("generalized Bloch & \$T_1^s = T_1^f\$ & %1.1f & %1.1f \\\\", ΔAIC_v[i], ΔBIC_v[i])) #src
364364
i = findfirst(fit_name .== "unconstr_gBloch") #src
365-
println(@sprintf("generalized Bloch & none & %1.1f & %1.1f \\\\", ΔAIC[i], ΔBIC[i])) #src
365+
println(@sprintf("generalized Bloch & none & %1.1f & %1.1f \\\\", ΔAIC_v[i], ΔBIC_v[i])) #src
366366
println("\\bottomrule") #src
367367

368368

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version = "0.2"
2+
13
[deps]
24
ApproxFun = "28f2ccd6-bb30-5033-b560-165f7b14dc2f"
35
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
|:------------------------- |:------------------------------|
33
| [![][docs-img]][docs-url] | [![][arXiv-img1]][arXiv-url1] |
44

5-
This code reproduces all results in the paper [Magnetization transfer explains most of the T1 variability in the MRI literature][arXiv-url1]. Please go to the [Documentation][docs-url] for a detailed description of the code.
5+
This code reproduces all results in the paper [Magnetization transfer explains most of the T1 variability in the MRI literature][arXiv-url1]. Please refer to the [Documentation][docs-url] for a detailed description of the code.
66

77
The code is written in the open-source language Julia and is structured as follows:
8-
- Fit_qMT_to_literatureT1.jl is the main script and implements the pulse sequence simulations and the mono-exponential fitting routines. It also calls the fit of the qMT models to the variable literature T1 estimates.
9-
- helper_functions.jl contains implementations of RF pulses and some helper functions, which are less relevant for understanding the simulations
10-
- Project.toml and Manifest.toml contain information about the packages used by the simulation, facilitating their automated installation.
8+
- `T1_mapping_methods.jl` implements the pulse sequence simulations and the mono-exponential fitting routines of each T₁-mapping method.
9+
- `Fit_qMT_to_literatureT1.jl` is the main script that performs the fit of the qMT models to the variable literature T₁ estimates.
10+
- `helper_functions.jl` contains implementations of RF pulses, their propagators, and some helper functions, which are less relevant for understanding the simulations.
11+
- `Project.toml` and `Manifest.toml` contain information about the packages used by the simulation, facilitating their automated installation.
1112

12-
Julia can be downloaded from the website https://julialang.org or, on Unix systems, installed by simply calling
13+
Julia can be downloaded from https://julialang.org or, on Unix systems, by simply calling
1314

1415
`curl -fsSL https://install.julialang.org | sh`
1516

1617
from the command line.
1718

18-
In order to run the simulations, place all four files in the same folder and call
19+
In order to run the simulations, place all five files in the same folder, `cd` into this folder, and call
1920

20-
`julia -iq --threads=auto some_path/Fit_qMT_to_literatureT1.jl`
21-
22-
replacing `some_path` with the path to the files. For a more interactive interface, the code can be called from Visual Studio Code with the Julia extension.
21+
`julia -iq --threads=auto Fit_qMT_to_literatureT1.jl`
2322

23+
For a more interactive interface, the code can be called from Visual Studio Code with the Julia extension.
2424

2525
[docs-img]: https://img.shields.io/badge/docs-dev-blue.svg
2626
[docs-url]: https://jakobasslaender.github.io/T1variability/dev/

docs/make.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ makedocs(;
5151
authors="Jakob Asslaender <jakob.asslaender@nyumc.org> and contributors",
5252
sitename="T₁ variability",
5353
format=Documenter.HTML(;
54-
inventory_version=0.1, # TODO
5554
prettyurls=get(ENV, "CI", "false") == "true",
5655
canonical="https://JakobAsslaender.github.io/T1variability",
5756
assets=String[],

helper_functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const R2sl_2 = precompute_R2sl(TRF_min=10e-6, TRF_max=20e-6, ω1_max=π / 10e-6,
5959
const R2sl_3 = precompute_R2sl(TRF_max=1e-3, ω1_max=π / 500e-6, T2s_min=12e-6, T2s_max=13e-6, B1_max=1.1)[1]
6060
nothing #hide #md
6161

62-
# We implemented different methods for the function `RF_pulse_propagator` that infered with Julia's multiple dispatch logic based on the type of the input parameters. The functions in this section take the variable `model` of type `gBloch` and implement the generalized Bloch model. The first method further takes the variable `ω1` of the abstract type `Number`, i.e., it implements pulse propagators for a constant ω₁.
62+
# We implemented different methods for the function `RF_pulse_propagator` that inferred with Julia's multiple dispatch logic based on the type of the input parameters. The functions in this section take the variable `model` of type `gBloch` and implement the generalized Bloch model. The first method further takes the variable `ω1` of the abstract type `Number`, i.e., it implements pulse propagators for a constant ω₁.
6363
function RF_pulse_propagator(ω1::Number, B1, ω0, TRF, m0s, R1f, R2f, Rx, R1s, T2s, model::gBloch; spoiler=true)
6464
if TRF >= 1e-6 && TRF <= 3e-6
6565
R2s = R2sl_1(TRF, abs(ω1 * TRF), B1, T2s)

0 commit comments

Comments
 (0)