Skip to content

Commit e03607a

Browse files
authored
Merge branch 'master' into fix-rotation
2 parents 13c690c + 386cf0d commit e03607a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

KomaMRIPlots/src/ui/DisplayFunctions.jl

+6-2
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,10 @@ Plots a phantom map for a specific spin parameter given by `key`.
10011001
- `darkmode`: (`::Bool`, `=false`) boolean to indicate whether to display darkmode style
10021002
- `view_2d`: (`::Bool`, `=false`) boolean to indicate whether to use a 2D scatter plot
10031003
- `colorbar`: (`::Bool`, `=true`) boolean to indicate whether to display a colorbar
1004+
- `max_spins`:(`::Int`, `=100_000`) maximum number of displayed spins
1005+
- `intermediate_time_samples`:(`::Int`, `=0`) intermediate time samples between motion `t_start` and `t_end`
1006+
- `max_time_samples`:(`::Int`, `=100`) maximum number of time samples
1007+
- `frame_duration_ms`:(`::Int`, `=250`) time in miliseconds between two frames
10041008
10051009
# Returns
10061010
- `p`: (`::PlotlyJS.SyncPlot`) plot of the phantom map for a specific spin parameter
@@ -1124,8 +1128,8 @@ function plot_phantom_map(
11241128
cmin_key = get(kwargs, :cmin, factor * cmin_key)
11251129
cmax_key = get(kwargs, :cmax, factor * cmax_key)
11261130

1127-
t = process_times(m)
1128-
x, y, z = get_spin_coords(m, obj.x, obj.y, obj.z, t')
1131+
t = process_times(obj.motion)
1132+
x, y, z = get_spin_coords(obj.motion, obj.x, obj.y, obj.z, t')
11291133

11301134
x0 = -maximum(abs.([x y z])) * 1e2
11311135
xf = maximum(abs.([x y z])) * 1e2

KomaMRIPlots/test/GUI_PlotlyJS_backend_test.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
ph.motion = MotionList(Translate(0.1, 0.1, 0.1, TimeRange(0.0, 1.0), SpinRange(1:1000)))
4242

4343
@testset "plot_motion_phantom_map_rho" begin
44-
plot_phantom_map(ph, , width=800, height=600) #Plotting the phantom's rho map
44+
plot_phantom_map(ph, , width=800, height=600, max_spins=1_000) #Plotting the phantom's rho map (set max_spins=1_000)
4545
@test true #If the previous line fails the test will fail
4646
end
4747

0 commit comments

Comments
 (0)