Skip to content

Commit

Permalink
Added missing packages for doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
cncastillo committed Jul 15, 2024
1 parent fc36556 commit 188a4cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
KomaMRI = "6a340f8b-2cdf-4c04-99be-4953d9b66d0a"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4"

Expand Down
10 changes: 5 additions & 5 deletions examples/3.tutorials/lit-06-Coils.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# # Experimental: Simulating with coils and parallel imaging
# # Experimental: Simulating with realistic coils

using KomaMRI, MAT # hide
sys = Scanner() # hide
Expand All @@ -7,7 +7,7 @@ sys = Scanner() # hide
# To plot the coil sensitivities we will use the Phantom object:
ph_file = joinpath(dirname(pathof(KomaMRI)), "../examples/2.phantoms/sphere_fields.mat")
sphere = matread(ph_file)
Δx = 1.1e-3 # 5mm
Δx = 1e-3 # 5mm
N = size(sphere["b1m"]) # Number of spins
FOV = (N .- 1) .* Δx # Field of view
xr = -FOV[1]/2:Δx:FOV[1]/2 # x spin coordinates vector
Expand All @@ -27,12 +27,12 @@ p1 = plot_phantom_map(obj, :coil_sens ; height=400, width=400, darkmode=true)
#md # <object type="text/html" data="../../assets/6-phantom1.html" style="width:50%; height:420px;"></object><object type="text/html" data="../../assets/2-phantom2.html" style="width:50%; height:420px;"></object>
#md # ```

# Now we will interpolate the coils into a brain phantom:
# Now we will interpolate the coils into a brain phantom (this will be done internally):

using KomaMRI.KomaMRIBase.Interpolations: LinearInterpolation
using Interpolations
coil_sens = sphere["b1m"] ./ maximum(abs.(sphere["b1m"][:]))
obj = brain_phantom2D()
obj.coil_sens .= LinearInterpolation((xr,xr,xr), coil_sens).(obj.x, obj.y, obj.z)
obj.coil_sens .= LinearInterpolation((xr,xr,xr), coil_sens, extrapolation_bc=0).(obj.x, obj.y, obj.z)
p2 = plot_phantom_map(obj, :coil_sens ; height=400, width=400, darkmode=true)
#md savefig(p2, "../assets/6-phantom2.html") # hide
#jl display(p2)
Expand Down

0 comments on commit 188a4cd

Please sign in to comment.