Skip to content

Commit

Permalink
Replace resolution with size in Makie figure commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasvarga committed Feb 4, 2024
1 parent 6b86cd8 commit 33b80f2
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Examples/Ex7_1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ poles = gpole(g)
println(" Exact poles Computed poles")
display([pexact poles])

fig = Figure(;font = "CMU Serif", fontsize=14, resolution = (600, 600))
fig = Figure(;font = "CMU Serif", fontsize=14, size = (600, 600))
ax = Axis(fig[1, 1], title = "Poles of 1/((s+1)(s+2)...(s+25))",
ylabel = "Imaginary Axis",
xlabel = "Real Axis")
Expand Down
2 changes: 1 addition & 1 deletion Examples/Ex7_1a.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ poles = gpole(g)
println(" Exact poles Computed poles")
display([pexact poles])

fig = Figure(;font = "CMU Serif", fontsize=14, resolution = (600, 600))
fig = Figure(;font = "CMU Serif", fontsize=14, size = (600, 600))
ax = Axis(fig[1, 1], title = "Poles of 1/((s+1)(s+2)...(s+25))",
ylabel = "Imaginary Axis",
xlabel = "Real Axis")
Expand Down
4 changes: 2 additions & 2 deletions Examples/Fig5_2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title_u = [ latexstring("From: \$f_1\$") latexstring("From: \$f_2\$") latexstr
ylabel_r = [ latexstring("To: \$r_1\$") latexstring("To: \$r_2\$") ]

ns, p, m = size(y)
fig = Figure(resolution = (800, 600))
fig = Figure(size = (800, 600))

axs = [Axis(fig[row, col]) for row in 1:p, col in 1:m]

Expand Down Expand Up @@ -45,4 +45,4 @@ axs[2,1].yticks = [0,0.5,1,1.5]
fig

# comment out next line to save plot
# save("Fig5_2.pdf", fig, resolution = (800, 600))
# save("Fig5_2.pdf", fig, size = (800, 600))
4 changes: 2 additions & 2 deletions Examples/Fig6_1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set_theme!()
n, m = size(distinf)
x = 1:n; y = 1:m; z = distinf
set_theme!(colormap = :Hiroshige)
fig1 = Figure(resolution = (800, 600))
fig1 = Figure(size = (800, 600))
ax3d = Axis3(fig1[1, 1]; aspect = (1, 1, 0.2), perspectiveness = 0.1, elevation = 0.87, azimuth = 3.9,
title = "Norms of residual models",
xlabel = "Model numbers",
Expand All @@ -22,7 +22,7 @@ ax3d.yticks = 1:m
fig1

# comment out next line to save plot
#save("Fig6_1.pdf", fig1, resolution = (800, 600))
#save("Fig6_1.pdf", fig1, size = (800, 600))



4 changes: 2 additions & 2 deletions Examples/Fig6_2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ N, M = size(R.sys)
titles = [ "Model $i" for i in 1:M]
ylabelr = [ latexstring("\$r^{($i)}\$") for i in 1:N]

fig2 = Figure(resolution = (1200, 800))
fig2 = Figure(size = (1200, 800))

axs = [Axis(fig2[row, col], yticks = WilkinsonTicks(3)) for row in 1:N, col in 1:M]
y = zeros(101,1,2); tout = zeros(101);
Expand All @@ -36,4 +36,4 @@ Label(fig2[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig2

# comment out next line to save plot
# save("Fig6_2.pdf", fig2, resolution = (1200, 800))
# save("Fig6_2.pdf", fig2, size = (1200, 800))
4 changes: 2 additions & 2 deletions Examples/Fig6_3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ylabelr = [ latexstring("\$\\theta_$i\$") for i in 1:N]
# ind = [2, 4, 5, 9]
# ylabelr[ind] = [ L"\theta_$i\newline" for i in ind]

fig = Figure(;font = "CMU Serif", fontsize=14, resolution = (1200, 800))
fig = Figure(;font = "CMU Serif", fontsize=14, size = (1200, 800))

axs = [Axis(fig[row, col], yticks = WilkinsonTicks(3)) for row in 1:N, col in 1:M]
nr = size(R.sys[1,1],1)
Expand Down Expand Up @@ -55,4 +55,4 @@ rowgap!(fig.layout, 15)
fig

# comment out next line to save plot
#save("Fig6_3.pdf", fig, resolution = (1200, 800))
#save("Fig6_3.pdf", fig, size = (1200, 800))
4 changes: 2 additions & 2 deletions Examples/Fig8_2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ yticks = [[-20,0,20],[-20,0,20],[-20,0,20],[" 0"," 10"," 20"],[" 0"," 1"
yhighs = [20,20,20,20,2,2]
ylows = [-20,-20,-20,-1,-0.1,-0.1]
ns, p, m = size(y)
fig1 = Figure(resolution = (800, 600))
fig1 = Figure(size = (800, 600))

axs = [Axis(fig1[row, col]) for row in 1:p, col in 1:m]

Expand Down Expand Up @@ -43,4 +43,4 @@ Label(fig1[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig1

# comment out next line to save plot
#save("Fig8_2.pdf", fig1, resolution = (800, 600))
#save("Fig8_2.pdf", fig1, size = (800, 600))
4 changes: 2 additions & 2 deletions Examples/Fig8_3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yticks = [[-50,0,50],[-50,0,50],[-50,0,50],[-50,0,50],[-10,0,10],[" 0"," 1",
yhighs = [50,50,50,51,10,2]
ylows = [-50,-51,-51,-50,-10,-0.2]
ns, p, m = size(y[1])
fig2 = Figure(resolution = (800, 600))
fig2 = Figure(size = (800, 600))

axs = [Axis(fig2[row, col]) for row in 1:p, col in 1:m]

Expand Down Expand Up @@ -43,4 +43,4 @@ Label(fig2[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig2

# comment out next line to save plot
#save("Fig8_3.pdf", fig2, resolution = (800, 600))
#save("Fig8_3.pdf", fig2, size = (800, 600))
4 changes: 2 additions & 2 deletions Examples/Fig8_4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ N = length(y)
title_u = reshape([ latexstring("From: \$f_$i\$") for i in 1:mf],1,mf)
ylabel_r = reshape([ latexstring("To: \$r_$i\$") for i in 1:mf],1,mf)
ns, pp, mm = size(y[1])
fig = Figure(resolution = (800, 600))
fig = Figure(size = (800, 600))

axs = [Axis(fig[row, col]) for row in 1:pp, col in 1:mm]

Expand Down Expand Up @@ -40,4 +40,4 @@ Label(fig[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig

# comment out next line to save plot
# save("Fig8_4.pdf", fig, resolution = (800, 600))
# save("Fig8_4.pdf", fig, size = (800, 600))
4 changes: 2 additions & 2 deletions Examples/Fig8_5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ N = length(y)
title_u = [ L"From: $f_1$" L"From: $f_2$" L"From: $u_1$" L"From: $u_2$" L"From: $u_3$" L"From: $d_1$" L"From: $d_2$"]
ylabel_r = [ latexstring("To: \$r_1\$") latexstring("To: \$r_2\$") ]
ns, pp, mm = size(y[1])
fig1 = Figure(resolution = (800, 500))
fig1 = Figure(size = (800, 500))

axs = [Axis(fig1[row, col]) for row in 1:pp, col in 1:mm]
inputs = [mu+md .+ (1:mf); 1:mu+md]
Expand Down Expand Up @@ -40,4 +40,4 @@ Label(fig1[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig1

# comment out next line to save plot
# save("Fig8_5.pdf", fig1, resolution = (800, 500))
# save("Fig8_5.pdf", fig1, size = (800, 500))
4 changes: 2 additions & 2 deletions Examples/Fig8_6.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ yticks = [[" -1", "0", "1", "2"],[-50,0,50,100]]
yhighs = [2,100]
ylows = [-1,-50]
ns, pp, mm = size(y[1])
fig2 = Figure(resolution = (800, 500))
fig2 = Figure(size = (800, 500))

axs = [Axis(fig2[row, col]) for row in 1:pp, col in 1:mm]
inputs = [mu+md .+ (1:mf); 1:mu+md]
Expand Down Expand Up @@ -43,4 +43,4 @@ Label(fig2[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig2

# comment out next line to save plot
# save("Fig8_6.pdf", fig2, resolution = (800, 500))
# save("Fig8_6.pdf", fig2, size = (800, 500))
4 changes: 2 additions & 2 deletions Examples/Fig8_7.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ N = length(y)
title_u = [ L"From: $f_1$" L"From: $f_2$" L"From: $u_1$" L"From: $u_2$" L"From: $u_3$" L"From: $d_1$" L"From: $d_2$"]
ylabel_r = [ latexstring("To: \$r_1\$") latexstring("To: \$r_2\$") ]
ns, pp, mm = size(y[1])
fig3 = Figure(resolution = (800, 500))
fig3 = Figure(size = (800, 500))

axs = [Axis(fig3[row, col]) for row in 1:pp, col in 1:mm]
inputs = [mu+md .+ (1:mf); 1:mu+md]
Expand Down Expand Up @@ -40,4 +40,4 @@ Label(fig3[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig3

# comment out next line to save plot
# save("Fig8_7.pdf", fig3, resolution = (800, 500))
# save("Fig8_7.pdf", fig3, size = (800, 500))
4 changes: 2 additions & 2 deletions Examples/Fig8_8.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ N = length(y)
title_u = [ L"From: $f_1$" L"From: $f_2$" L"From: $u_1$" L"From: $u_2$" L"From: $u_3$" L"From: $d_1$" L"From: $d_2$"]
ylabel_r = [ latexstring("To: \$r_1\$") latexstring("To: \$r_2\$") ]
ns, pp, mm = size(y[1])
fig = Figure(resolution = (800, 500))
fig = Figure(size = (800, 500))

axs = [Axis(fig[row, col]) for row in 1:pp, col in 1:mm]
inputs = [mu+md .+ (1:mf); 1:mu+md]
Expand Down Expand Up @@ -40,4 +40,4 @@ Label(fig[end+1, :], text = "Time (seconds)", font = "TeX Gyre Heros Bold",
fig

# comment out next line to save plot
# save("Fig8_8.pdf", fig, resolution = (800, 500))
# save("Fig8_8.pdf", fig, size = (800, 500))
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ the [DescriptorSystems](https://github.com/andreasvarga/DescriptorSystems.jl) pa

The implemented functions are based on the computational procedures described in Chapters 5, 6 and 7 of the book:

**Andreas Varga**, [Solving Fault Diagnosis Problems, Linear Synthesis Techniques](https://www.springer.com/us/book/9783319515588), vol. 84 of Studies in Systems, Decision and Control, Springer International Publishing, 2017.
**Andreas Varga**, [Solving Fault Diagnosis Problems - Linear Synthesis Techniques with Julia Code Examples](https://link.springer.com/book/10.1007/978-3-031-35767-1), vol. 482 of Studies in Systems, Decision and Control, Springer International Publishing, 2024.

This book describes the mathematical background of solving synthesis problems of fault detection and model detection filters and gives detailed descriptions of the underlying synthesis procedures.

Expand Down
4 changes: 2 additions & 2 deletions src/FDIsynthesis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function efdisyn(sysf::FDIModel{T}, SFDI::Union{BitMatrix,BitVector,Array{Bool,2
sdeg::Union{Real,Missing} = missing, smarg::Union{Real,Missing} = missing,
nullspace::Bool = true, minimal::Bool = true, simple::Bool = false, separate::Bool = false,
FDtol::Real = 0.0001, FDGainTol::Real = 0.01, FDfreq::Union{AbstractVector{<:Real},Real,Missing} = missing,
tcond::Real = 1.e4, HDesign::Union{Missing, Vector{<:AbstractMatrix{<:Real}}} = missing,
tcond::Real = 1.e4, HDesign::Union{Missing, Vector{<:AbstractMatrix}} = missing,
offset::Real = sqrt(eps(float(real(T)))), atol::Real = zero(float(real(T))), atol1::Real = atol, atol2::Real = atol, atol3::Real = atol,
rtol::Real = ((size(sysf.sys.A,1)+1)*eps(real(float(one(T)))))*iszero(max(atol1,atol2)),
fast::Bool = true) where {T}
Expand Down Expand Up @@ -2669,7 +2669,7 @@ function afdisyn(sysf::FDIModel{T}, SFDI::Union{BitMatrix,BitVector,Array{Bool,2
sdeg::Union{Real,Missing} = missing, smarg::Union{Real,Missing} = missing,
nullspace::Bool = true, minimal::Bool = true, simple::Bool = false, separate::Bool = false,
FDtol::Real = 0.0001, FDGainTol::Real = 0.01, FDfreq::Union{AbstractVector{<:Real},Real,Missing} = missing,
tcond::Real = 1.e4, HDesign::Union{Missing, Vector{<:AbstractMatrix{<:Real}}} = missing, HDesign2::Union{Missing, Vector{<:AbstractMatrix{<:Real}}} = missing,
tcond::Real = 1.e4, HDesign::Union{Missing, Vector{<:AbstractMatrix}} = missing, HDesign2::Union{Missing, Vector{<:AbstractMatrix}} = missing,
offset::Real = sqrt(eps(float(real(T)))), atol::Real = zero(float(real(T))), atol1::Real = atol, atol2::Real = atol, atol3::Real = atol,
rtol::Real = ((size(sysf.sys.A,1)+1)*eps(real(float(one(T)))))*iszero(max(atol1,atol2)),
fast::Bool = true, exact::Bool = false, gamma::Real = 1, epsreg::Real = 0.1,
Expand Down

0 comments on commit 33b80f2

Please sign in to comment.