mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
update(skew_stats): analysis on 404
This commit is contained in:
parent
1421cfbcfa
commit
b89f0e595b
2 changed files with 932 additions and 916 deletions
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 278 KiB |
|
@ -340,7 +340,7 @@ fig_skew_stats = let
|
||||||
marker = :x,
|
marker = :x,
|
||||||
color = (Makie.wong_colors()[1], 0.8),
|
color = (Makie.wong_colors()[1], 0.8),
|
||||||
axis = (
|
axis = (
|
||||||
title = "mean vs std of multiple skew measurements for same PS-Boards",
|
title = "mean vs std of multiple skew measurements for same PS Boards",
|
||||||
xlabel = "mean / ns",
|
xlabel = "mean / ns",
|
||||||
ylabel = "std / ns",
|
ylabel = "std / ns",
|
||||||
),
|
),
|
||||||
|
@ -366,7 +366,7 @@ let
|
||||||
marker = :x,
|
marker = :x,
|
||||||
color = (Makie.wong_colors()[1], 0.8),
|
color = (Makie.wong_colors()[1], 0.8),
|
||||||
axis = (
|
axis = (
|
||||||
title = "mean vs std of multiple skew measurements for same PS-Boards",
|
title = "mean vs std of multiple skew measurements for same PS Boards",
|
||||||
xlabel = "mean / ns",
|
xlabel = "mean / ns",
|
||||||
ylabel = "std / ns",
|
ylabel = "std / ns",
|
||||||
limits = ((-0.6, 1.2), (-0.01, 0.09)),
|
limits = ((-0.6, 1.2), (-0.01, 0.09)),
|
||||||
|
@ -411,7 +411,7 @@ let
|
||||||
marker = :x,
|
marker = :x,
|
||||||
color = (Makie.wong_colors()[1], 0.8),
|
color = (Makie.wong_colors()[1], 0.8),
|
||||||
axis = (
|
axis = (
|
||||||
title = "mean vs std of multiple skew measurements for same PS-Boards",
|
title = "mean vs std of multiple skew measurements for same PS Boards",
|
||||||
xlabel = "mean / ns",
|
xlabel = "mean / ns",
|
||||||
ylabel = "std / ns",
|
ylabel = "std / ns",
|
||||||
),
|
),
|
||||||
|
@ -641,7 +641,7 @@ md"""
|
||||||
- 382: ファームウェア最新
|
- 382: ファームウェア最新
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# ╔═╡ 446a1b05-b24a-46d8-94a1-bd449245075d
|
# ╔═╡ 0dd4c5fe-71d0-45d0-897e-51d1aa06bd3b
|
||||||
df_extra_measurements = let
|
df_extra_measurements = let
|
||||||
df_configs = DataFrame(
|
df_configs = DataFrame(
|
||||||
position_name = ["B-$(i)-$(j)" for j in 1:9 for i in 0:1],
|
position_name = ["B-$(i)-$(j)" for j in 1:9 for i in 0:1],
|
||||||
|
@ -667,22 +667,41 @@ df_extra_measurements = let
|
||||||
],
|
],
|
||||||
position = [1, 10, 2, 11, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9, 18],
|
position = [1, 10, 2, 11, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9, 18],
|
||||||
)
|
)
|
||||||
transform!(
|
@info "" df_configs
|
||||||
df_configs,
|
combine(
|
||||||
[:psbid, :position] =>
|
groupby(df_configs, :psbid),
|
||||||
ByRow(
|
AsTable(:) =>
|
||||||
(psbid, position) -> begin
|
(
|
||||||
runid = 382
|
sdf -> begin
|
||||||
clkfile = "../test/input/slavelogs/main/$(psbid)_$(runid)_clk.txt"
|
@assert nrow(sdf) == 1
|
||||||
skew, width =
|
map([382, 404]) do runid
|
||||||
PSBoardDataBase.ClockParser.get_skew_and_riseup(clkfile)
|
clkfile = "../test/input/slavelogs/main/$(sdf.psbid[1])_$(runid)_clk.txt"
|
||||||
offset = qaqc_positions.rising_ns[findfirst(
|
skew, width =
|
||||||
==(position),
|
PSBoardDataBase.ClockParser.get_skew_and_riseup(clkfile)
|
||||||
qaqc_positions.id,
|
offset = qaqc_positions.rising_ns[findfirst(
|
||||||
)]
|
==(sdf.position[1]),
|
||||||
[skew - offset, width]
|
qaqc_positions.id,
|
||||||
end,
|
)]
|
||||||
) => [:skew, :width],
|
return (;
|
||||||
|
position_name = sdf.position_name |> first,
|
||||||
|
psbid = sdf.psbid |> first,
|
||||||
|
position = sdf.position |> first,
|
||||||
|
skew = skew - offset,
|
||||||
|
width,
|
||||||
|
runid,
|
||||||
|
campaign_id = 6,
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
) => [
|
||||||
|
:position_name,
|
||||||
|
:psbid,
|
||||||
|
:position,
|
||||||
|
:skew,
|
||||||
|
:width,
|
||||||
|
:runid,
|
||||||
|
:campaign_id,
|
||||||
|
],
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -690,45 +709,27 @@ end
|
||||||
df_compare = let
|
df_compare = let
|
||||||
df_old_measurements =
|
df_old_measurements =
|
||||||
filter(:psbid => in(df_extra_measurements.psbid), df_skews_selected)
|
filter(:psbid => in(df_extra_measurements.psbid), df_skews_selected)
|
||||||
df_combined = leftjoin!(
|
left_cols = [:psbid, :skew, :width, :runid, :campaign_id]
|
||||||
df_old_measurements,
|
df = vcat(
|
||||||
df_extra_measurements,
|
select!(df_old_measurements, left_cols),
|
||||||
on = :psbid,
|
select(df_extra_measurements, left_cols),
|
||||||
makeunique = true,
|
|
||||||
)
|
)
|
||||||
rename!(
|
sort!(df, :runid)
|
||||||
df_combined,
|
|
||||||
:skew => :skew_old,
|
|
||||||
:width => :width_old,
|
|
||||||
:runid => :runid_old,
|
|
||||||
:campaign_id => :campaign_id_old,
|
|
||||||
:skew_1 => :skew_new,
|
|
||||||
:width_1 => :width_new,
|
|
||||||
)
|
|
||||||
select!(
|
|
||||||
df_combined,
|
|
||||||
[
|
|
||||||
:psbid,
|
|
||||||
:runid_old,
|
|
||||||
:campaign_id_old,
|
|
||||||
:skew_old,
|
|
||||||
:width_old,
|
|
||||||
:skew_new,
|
|
||||||
:width_new,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
dropmissing!(df_combined)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# ╔═╡ 3266d1fd-b8f0-4eb0-9a8e-2050bc9a626f
|
# ╔═╡ 3266d1fd-b8f0-4eb0-9a8e-2050bc9a626f
|
||||||
let
|
let
|
||||||
fig = Figure(size = (600, 500))
|
fig = Figure(size = (600, 500))
|
||||||
grd1 = fig[1, 1] = GridLayout()
|
grd1 = fig[1, 1] = GridLayout()
|
||||||
Label(grd1[0, 1:2], "skew firmware dependency", tellwidth = false)
|
Label(
|
||||||
|
grd1[0, 1:2],
|
||||||
|
"comparison of multiple measurements of clock skew for 18 PS Boards",
|
||||||
|
tellwidth = false,
|
||||||
|
)
|
||||||
ax1 = Axis(
|
ax1 = Axis(
|
||||||
grd1[1, 1],
|
grd1[1, 1],
|
||||||
limits = ((-0.15, 1.15), nothing),
|
limits = ((-0.15, 2.35), nothing),
|
||||||
xticks = (0:1, ["old", "new(382)"]),
|
xticks = (0:2, ["old", "new(382)", "new(404)"]),
|
||||||
ylabel = "skew / ns",
|
ylabel = "skew / ns",
|
||||||
)
|
)
|
||||||
ax2 = Axis(
|
ax2 = Axis(
|
||||||
|
@ -741,39 +742,50 @@ let
|
||||||
yminorgridvisible = true,
|
yminorgridvisible = true,
|
||||||
)
|
)
|
||||||
colsize!(grd1, 2, Relative(0.4))
|
colsize!(grd1, 2, Relative(0.4))
|
||||||
for row in eachrow(df_compare)
|
for (key, sdf) in pairs(groupby(df_compare, :psbid))
|
||||||
|
@assert sdf.runid[2] == 382 && sdf.runid[3] == 404
|
||||||
scatterlines!(
|
scatterlines!(
|
||||||
ax1,
|
ax1,
|
||||||
0:1,
|
0:1:2,
|
||||||
[row.skew_old, row.skew_new],
|
sdf.skew,
|
||||||
color = Makie.wong_colors()[row.campaign_id_old],
|
color = Makie.wong_colors()[sdf.campaign_id[1]],
|
||||||
|
alpha = 0.7,
|
||||||
)
|
)
|
||||||
scatter!(
|
scatter!(
|
||||||
ax2,
|
ax2,
|
||||||
row.campaign_id_old,
|
sdf.campaign_id[1],
|
||||||
row.skew_new - row.skew_old,
|
mean(@view(sdf.skew[2:3])) - sdf.skew[1],
|
||||||
marker = :x,
|
marker = :x,
|
||||||
color = Makie.wong_colors()[row.campaign_id_old],
|
color = Makie.wong_colors()[sdf.campaign_id[1]],
|
||||||
alpha = 0.7,
|
alpha = 0.7,
|
||||||
)
|
)
|
||||||
|
errorbars!(
|
||||||
|
ax2,
|
||||||
|
[sdf.campaign_id[1]],
|
||||||
|
[mean(@view(sdf.skew[2:3])) - sdf.skew[1]],
|
||||||
|
[std(@view(sdf.skew[2:3]))],
|
||||||
|
color = Makie.wong_colors()[sdf.campaign_id[1]],
|
||||||
|
alpha = 0.4,
|
||||||
|
whiskerwidth = 5,
|
||||||
|
)
|
||||||
|
text!(
|
||||||
|
ax1,
|
||||||
|
2,
|
||||||
|
sdf.skew |> last,
|
||||||
|
text = string(sdf.psbid[1]),
|
||||||
|
color = (:black, 0.5),
|
||||||
|
align = (:left, :center),
|
||||||
|
)
|
||||||
|
text!(
|
||||||
|
ax2,
|
||||||
|
sdf.campaign_id[1],
|
||||||
|
mean(@view(sdf.skew[2:3])) - sdf.skew[1],
|
||||||
|
text = string(sdf.psbid[1]),
|
||||||
|
color = (:black, 0.5),
|
||||||
|
align = (:left, :center),
|
||||||
|
)
|
||||||
end
|
end
|
||||||
text!(
|
campaigns = df_compare.campaign_id |> unique |> sort!
|
||||||
ax1,
|
|
||||||
fill(1, nrow(df_compare)),
|
|
||||||
df_compare.skew_new,
|
|
||||||
text = string.(df_compare.psbid),
|
|
||||||
color = (:black, 0.5),
|
|
||||||
align = (:left, :center),
|
|
||||||
)
|
|
||||||
text!(
|
|
||||||
ax2,
|
|
||||||
df_compare.campaign_id_old,
|
|
||||||
df_compare.skew_new .- df_compare.skew_old,
|
|
||||||
text = string.(df_compare.psbid),
|
|
||||||
color = (:black, 0.5),
|
|
||||||
align = (:left, :center),
|
|
||||||
)
|
|
||||||
campaigns = df_compare.campaign_id_old |> unique |> sort!
|
|
||||||
Legend(
|
Legend(
|
||||||
grd1[2, 1],
|
grd1[2, 1],
|
||||||
[
|
[
|
||||||
|
@ -1073,10 +1085,7 @@ let
|
||||||
fig[1, 1],
|
fig[1, 1],
|
||||||
title = "distribution of rise up spans",
|
title = "distribution of rise up spans",
|
||||||
xlabel = "time / ns",
|
xlabel = "time / ns",
|
||||||
xticks = (
|
xticks = (bins, string.(round.(bins, digits = 3))),
|
||||||
bins,
|
|
||||||
string.(round.(bins, digits = 3)),
|
|
||||||
),
|
|
||||||
xticklabelrotation = π / 3,
|
xticklabelrotation = π / 3,
|
||||||
)
|
)
|
||||||
h1 = hist!(
|
h1 = hist!(
|
||||||
|
@ -1257,7 +1266,7 @@ end
|
||||||
# ╠═939aba6b-b03c-42b6-83b3-9cea5f4eb858
|
# ╠═939aba6b-b03c-42b6-83b3-9cea5f4eb858
|
||||||
# ╠═aa9b78bc-8d66-4df2-bd06-1cbf21190488
|
# ╠═aa9b78bc-8d66-4df2-bd06-1cbf21190488
|
||||||
# ╠═76f44129-34c6-451d-af3f-4593dd1dda5c
|
# ╠═76f44129-34c6-451d-af3f-4593dd1dda5c
|
||||||
# ╠═446a1b05-b24a-46d8-94a1-bd449245075d
|
# ╠═0dd4c5fe-71d0-45d0-897e-51d1aa06bd3b
|
||||||
# ╠═148e42fc-d168-4e07-b4f8-f9c3f8c18efc
|
# ╠═148e42fc-d168-4e07-b4f8-f9c3f8c18efc
|
||||||
# ╠═3266d1fd-b8f0-4eb0-9a8e-2050bc9a626f
|
# ╠═3266d1fd-b8f0-4eb0-9a8e-2050bc9a626f
|
||||||
# ╠═660f2bd1-d4bc-45a8-9cf6-4e875aa9f7a2
|
# ╠═660f2bd1-d4bc-45a8-9cf6-4e875aa9f7a2
|
||||||
|
|
Loading…
Add table
Reference in a new issue