add skew position dependency search

This commit is contained in:
Wataru Otsubo 2024-10-01 21:16:04 +09:00
parent 65513d1973
commit c0bd4b01b2

View file

@ -87,17 +87,17 @@ md"""
skews_for_each_board = combine(groupby(single_run_result, :psboard_id)) do sdf skews_for_each_board = combine(groupby(single_run_result, :psboard_id)) do sdf
if all(ismissing, sdf.lvds_tx_skew) if all(ismissing, sdf.lvds_tx_skew)
if any(>(Date(now()) - Day(1)), sdf.run_timestamp) if any(>(Date(now()) - Day(1)), sdf.run_timestamp)
return (; lvds_tx_skew = missing) return (; lvds_tx_skew = missing, position = missing)
end end
@info "all skew is missing" sdf sdf.result_note @info "all skew is missing" sdf sdf.result_note
end end
skew = if nrow(sdf) == 1 row = if nrow(sdf) == 1
sdf[1, :lvds_tx_skew] sdf[1, :]
else else
sdf[argmax(sdf.run_timestamp), :lvds_tx_skew] sdf[argmax(sdf.run_timestamp), :]
end end
# @info "" sdf Tables.schema(sdf) names(sdf) # @info "" sdf Tables.schema(sdf) names(sdf)
(; lvds_tx_skew = skew) (; lvds_tx_skew = row.lvds_tx_skew, position = row.position)
end end
# ╔═╡ b23f3f63-4c6f-476f-aab8-22069940325e # ╔═╡ b23f3f63-4c6f-476f-aab8-22069940325e
@ -172,6 +172,30 @@ This passes the single run because the first and last line satisfy criteria.
But of course this should not be passed. But of course this should not be passed.
""" """
# ╔═╡ 8c9e18cb-236f-4b57-97ea-323ac4f962d9
md"""
# Dependency on positions
"""
# ╔═╡ d4f56ef7-9aa4-4d33-bce4-ae29910607c4
pos_id_map = map(enumerate("B-$i-$j" for i in 0:1 for j in 1:9)) do (i, s)
s => i
end |> Dict
# ╔═╡ d2430bd9-bd01-43dc-83f4-82c905f5a410
let
df = dropmissing(skews_for_each_board)
rainclouds(
df.position .|> passmissing(p -> pos_id_map[p]),
df.lvds_tx_skew,
axis = (;
title = "skew position dependency",
xticks = (values(pos_id_map) |> collect, keys(pos_id_map) |> collect),
xticklabelrotation = π / 2,
)
)
end
# ╔═╡ 00000000-0000-0000-0000-000000000001 # ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """ PLUTO_PROJECT_TOML_CONTENTS = """
[deps] [deps]
@ -1763,5 +1787,8 @@ version = "3.6.0+0"
# ╠═6a791331-a896-462e-90c3-1eea3d72e0db # ╠═6a791331-a896-462e-90c3-1eea3d72e0db
# ╠═2e47c2b0-4568-4ac2-9926-239de48b0ca3 # ╠═2e47c2b0-4568-4ac2-9926-239de48b0ca3
# ╟─099fae93-0fe6-40f1-bdc5-d23738f3f854 # ╟─099fae93-0fe6-40f1-bdc5-d23738f3f854
# ╠═8c9e18cb-236f-4b57-97ea-323ac4f962d9
# ╠═d4f56ef7-9aa4-4d33-bce4-ae29910607c4
# ╠═d2430bd9-bd01-43dc-83f4-82c905f5a410
# ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000001
# ╟─00000000-0000-0000-0000-000000000002 # ╟─00000000-0000-0000-0000-000000000002