Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • add-types
  • ci-run-on-release
  • dispatch-check
  • main
  • v0.1.0
  • v0.2.0
  • v0.3.0
  • v0.3.1
  • v0.4.0
  • v0.5.0
  • v0.5.1
  • v1.0.0
12 results

Target

Select target project
  • wotsubo/PSBoardDataBase
1 result
Select Git revision
  • add-types
  • ci-run-on-release
  • dispatch-check
  • main
  • v0.1.0
  • v0.2.0
  • v0.3.0
  • v0.3.1
  • v0.4.0
  • v0.5.0
  • v0.5.1
  • v1.0.0
12 results
Show changes
Commits on Source (12)
......@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.3.1] - 2024-11-14
### Added
- Add result browser queried with runid to get_results notebook
- PPConfig_error analysis notebook
### Changed
- Renamed files which define modules to their names
- Updated skew analysis
## [0.3.0] - 2024-11-12
### Added
......@@ -65,7 +77,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Docs on the database and example of querying the database.
- Docs on the internal (Julia implementation)
[unreleased]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.3.0...main
[unreleased]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.3.1...main
[0.3.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.3.0...v0.3.1
[0.3.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.2.0...v0.3.0
[0.2.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.1.0...v0.2.0
[0.1.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/~/tags/v0.1.0
name = "PSBoardDataBase"
uuid = "779f6a9c-59fa-41f1-8ed1-e9a91eccb2f5"
authors = ["Wataru Otsubo <wotsubo@icepp.s.u-tokyo.ac.jp>"]
version = "0.3.0"
version = "0.3.1"
[deps]
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
......
This diff is collapsed.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -56,6 +56,16 @@ md"""
出荷状況
""";
# ╔═╡ 58a7977f-8c6c-4cd8-9ae4-ef4f000a3548
md"""
# runidでクエリ
"""
# ╔═╡ 034dc70b-799d-4953-9895-22b378081a59
md"""
run idを入力: $(@bind runid_tosearch NumberField(0:999999, default = 100))
"""
# ╔═╡ 1d90c687-7e67-43ed-b5bf-68ef9040dc95
md"""
# 100回じゃない試験
......@@ -136,6 +146,12 @@ single_result_for_id = filter(
qaqc_single_result,
);
# ╔═╡ e4525067-34e6-4cd3-b4c2-b48d2f20a7af
filter(
:runid => ==(runid_tosearch),
qaqc_single_result,
)
# ╔═╡ 5954d52e-f939-4bff-be2b-4fe261ae15de
filter(
:clock => !=(1),
......@@ -180,6 +196,12 @@ qaqc_runs = let
df
end
# ╔═╡ 118cbfd8-abdb-457f-aeea-dd27fb098377
filter(
:id => ==(runid_tosearch),
qaqc_runs
)
# ╔═╡ a77ccf6b-db67-4a07-833a-210afccc39e5
qaqc_extra_run_results = DBInterface.execute(
db,
......@@ -217,6 +239,20 @@ end;
# ╔═╡ 6ceb198e-edd3-4954-b1ff-beef33c3f205
extra_result_for_id_show[!, collect(extra_result_for_id_show_cols)]
# ╔═╡ fc92b3ee-d1b0-4b91-b7c3-28f8db09c676
md"""
- テストしたpsbid:
- 1回試験: $(filter(:runid => ==(runid_tosearch), qaqc_single_result,).psboard_id |> (v -> join(v, ", ")))
- 100回試験: $(filter(:runid => ==(runid_tosearch), qaqc_extra_run_results).psboard_id |> (v -> join(v, ", ")))
"""
# ╔═╡ 6ae2d5b1-0f34-49a1-b089-fa1bff03a0ea
filter(
:runid => ==(runid_tosearch),
qaqc_extra_run_results,
)
# ╔═╡ 0518af44-878e-4052-b4d4-e7fb3c35efea
let
df = filter(
......@@ -752,7 +788,7 @@ version = "17.4.0+2"
# ╟─0299d5b7-8b9f-44ae-a2cf-3db36e1f857a
# ╟─6ceb198e-edd3-4954-b1ff-beef33c3f205
# ╟─7a11e460-8d6f-454c-8fe6-33c59eeb4937
# ╟─ed7c40fe-f966-4afb-a962-896c9f109946
# ╠═ed7c40fe-f966-4afb-a962-896c9f109946
# ╟─a85b4f19-82e4-40d5-af9f-d5286578b1fb
# ╟─45828bb4-e9f5-46d5-8f48-88284f318cc4
# ╟─192c47a3-7202-4351-8638-ec49ecb901c5
......@@ -761,6 +797,12 @@ version = "17.4.0+2"
# ╟─199b45f6-1e63-4392-af6a-6a5ed83bf467
# ╟─9513f017-7905-495d-a7eb-6ca5927308dd
# ╟─1e9ab6b0-b25d-44ad-92ae-f12f92d91d5e
# ╟─58a7977f-8c6c-4cd8-9ae4-ef4f000a3548
# ╟─034dc70b-799d-4953-9895-22b378081a59
# ╟─fc92b3ee-d1b0-4b91-b7c3-28f8db09c676
# ╟─118cbfd8-abdb-457f-aeea-dd27fb098377
# ╟─e4525067-34e6-4cd3-b4c2-b48d2f20a7af
# ╟─6ae2d5b1-0f34-49a1-b089-fa1bff03a0ea
# ╟─1d90c687-7e67-43ed-b5bf-68ef9040dc95
# ╠═0518af44-878e-4052-b4d4-e7fb3c35efea
# ╟─f1ce8e2a-f54e-4462-953f-66c6b2e82cdb
......
### A Pluto.jl notebook ###
# v0.20.3
using Markdown
using InteractiveUtils
# ╔═╡ 255850f9-3984-4422-8710-6ab497904d4f
begin
using Pkg
Pkg.activate("..")
Pkg.status()
true || include("../src/PSBoardDataBase.jl")
end
# ╔═╡ 6861385c-d9a1-4115-9354-3b0bbbbf433c
begin
using PSBoardDataBase
using DataFrames
using SQLite
using DBInterface
using CairoMakie
using PlutoUI
end
# ╔═╡ c639141c-48a1-424f-be33-026ab04a7d33
TableOfContents()
# ╔═╡ ad5e90ba-fa29-4ae1-b365-2e3dbb9dbe72
const SLAVELOGS_DIR = "../test/input/slavelogs/main/"
# ╔═╡ 2f5c2984-ae32-467a-ba94-cbff9b954857
db = SQLite.DB("../psboard_qaqc.db")
# ╔═╡ d3ee0e2e-ff6c-4cb3-8985-53516a9d2b8f
qaqc_single_run_results =
DBInterface.execute(db, sql"select * from qaqc_single_run_results") |> DataFrame
# ╔═╡ 7b6caa7a-d565-4b1d-baed-9f0fa18712ec
let
PSBoardDataBase.SlaveLogParser.parse_slavelog_file(
joinpath(SLAVELOGS_DIR, "164_89.txt"),
)
end
# ╔═╡ f4fc10fa-03ca-4468-b3d3-918f39ad9e35
qaqc_single_run_results_with_ppconfig_error = transform(
qaqc_single_run_results,
[:psboard_id, :runid] =>
ByRow(
(psbid, runid) -> begin
if psbid == 999999
return missing
end
logfilepath = joinpath(SLAVELOGS_DIR, "$(psbid)_$(runid).txt")
if !ispath(logfilepath)
return missing
end
slavelog =
PSBoardDataBase.SlaveLogParser.parse_slavelog_file(logfilepath)
result_asdtp = slavelog.asdtp
if isempty(result_asdtp)
return missing
end
result_asdtp[1].ppconfig_error |> UInt32
end,
) => :ppconfig_error,
)
# ╔═╡ e8933a41-7500-409a-8650-ec52be37e483
md"""
### 1回試験でQSPIpをパスしてPPConfig_errorが0ではなかったもの
"""
# ╔═╡ 81a242ac-ac64-4794-8c8b-4ec439db4e90
let
df = filter(
:ppconfig_error => (x -> !ismissing(x) && x != 0),
qaqc_single_run_results_with_ppconfig_error,
)
filter!(:qspip => ==(1), df)
df
end
# ╔═╡ cc16f82d-8c45-4e75-8b5b-5abe362a3526
slave_logs = let
entries = readdir(SLAVELOGS_DIR, join = true)
Iterators.filter(entries) do entry_name
contains(r"^\d+_\d+\.txt")(basename(entry_name)) ||
contains(r"^\d+_\d+_longrun\.txt")(basename(entry_name))
end |> collect
end
# ╔═╡ Cell order:
# ╠═255850f9-3984-4422-8710-6ab497904d4f
# ╠═6861385c-d9a1-4115-9354-3b0bbbbf433c
# ╠═c639141c-48a1-424f-be33-026ab04a7d33
# ╠═ad5e90ba-fa29-4ae1-b365-2e3dbb9dbe72
# ╠═2f5c2984-ae32-467a-ba94-cbff9b954857
# ╠═d3ee0e2e-ff6c-4cb3-8985-53516a9d2b8f
# ╠═7b6caa7a-d565-4b1d-baed-9f0fa18712ec
# ╠═f4fc10fa-03ca-4468-b3d3-918f39ad9e35
# ╠═e8933a41-7500-409a-8650-ec52be37e483
# ╠═81a242ac-ac64-4794-8c8b-4ec439db4e90
# ╠═cc16f82d-8c45-4e75-8b5b-5abe362a3526
......@@ -302,9 +302,15 @@ let
fig
end
# ╔═╡ 0d758cdf-0dda-4dc3-b489-35831812b718
md"""
### 異常個体リスト
- 分散が1より大きいもの
"""
# ╔═╡ 79e2f5d8-4609-4e9f-949e-6dc1f88c0b19
df_skew_stats_abnormals = let
df = filter([:mean_skew, :std_skew] => ((m, s) -> m > -5 && s > 1), df_skew_stats)
df = filter([:mean_skew, :std_skew] => ((m, s) -> s > 1), df_skew_stats)
sort!(df, :psbid)
df
end
......@@ -380,6 +386,12 @@ md"""
#### psbid: 802
- run: 217, 236
- 217の結果が壊れてる
#### psbid: 1001
- run: 319, 299
- 299でQSPIpが失敗している。319を使う
#### psbid: 1034
- run: 305, 319
- 305で振動、319を使う
"""
# ╔═╡ 26976b6c-3954-4a41-a99b-c1aaebdc645d
......@@ -747,6 +759,7 @@ end
# ╠═893253c3-f0b2-401f-b892-b23291bcf5c1
# ╠═6467dcaa-6bd6-45c7-8c08-b310a09b8b0b
# ╠═19f85f1b-07d3-48c2-9ca6-a5a8eb1ab746
# ╟─0d758cdf-0dda-4dc3-b489-35831812b718
# ╠═79e2f5d8-4609-4e9f-949e-6dc1f88c0b19
# ╠═eae649db-6b2b-4530-83a8-3438f29423cc
# ╠═d607e10e-854f-4652-9a34-9e22a188e315
......
......@@ -98,7 +98,7 @@ function get_skew_and_riseup(file::T) where {T <: AbstractString}
last_low_time = missing
first_high_time = missing
skew = missing
is_rised = false
is_raised = false
let
_time, high = _parse_line(popfirst!(lines))
......@@ -111,9 +111,9 @@ function get_skew_and_riseup(file::T) where {T <: AbstractString}
time, high = _parse_line(line)
if high == 0
last_low_time = time
elseif !ismissing(last_low_time) && !is_rised && high >= 500
elseif !ismissing(last_low_time) && !is_raised && high >= 500
skew = time
is_rised = true
is_raised = true
elseif !ismissing(skew) && high == 1000
first_high_time = time
break
......
File moved
File moved
......@@ -7,15 +7,15 @@ using CSV
using DataFrames
using Dates
include("parse_qaqc_master_log.jl")
include("parse_clock.jl")
include("QaqcMasterLog.jl")
include("ClockParser.jl")
include("SlaveLogParser.jl")
include("create_table.jl")
include("download_csv.jl")
include("DownloadCSVs.jl")
include("import_data.jl")
include("dispatch_checker.jl")
include("DispatchChecker.jl")
using .DispatchChecker
"""
......
File moved
"""
Parse QAQC JATHub slave log.
See [`parse_slavelog_file`](@ref) for the main function.
"""
module SlaveLogParser
......@@ -17,7 +19,7 @@ HEADER_STARTS =
"""
Indicate parser state.
Default is `MODE_NONE`.
In `MODE_NONE`, each line is feeded into parser to detect the start of each section.
In `MODE_NONE`, each line is fed into parser to detect the start of each section.
"""
@enum SlaveLogSection begin
MODE_NONE
......@@ -361,7 +363,7 @@ Parse Recov section of given stateful iterator of log.
# Return
- `missing`: if failed to parse
- `true`: if successed
- `true`: if succeeded
- `false`
"""
function parse_recov_section!(lines::Base.Iterators.Stateful)::Union{Bool, Missing}
......@@ -384,6 +386,9 @@ end
parse_slavelog_file(filename::AbstractString)
Main function to parse slave log file.
Returns `NamedTuple` with keys `adtp`, `power`, `recov` and their values are `Vector` of each results.
For a single run result, these `Vector`s have only one element and for a hundred(extra) runs, the lengths are usually 100.
For details on results for each section, see documents on dedicated types.
"""
function parse_slavelog_file(filename::AbstractString)
lines_iter = Iterators.Stateful(eachline(filename))
......
......@@ -91,7 +91,7 @@ CREATE TABLE qaqc_extra_run_results (
FOREIGN KEY("position") REFERENCES "qaqc_positions"("id")
);
-- TODO: add table for desciptions of each error?
-- TODO: add table for descriptions of each error?
CREATE TABLE qaqc_positions (
id INTEGER NOT NULL PRIMARY KEY,
......