mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-07 21:45:43 +09:00
new(examples): add ASDTP BCID fail distribution during campaign 6
This commit is contained in:
parent
8b7902311c
commit
133c437d42
1 changed files with 122 additions and 0 deletions
|
@ -238,6 +238,122 @@ end
|
|||
# ╔═╡ dfeb3900-539f-4d8d-8103-edb67cf4e890
|
||||
#CSV.write("reset_failed_though_reconfig_done.csv", df_reset_failed_though_reconfig_done)
|
||||
|
||||
# ╔═╡ 332b7481-f6dc-4027-a5c5-cf58d5b6acd3
|
||||
md"""
|
||||
## campaign 6 B-1-9 BCID failの分布
|
||||
- PP ASICごとの分布 (全PS-Boardの和) 8 bins
|
||||
- PP7のチャンネルごとの分布 32 bins
|
||||
"""
|
||||
|
||||
# ╔═╡ 32f8a5b4-1027-48aa-a263-694515e582a2
|
||||
asdtp_result_total_fail_vs_ppasic = let
|
||||
# B-1-9
|
||||
df = filter(:position => ==(18), qaqc_extra_run_campaign_6)
|
||||
|
||||
asdtp_result_total_vs_ppasic = zeros(Int64, 8)
|
||||
for row in eachrow(df)
|
||||
slave_result = PSBoardDataBase.SlaveLogParser.parse_slavelog_file(
|
||||
joinpath(
|
||||
"../test/input/slavelogs/main/",
|
||||
"$(row.psboard_id)_$(row.runid)_longrun.txt",
|
||||
),
|
||||
)
|
||||
asdtp_results = slave_result.asdtp
|
||||
@assert length(asdtp_results) == 100
|
||||
# @info "" first(asdtp_results)
|
||||
ppasic_results = map(asdtp_results) do asdtp_result
|
||||
if ismissing(asdtp_result.asdtp_main)
|
||||
@info "missing" row.psboard_id row.runid
|
||||
return missing
|
||||
end
|
||||
map(asdtp_result.asdtp_main) do ppasic_result
|
||||
all(
|
||||
==(PSBoardDataBase.SlaveLogParser.AsdtpMeasurement(0.0, 1.0, 0.0)),
|
||||
ppasic_result,
|
||||
)
|
||||
end
|
||||
end
|
||||
asdtp_result_vs_ppasic = map(1:8) do ppasic_id
|
||||
count(ppasic_results) do ppasic_result
|
||||
if ismissing(ppasic_result)
|
||||
false
|
||||
else
|
||||
ppasic_result[ppasic_id]
|
||||
end
|
||||
end
|
||||
end
|
||||
@info "" asdtp_result_vs_ppasic
|
||||
asdtp_result_total_vs_ppasic .+= (100 .- asdtp_result_vs_ppasic)
|
||||
end
|
||||
asdtp_result_total_vs_ppasic
|
||||
end
|
||||
|
||||
# ╔═╡ 702fc37d-10e9-4495-b7a6-be1705747012
|
||||
barplot(
|
||||
asdtp_result_total_fail_vs_ppasic,
|
||||
axis = (;
|
||||
xticks = (collect(1:8), ["PP$(id)" for id in 1:8]),
|
||||
xlabel = "PP ASIC",
|
||||
ylabel = "total number of BCID passed",
|
||||
),
|
||||
)
|
||||
|
||||
# ╔═╡ fc884334-fa09-40de-8a8d-1a31b8e28fca
|
||||
md"""
|
||||
- すべて PP 7
|
||||
"""
|
||||
|
||||
# ╔═╡ 2d8eb86d-7545-484d-9209-0a10dcf93086
|
||||
asdtp_result_total_pp7_vs_ch = let
|
||||
# B-1-9
|
||||
df = filter(:position => ==(18), qaqc_extra_run_campaign_6)
|
||||
|
||||
asdtp_result_total_pp7_vs_ch = zeros(Int64, 32)
|
||||
for row in eachrow(df)
|
||||
slave_result = PSBoardDataBase.SlaveLogParser.parse_slavelog_file(
|
||||
joinpath(
|
||||
"../test/input/slavelogs/main/",
|
||||
"$(row.psboard_id)_$(row.runid)_longrun.txt",
|
||||
),
|
||||
)
|
||||
asdtp_results = slave_result.asdtp
|
||||
@assert length(asdtp_results) == 100
|
||||
# @info "" first(asdtp_results)
|
||||
ppasic7_ch_results = map(asdtp_results) do asdtp_result
|
||||
if ismissing(asdtp_result.asdtp_main)
|
||||
@info "missing" row.psboard_id row.runid
|
||||
return missing
|
||||
end
|
||||
|
||||
map(asdtp_result.asdtp_main[7]) do ch_result
|
||||
ch_result == PSBoardDataBase.SlaveLogParser.AsdtpMeasurement(0.0, 1.0, 0.0)
|
||||
end
|
||||
end
|
||||
asdtp_result_ppasic7_vs_ch = map(1:32) do ch_id
|
||||
count(ppasic7_ch_results) do ppasic7_ch_result
|
||||
if ismissing(ppasic7_ch_result)
|
||||
false
|
||||
else
|
||||
ppasic7_ch_result[ch_id]
|
||||
end
|
||||
end
|
||||
end
|
||||
@info "" asdtp_result_ppasic7_vs_ch
|
||||
asdtp_result_total_pp7_vs_ch .+= (100 .- asdtp_result_ppasic7_vs_ch)
|
||||
end
|
||||
asdtp_result_total_pp7_vs_ch
|
||||
end
|
||||
|
||||
# ╔═╡ 21eabebd-3514-4e2a-b0b5-84c74a051c68
|
||||
barplot(
|
||||
asdtp_result_total_pp7_vs_ch,
|
||||
axis = (;
|
||||
title = "Campaign 7 B-1-9 PP ASIC7 BCID fail count vs channels",
|
||||
xlabel = "PP ASIC 7 ch id",
|
||||
ylabel = "total number of BCID passed",
|
||||
),
|
||||
)
|
||||
|
||||
# ╔═╡ Cell order:
|
||||
# ╠═3fccbdca-9856-4122-8597-9f267f90d390
|
||||
# ╠═635dcf78-b6b3-11ef-3a04-f5b7c43ed12d
|
||||
|
@ -262,3 +378,9 @@ end
|
|||
# ╠═a0baf37c-8b05-49c1-a6a4-027f3404f8b4
|
||||
# ╠═14519d45-a6a9-4ba1-a4f2-9597d1335b2c
|
||||
# ╠═dfeb3900-539f-4d8d-8103-edb67cf4e890
|
||||
# ╟─332b7481-f6dc-4027-a5c5-cf58d5b6acd3
|
||||
# ╠═32f8a5b4-1027-48aa-a263-694515e582a2
|
||||
# ╠═702fc37d-10e9-4495-b7a6-be1705747012
|
||||
# ╠═fc884334-fa09-40de-8a8d-1a31b8e28fca
|
||||
# ╠═2d8eb86d-7545-484d-9209-0a10dcf93086
|
||||
# ╠═21eabebd-3514-4e2a-b0b5-84c74a051c68
|
||||
|
|
Loading…
Add table
Reference in a new issue