From e53bb05944a224db54c7d5f85e19d1abf1828a24 Mon Sep 17 00:00:00 2001 From: Carlos Castillo Passi Date: Tue, 9 Jul 2024 23:05:31 -0400 Subject: [PATCH 1/5] Bump to 0.9.0-DEV --- KomaMRIBase/Project.toml | 2 +- KomaMRICore/Project.toml | 2 +- KomaMRIFiles/Project.toml | 2 +- KomaMRIPlots/Project.toml | 2 +- Project.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/KomaMRIBase/Project.toml b/KomaMRIBase/Project.toml index 43b2a1b68..572e06d08 100644 --- a/KomaMRIBase/Project.toml +++ b/KomaMRIBase/Project.toml @@ -1,7 +1,7 @@ name = "KomaMRIBase" uuid = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c" authors = ["Carlos Castillo Passi "] -version = "0.9.0" +version = "0.9.0-DEV" [deps] Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" diff --git a/KomaMRICore/Project.toml b/KomaMRICore/Project.toml index aefa52207..5992b99fa 100644 --- a/KomaMRICore/Project.toml +++ b/KomaMRICore/Project.toml @@ -1,7 +1,7 @@ name = "KomaMRICore" uuid = "4baa4f4d-2ae9-40db-8331-a7d1080e3f4e" authors = ["Carlos Castillo Passi "] -version = "0.9.0" +version = "0.9.0-DEV" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/KomaMRIFiles/Project.toml b/KomaMRIFiles/Project.toml index da24e1c56..6808481a5 100644 --- a/KomaMRIFiles/Project.toml +++ b/KomaMRIFiles/Project.toml @@ -1,7 +1,7 @@ name = "KomaMRIFiles" uuid = "fcf631a6-1c7e-4e88-9e64-b8888386d9dc" authors = ["Carlos Castillo Passi "] -version = "0.9.0" +version = "0.9.0-DEV" [deps] FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" diff --git a/KomaMRIPlots/Project.toml b/KomaMRIPlots/Project.toml index e46d7b884..bbc676894 100644 --- a/KomaMRIPlots/Project.toml +++ b/KomaMRIPlots/Project.toml @@ -1,7 +1,7 @@ name = "KomaMRIPlots" uuid = "76db0263-63f3-4d26-bb9a-5dba378db904" authors = ["Carlos Castillo Passi "] -version = "0.9.0" +version = "0.9.0-DEV" [deps] Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" diff --git a/Project.toml b/Project.toml index 26a67dd42..eef141ad8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "KomaMRI" uuid = "6a340f8b-2cdf-4c04-99be-4953d9b66d0a" -version = "0.9.0" +version = "0.9.0-DEV" authors = ["Carlos Castillo Passi "] [deps] From bac49377c5efa79c1c1fc77a957cf6f229542e50 Mon Sep 17 00:00:00 2001 From: Carlos Castillo Passi Date: Tue, 9 Jul 2024 23:06:13 -0400 Subject: [PATCH 2/5] Remove copy, use deepcopy instead --- KomaMRIBase/src/datatypes/Phantom.jl | 2 +- KomaMRIBase/src/datatypes/Sequence.jl | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/KomaMRIBase/src/datatypes/Phantom.jl b/KomaMRIBase/src/datatypes/Phantom.jl index 8223084f2..56d8bf5d9 100644 --- a/KomaMRIBase/src/datatypes/Phantom.jl +++ b/KomaMRIBase/src/datatypes/Phantom.jl @@ -106,7 +106,7 @@ end """Scalar multiplication of a phantom""" *(α::Real, obj::Phantom) = begin - obj1 = copy(obj) + obj1 = deepcopy(obj) obj1.ρ .*= α return obj1 end diff --git a/KomaMRIBase/src/datatypes/Sequence.jl b/KomaMRIBase/src/datatypes/Sequence.jl index 1c192c6e0..b703c6ee0 100644 --- a/KomaMRIBase/src/datatypes/Sequence.jl +++ b/KomaMRIBase/src/datatypes/Sequence.jl @@ -110,7 +110,6 @@ Base.getindex(x::Sequence, i::Int) = Sequence(x.GR[:,i], x.RF[:,i], x.ADC[i], x. Base.getindex(x::Sequence, i::BitArray{1}) = any(i) ? Sequence(x.GR[:,i], x.RF[:,i], x.ADC[i], x.DUR[i], x.DEF) : nothing Base.getindex(x::Sequence, i::Array{Bool,1}) = any(i) ? Sequence(x.GR[:,i], x.RF[:,i], x.ADC[i], x.DUR[i], x.DEF) : nothing Base.lastindex(x::Sequence) = length(x.DUR) -Base.copy(x::Sequence) where Sequence = Sequence([deepcopy(getfield(x, k)) for k ∈ fieldnames(Sequence)]...) #Arithmetic operations recursive_merge(x::Dict{K, V}) where {K, V} = merge(recursive_merge, x...) From 291e7cfc4add801e6f84b84481847e8df8d7dbb6 Mon Sep 17 00:00:00 2001 From: Carlos Castillo Passi Date: Tue, 9 Jul 2024 23:32:01 -0400 Subject: [PATCH 3/5] Minor changes in events constructors --- KomaMRIBase/src/datatypes/sequence/ADC.jl | 45 +++++++++++++-------- KomaMRIBase/src/datatypes/sequence/Delay.jl | 7 +++- KomaMRIBase/src/datatypes/sequence/Grad.jl | 20 ++++----- KomaMRIBase/src/datatypes/sequence/RF.jl | 15 ++++--- 4 files changed, 51 insertions(+), 36 deletions(-) diff --git a/KomaMRIBase/src/datatypes/sequence/ADC.jl b/KomaMRIBase/src/datatypes/sequence/ADC.jl index 99e8f3d2a..1530945a0 100644 --- a/KomaMRIBase/src/datatypes/sequence/ADC.jl +++ b/KomaMRIBase/src/datatypes/sequence/ADC.jl @@ -1,7 +1,7 @@ """ - adc = ADC(N, T) - adc = ADC(N, T, delay) - adc = ADC(N, T, delay, Δf, ϕ) + adc = ADC(N, T) + adc = ADC(N, T, delay) + adc = ADC(N, T, delay, Δf, ϕ) The ADC struct represents the Analog to Digital Converter (ADC) of a sequence event. @@ -29,24 +29,35 @@ mutable struct ADC Δf::Float64 ϕ::Float64 function ADC(N, T, delay, Δf, ϕ) - T < 0 || delay < 0 ? error("ADC timings must be positive.") : new(N, T, delay, Δf, ϕ) + if T < 0 || delay < 0 + error("ADC timings must be positive.") + end + return new(N, T, delay, Δf, ϕ) end function ADC(N, T, delay) - T < 0 || delay < 0 ? error("ADC timings must be positive.") : new(N, T, delay, 0, 0) + if T < 0 || delay < 0 + error("ADC timings must be positive.") + end + return new(N, T, delay, 0.0, 0.0) end function ADC(N, T) - T < 0 ? error("ADC timings must be positive.") : new(N, T, 0, 0, 0) + if T < 0 + error("ADC timings must be positive.") + end + return new(N, T, 0.0, 0.0, 0.0) end end # ADC comparison -Base.isapprox(adc1::ADC, adc2::ADC) = begin - return all(length(getfield(adc1, k)) ≈ length(getfield(adc2, k)) for k ∈ fieldnames(ADC)) - all(getfield(adc1, k) ≈ getfield(adc2, k) for k ∈ fieldnames(ADC)) +function Base.isapprox(adc1::ADC, adc2::ADC) + return all( + length(getfield(adc1, k)) ≈ length(getfield(adc2, k)) for k in fieldnames(ADC) + ) + all(getfield(adc1, k) ≈ getfield(adc2, k) for k in fieldnames(ADC)) end """ - y = getproperty(x::Vector{ADC}, f::Symbol) + y = getproperty(x::Vector{ADC}, f::Symbol) Overloads Base.getproperty(). It is meant to access properties of the ADC vector `x` directly without the need to iterate elementwise. @@ -54,15 +65,15 @@ directly without the need to iterate elementwise. # Arguments - `x`: (`::Vector{ADC}`) vector of ADC structs - `f`: (`::Symbol`, opts: [`:N`, `:T`, `:delay`, `:Δf`, `:ϕ`, `:dur`]) input symbol that - represents a property of the ADC structs + represents a property of the ADC structs # Returns - `y`: (`::Vector{Any}`) vector with the property defined by the `f` for all elements of - the ADC vector `x` + the ADC vector `x` """ getproperty(x::Vector{ADC}, f::Symbol) = begin if f == :dur - dur.(x) + dur.(x) elseif f in fieldnames(ADC) getfield.(x, f) else @@ -71,7 +82,7 @@ getproperty(x::Vector{ADC}, f::Symbol) = begin end """ - times = get_adc_sampling_times(seq) + times = get_adc_sampling_times(seq) Returns an array of times when the samples of the sequence `seq` are acquired. @@ -85,10 +96,10 @@ function get_adc_sampling_times(seq) T0 = get_block_start_times(seq) t = zeros(Float64, sum(seq.ADC.N)) idx = 1 - for i = 1:length(seq) + for i in 1:length(seq) if is_ADC_on(seq[i]) N = seq.ADC[i].N - t[idx:idx+N-1] .= times(seq.ADC[i]) .+ T0[i] + t[idx:(idx + N - 1)] .= times(seq.ADC[i]) .+ T0[i] idx += N end end @@ -96,7 +107,7 @@ function get_adc_sampling_times(seq) end """ - comp = get_adc_phase_compensation(seq) + comp = get_adc_phase_compensation(seq) Returns an array of phase compensation factors, ``\\exp(-\\mathrm{i}\\varphi)``, which are used to compensate the acquired signal ``S`` by applying the operation diff --git a/KomaMRIBase/src/datatypes/sequence/Delay.jl b/KomaMRIBase/src/datatypes/sequence/Delay.jl index 2ad619624..ac49e06ec 100644 --- a/KomaMRIBase/src/datatypes/sequence/Delay.jl +++ b/KomaMRIBase/src/datatypes/sequence/Delay.jl @@ -21,7 +21,10 @@ julia> seq = delay + s; plot_seq(seq) struct Delay T::Real function Delay(T) - T < 0 ? error("Delays must be positive.") : new(T) + if T < 0 + error("Delays must be positive.") + end + return new(T) end end @@ -57,7 +60,7 @@ sequence. +(s::Sequence, d::Delay) = s + empty_seq(d.T) +(d::Delay, s::Sequence) = empty_seq(d.T) + s function empty_seq(T) - seq = Sequence([Grad(0., 0.);;]) + seq = Sequence([Grad(0., 0.);;]) # 1-block empty sequence (!= Sequence(), which is a 0-block empty sequence) seq.DUR[1] = T return seq end diff --git a/KomaMRIBase/src/datatypes/sequence/Grad.jl b/KomaMRIBase/src/datatypes/sequence/Grad.jl index 56c398df7..970701ed6 100644 --- a/KomaMRIBase/src/datatypes/sequence/Grad.jl +++ b/KomaMRIBase/src/datatypes/sequence/Grad.jl @@ -84,32 +84,28 @@ mutable struct Grad first last function Grad(A, T, rise, fall, delay) - return if all(T .< 0) || rise < 0 || fall < 0 || delay < 0 + if all(T .< 0) || rise < 0 || fall < 0 || delay < 0 error("Gradient timings must be positive.") - else - new(A, T, rise, fall, delay, 0.0, 0.0) end + return new(A, T, rise, fall, delay, 0.0, 0.0) end function Grad(A, T, rise, delay) - return if all(T .< 0) < 0 || rise < 0 || delay < 0 + if all(T .< 0) || rise < 0 || delay < 0 error("Gradient timings must be positive.") - else - new(A, T, rise, rise, delay, 0.0, 0.0) end + return new(A, T, rise, rise, delay, 0.0, 0.0) end function Grad(A, T, rise) - return if all(T .< 0) < 0 || rise < 0 + if all(T .< 0) || rise < 0 error("Gradient timings must be positive.") - else - new(A, T, rise, rise, 0.0, 0.0, 0.0) end + return new(A, T, rise, rise, 0.0, 0.0, 0.0) end function Grad(A, T) - return if all(T .< 0) < 0 + if all(T .< 0) error("Gradient timings must be positive.") - else - new(A, T, 0.0, 0.0, 0.0, 0.0, 0.0) end + return new(A, T, 0.0, 0.0, 0.0, 0.0, 0.0) end end diff --git a/KomaMRIBase/src/datatypes/sequence/RF.jl b/KomaMRIBase/src/datatypes/sequence/RF.jl index d8a9d28ee..0a4d257b2 100644 --- a/KomaMRIBase/src/datatypes/sequence/RF.jl +++ b/KomaMRIBase/src/datatypes/sequence/RF.jl @@ -29,17 +29,22 @@ mutable struct RF Δf delay::Real function RF(A, T, Δf, delay) - return if any(T .< 0) || delay < 0 + if any(T .< 0) || delay < 0 error("RF timings must be non-negative.") - else - new(A, T, Δf, delay) end + return new(A, T, Δf, delay) end function RF(A, T, Δf) - return any(T .< 0) ? error("RF timings must be non-negative.") : new(A, T, Δf, 0.0) + if any(T .< 0) + error("RF timings must be non-negative.") + end + return new(A, T, Δf, 0.0) end function RF(A, T) - return any(T .< 0) ? error("RF timings must be non-negative.") : new(A, T, 0.0, 0.0) + if any(T .< 0) + error("RF timings must be non-negative.") + end + return new(A, T, 0.0, 0.0) end end From 17bd6b7c9cbf5c12dc1763b7e2378cb69b3733b0 Mon Sep 17 00:00:00 2001 From: Carlos Castillo Passi Date: Tue, 9 Jul 2024 23:34:02 -0400 Subject: [PATCH 4/5] Added Aqua tests --- KomaMRIBase/test/Project.toml | 1 + KomaMRIBase/test/runtests.jl | 10 +++++----- KomaMRICore/test/Project.toml | 1 + KomaMRICore/test/runtests.jl | 5 +++++ KomaMRIFiles/test/Project.toml | 1 + KomaMRIFiles/test/runtests.jl | 5 +++++ KomaMRIPlots/test/Project.toml | 1 + KomaMRIPlots/test/runtests.jl | 5 +++++ test/Project.toml | 1 + test/runtests.jl | 5 +++++ 10 files changed, 30 insertions(+), 5 deletions(-) diff --git a/KomaMRIBase/test/Project.toml b/KomaMRIBase/test/Project.toml index 3c949256c..13e1e4f36 100644 --- a/KomaMRIBase/test/Project.toml +++ b/KomaMRIBase/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" KomaMRIBase = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c" Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/KomaMRIBase/test/runtests.jl b/KomaMRIBase/test/runtests.jl index d57a4e14f..823455eb9 100644 --- a/KomaMRIBase/test/runtests.jl +++ b/KomaMRIBase/test/runtests.jl @@ -177,11 +177,6 @@ using TestItems, TestItemRunner delay = Delay(T) @test delay.T ≈ T - # Test delay construction error for negative values - err = Nothing - try Delay(-T) catch err end - @test err isa ErrorException - # Just checking to ensure that show() doesn't get stuck and that it is covered show(IOBuffer(), "text/plain", delay) @test true @@ -655,3 +650,8 @@ end @test KomaMRIBase.trapz(dt, x)[1] ≈ 4 #Triangle area = bh/2, with b = 4 and h = 2 @test KomaMRIBase.cumtrapz(dt, x) ≈ [0.5 2 3.5 4] end + +@testitem "Aqua" tags=[:base, :aqua] begin + using Aqua + Aqua.test_all(KomaMRIBase) +end \ No newline at end of file diff --git a/KomaMRICore/test/Project.toml b/KomaMRICore/test/Project.toml index e625b4a9b..f8c6fe63a 100644 --- a/KomaMRICore/test/Project.toml +++ b/KomaMRICore/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" KomaMRIBase = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c" diff --git a/KomaMRICore/test/runtests.jl b/KomaMRICore/test/runtests.jl index 77246c48e..aec4cd0aa 100644 --- a/KomaMRICore/test/runtests.jl +++ b/KomaMRICore/test/runtests.jl @@ -400,4 +400,9 @@ end @suppress print_devices() @test true +end + +@testitem "Aqua" tags=[:core, :aqua] begin + using Aqua + Aqua.test_all(KomaMRICore) end \ No newline at end of file diff --git a/KomaMRIFiles/test/Project.toml b/KomaMRIFiles/test/Project.toml index 46d8c78de..2a257ffe1 100644 --- a/KomaMRIFiles/test/Project.toml +++ b/KomaMRIFiles/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" KomaMRIBase = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c" KomaMRIFiles = "fcf631a6-1c7e-4e88-9e64-b8888386d9dc" MAT = "23992714-dd62-5051-b70f-ba57cb901cac" diff --git a/KomaMRIFiles/test/runtests.jl b/KomaMRIFiles/test/runtests.jl index cca82be15..f5645fdf5 100644 --- a/KomaMRIFiles/test/runtests.jl +++ b/KomaMRIFiles/test/runtests.jl @@ -133,3 +133,8 @@ end end end end + +@testitem "Aqua" tags=[:files, :aqua] begin + using Aqua + Aqua.test_all(KomaMRIFiles) +end \ No newline at end of file diff --git a/KomaMRIPlots/test/Project.toml b/KomaMRIPlots/test/Project.toml index 34d379088..e3842ef54 100644 --- a/KomaMRIPlots/test/Project.toml +++ b/KomaMRIPlots/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" KomaMRIBase = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c" KomaMRIPlots = "76db0263-63f3-4d26-bb9a-5dba378db904" MRIFiles = "5a6f062f-bf45-497d-b654-ad17aae2a530" diff --git a/KomaMRIPlots/test/runtests.jl b/KomaMRIPlots/test/runtests.jl index e9533ff95..447336081 100644 --- a/KomaMRIPlots/test/runtests.jl +++ b/KomaMRIPlots/test/runtests.jl @@ -5,3 +5,8 @@ using TestItems, TestItemRunner #GUI tests include("GUI_PlotlyJS_backend_test.jl") include("GUI_PlutoPlotly_backend_test.jl") + +@testitem "Aqua" tags=[:plots, :aqua] begin + using Aqua + Aqua.test_all(KomaMRIPlots) +end diff --git a/test/Project.toml b/test/Project.toml index 86cc5d268..de30d771f 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,5 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Blink = "ad839575-38b3-5650-b840-f874b8c74a25" Interact = "c601a237-2ae4-5e1e-952c-7a85b0c7eef1" KomaMRI = "6a340f8b-2cdf-4c04-99be-4953d9b66d0a" diff --git a/test/runtests.jl b/test/runtests.jl index 9806ff246..ce2abbe92 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -130,3 +130,8 @@ end end end + +@testitem "Aqua" tags=[:koma, :aqua] begin + using Aqua + Aqua.test_all(KomaMRI) +end \ No newline at end of file From f546eb27bee225ffb3d21b70b2c0e29c969be8a0 Mon Sep 17 00:00:00 2001 From: Carlos Castillo Passi Date: Tue, 9 Jul 2024 23:36:28 -0400 Subject: [PATCH 5/5] Minor plot changes --- KomaMRIPlots/src/ui/DisplayFunctions.jl | 46 ++++++++++++++++++------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/KomaMRIPlots/src/ui/DisplayFunctions.jl b/KomaMRIPlots/src/ui/DisplayFunctions.jl index 4d181c409..1dcf0636d 100644 --- a/KomaMRIPlots/src/ui/DisplayFunctions.jl +++ b/KomaMRIPlots/src/ui/DisplayFunctions.jl @@ -235,6 +235,7 @@ function plot_seq( legendgroup="Gx", showlegend=showlegend, marker=attr(; color="#636EFA"), + mode="lines", ) p[2] = scatter_fun(; x=gy.t * 1e3, @@ -246,6 +247,7 @@ function plot_seq( legendgroup="Gy", showlegend=showlegend, marker=attr(; color="#EF553B"), + mode="lines", ) p[3] = scatter_fun(; x=gz.t * 1e3, @@ -257,6 +259,7 @@ function plot_seq( legendgroup="Gz", showlegend=showlegend, marker=attr(; color="#00CC96"), + mode="lines", ) # For RFs @@ -276,6 +279,7 @@ function plot_seq( legendgroup="|B1|_AM", showlegend=showlegend, marker=attr(; color="#AB63FA"), + mode="lines", ) p[2j + 3] = scatter_fun(; x=rf.t * 1e3, @@ -289,6 +293,7 @@ function plot_seq( legendgroup="∠B1_AM", showlegend=showlegend, marker=attr(; color="#FFA15A"), + mode="lines", ) if !freq_in_phase p[2j + 4] = scatter_fun(; @@ -304,6 +309,7 @@ function plot_seq( showlegend=showlegend, marker=attr(; color="#AB63FA"), line=attr(; dash="dot"), + mode="lines", ) end end @@ -319,7 +325,7 @@ function plot_seq( yaxis=yaxis, legendgroup="ADC", showlegend=showlegend, - mode=(show_adc ? "markers" : "line"), + mode=(show_adc ? "markers" : "lines"), marker=attr(; color="#19D3F3"), ) @@ -1583,51 +1589,67 @@ function plot_seqd(seq::Sequence; sampling_params=KomaMRIBase.default_sampling_p x=seqd.t * 1e3, y=seqd.Gx * 1e3, name="Gx", + legendgroup="Gx", mode="markers+lines", marker_symbol=:circle, + marker=attr(; color="#636EFA"), ) Gy = scattergl(; x=seqd.t * 1e3, y=seqd.Gy * 1e3, name="Gy", + legendgroup="Gy", mode="markers+lines", marker_symbol=:circle, + marker=attr(; color="#EF553B"), ) Gz = scattergl(; x=seqd.t * 1e3, y=seqd.Gz * 1e3, name="Gz", + legendgroup="Gz", mode="markers+lines", marker_symbol=:circle, + marker=attr(; color="#00CC96"), ) B1_abs = scattergl(; x=seqd.t * 1e3, y=abs.(seqd.B1 * 1e6), - name="|B1|", + name="|B1|_AM", + legendgroup="|B1|_AM", mode="markers+lines", marker_symbol=:circle, + marker=attr(; color="#AB63FA"), ) B1_angle = scattergl(; x=seqd.t * 1e3, y=angle.(seqd.B1), - name="∠B1", + name="∠B1_AM", + legendgroup="∠B1_AM", mode="markers+lines", marker_symbol=:circle, - ) - ADC = scattergl(; - x=seqd.t[seqd.ADC] * 1e3, - y=zeros(sum(seqd.ADC)), - name="ADC", - mode="markers", - marker_symbol=:x, + visible="legendonly", + marker=attr(; color="#FFA15A"), ) B1_Δf = scattergl(; x=seqd.t * 1e3, y=abs.(seqd.Δf * 1e-3), - name="B1_Δf", + name="B1_FM", + legendgroup="B1_FM", mode="markers+lines", marker_symbol=:circle, visible="legendonly", + marker=attr(; color="#AB63FA"), + ) + ADC = scattergl(; + x=seqd.t[seqd.ADC] * 1e3, + y=zeros(sum(seqd.ADC)), + name="ADC", + legendgroup="ADC", + mode="markers", + marker_symbol=:x, + marker=attr(; color="#19D3F3"), ) - return plot_koma([Gx, Gy, Gz, B1_abs, B1_angle, ADC, B1_Δf]) + + return plot_koma([Gx, Gy, Gz, B1_abs, B1_angle, B1_Δf, ADC]) end