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
  • compathelper/new_version/2025-09-15-01-44-22-954-00348582943
  • compathelper/new_version/2025-09-08-01-44-29-080-02036885655
  • compathelper/new_version/2025-09-01-01-44-30-182-03943269900
  • compathelper/new_version/2025-08-25-01-44-29-646-01107274557
  • main
  • dispatch-check
  • add-types
  • ci-run-on-release
  • v0.1.0
  • v0.2.0
  • v0.3.0
  • v0.3.1
  • v0.4.0
  • v0.5.0
  • v0.5.1
  • v1.0.0
16 results

Target

Select target project
  • Wataru Otsubo / PSBoardDataBase
1 result
Select Git revision
  • compathelper/new_version/2025-09-15-01-44-22-954-00348582943
  • compathelper/new_version/2025-09-08-01-44-29-080-02036885655
  • compathelper/new_version/2025-09-01-01-44-30-182-03943269900
  • compathelper/new_version/2025-08-25-01-44-29-646-01107274557
  • main
  • dispatch-check
  • add-types
  • ci-run-on-release
  • v0.1.0
  • v0.2.0
  • v0.3.0
  • v0.3.1
  • v0.4.0
  • v0.5.0
  • v0.5.1
  • v1.0.0
16 results
Show changes

Commits on Source 17

18 files
+ 4744
677
Compare changes
  • Side-by-side
  • Inline

Files

+5 −5
Original line number Original line Diff line number Diff line
@@ -27,11 +27,11 @@ cache:
        c, t = get_summary(process_folder())
        c, t = get_summary(process_folder())
        using Printf
        using Printf
        @printf "Test coverage %.2f%%\n" 100c / t'
        @printf "Test coverage %.2f%%\n" 100c / t'
Julia 1.10:
# Julia 1.10:
  image: julia:1.10
#   image: julia:1.10
  extends:
#   extends:
    - .script
#     - .script
    - .coverage
#     - .coverage
Julia 1.11:
Julia 1.11:
  image: julia:1.11
  image: julia:1.11
  extends:
  extends:
+19 −2
Original line number Original line Diff line number Diff line
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [Unreleased]
## [Unreleased]


## [0.4.0] - 2024-12-12

Release for 6th campaign dispatching.

### Added

- 6th Campaign
- PLLLD fail count analysis
- Analysis on reset_failed_though_reconfig_done (8b7902311caebab3b4714d7e56557ec340ac2ad7)

### Changed

- Added Manifest.toml to git management and removed CI for 1.10 since Manifest is resolved with 1.11 and is not compatible with 1.10 (1f6dcf2f245ad1537728052bc78bf2a40a2decab)
- Updated stats of skew, power results for campaign 6 (!1413)
- Add new dispatch criteria for campaign 6 (4924c5fdd6452a1df9ee95136cdb2c9f46191f68)

## [0.3.1] - 2024-11-14
## [0.3.1] - 2024-11-14


### Added
### Added
@@ -77,8 +93,9 @@ 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 database and example of querying the database.
- Docs on the internal (Julia implementation)
- Docs on the internal (Julia implementation)


[unreleased]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.3.1...main
[unreleased]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.4.0...main
[0.3.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.3.0...v0.3.1
[0.4.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/-/compare/v0.3.1...v0.4.0
[0.3.1]: 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.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.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
[0.1.0]: https://gitlab.cern.ch/wotsubo/PSBoardDataBase/~/tags/v0.1.0

Manifest.toml

0 → 100644
+520 −0
Original line number Original line Diff line number Diff line
# This file is machine-generated - editing it directly is not advised

julia_version = "1.11.2"
manifest_format = "2.0"
project_hash = "e20af0781afd5866dc7398b8d852e9c8ee3e4f13"

[[deps.ANSIColoredPrinters]]
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
version = "0.0.1"

[[deps.AbstractTrees]]
git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177"
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
version = "0.4.5"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.2"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
version = "1.11.0"

[[deps.AutoHashEquals]]
git-tree-sha1 = "4ec6b48702dacc5994a835c1189831755e4e76ef"
uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
version = "2.2.0"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
version = "1.11.0"

[[deps.CSV]]
deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"]
git-tree-sha1 = "deddd8725e5e1cc49ee205a1964256043720a6c3"
uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
version = "0.10.15"

[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "bce6804e5e6044c6daab27bb533d1295e4a2e759"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.6"

[[deps.Compat]]
deps = ["TOML", "UUIDs"]
git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.16.0"
weakdeps = ["Dates", "LinearAlgebra"]

    [deps.Compat.extensions]
    CompatLinearAlgebraExt = "LinearAlgebra"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.1.1+0"

[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.1.1"

[[deps.DBInterface]]
git-tree-sha1 = "a444404b3f94deaa43ca2a58e18153a82695282b"
uuid = "a10d1c49-ce27-4219-8d33-6db1a4562965"
version = "2.6.1"

[[deps.DataAPI]]
git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.16.0"

[[deps.DataFrames]]
deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "fb61b4812c49343d7ef0b533ba982c46021938a6"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.7.0"

[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.20"

[[deps.DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
version = "1.11.0"

[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.3"

[[deps.Documenter]]
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
git-tree-sha1 = "d0ea2c044963ed6f37703cead7e29f70cba13d7e"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "1.8.0"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"

[[deps.Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "e51db81749b0777b2147fbe7b783ee79045b8e99"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.6.4+1"

[[deps.FilePathsBase]]
deps = ["Compat", "Dates"]
git-tree-sha1 = "7878ff7172a8e6beedd1dea14bd27c3c6340d361"
uuid = "48062228-2e41-5def-b9a4-89aafe57970f"
version = "0.9.22"
weakdeps = ["Mmap", "Test"]

    [deps.FilePathsBase.extensions]
    FilePathsBaseMmapExt = "Mmap"
    FilePathsBaseTestExt = "Test"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
version = "1.11.0"

[[deps.Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
version = "1.11.0"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.1"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
git-tree-sha1 = "399f4a308c804b446ae4c91eeafadb2fe2c54ff9"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.47.1+0"

[[deps.IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.5"

[[deps.InlineStrings]]
git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d"
uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48"
version = "1.4.2"

    [deps.InlineStrings.extensions]
    ArrowTypesExt = "ArrowTypes"
    ParsersExt = "Parsers"

    [deps.InlineStrings.weakdeps]
    ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd"
    Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
version = "1.11.0"

[[deps.InvertedIndices]]
git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
version = "1.3.0"

[[deps.IteratorInterfaceExtensions]]
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[deps.JLLWrappers]]
deps = ["Artifacts", "Preferences"]
git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.6.1"

[[deps.JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.4"

[[deps.LaTeXStrings]]
git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.4.0"

[[deps.LazilyInitializedFields]]
git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0"
uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf"
version = "1.3.0"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.4"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "8.6.0+0"

[[deps.LibGit2]]
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
version = "1.11.0"

[[deps.LibGit2_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
version = "1.7.2+0"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.11.0+1"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
version = "1.11.0"

[[deps.Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.17.0+1"

[[deps.LinearAlgebra]]
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
version = "1.11.0"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
version = "1.11.0"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
version = "1.11.0"

[[deps.MarkdownAST]]
deps = ["AbstractTrees", "Markdown"]
git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899"
uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
version = "0.1.2"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.6+0"

[[deps.Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.2.0"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
version = "1.11.0"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2023.12.12"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.27+1"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "7493f61f55a6cce7325f197443aa80d32554ba10"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.15+1"

[[deps.OrderedCollections]]
git-tree-sha1 = "12f1439c4f986bb868acda6ea33ebc78e19b95ad"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.7.0"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
version = "10.42.0+1"

[[deps.Parsers]]
deps = ["Dates", "PrecompileTools", "UUIDs"]
git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.8.1"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.11.0"
weakdeps = ["REPL"]

    [deps.Pkg.extensions]
    REPLExt = "REPL"

[[deps.PooledArrays]]
deps = ["DataAPI", "Future"]
git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3"
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
version = "1.4.3"

[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.2.1"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.3"

[[deps.PrettyTables]]
deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"]
git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "2.4.0"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
version = "1.11.0"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
version = "1.11.0"

[[deps.Random]]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
version = "1.11.0"

[[deps.Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.2.2"

[[deps.RegistryInstances]]
deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"]
git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51"
uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3"
version = "0.1.0"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.SQLite]]
deps = ["DBInterface", "Random", "SQLite_jll", "Serialization", "Tables", "WeakRefStrings"]
git-tree-sha1 = "38b82dbc52b7db40bea182688c7a1103d06948a4"
uuid = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
version = "1.6.1"

[[deps.SQLite_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"]
git-tree-sha1 = "e84fab7d16107342d7638fbd519151d9a0d80720"
uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8"
version = "3.47.2+0"

[[deps.SentinelArrays]]
deps = ["Dates", "Random"]
git-tree-sha1 = "d0553ce4031a081cc42387a9b9c8441b7d99f32d"
uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
version = "1.4.7"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
version = "1.11.0"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
version = "1.11.0"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.2.1"

[[deps.StaticArrays]]
deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"]
git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.9.8"

    [deps.StaticArrays.extensions]
    StaticArraysChainRulesCoreExt = "ChainRulesCore"
    StaticArraysStatisticsExt = "Statistics"

    [deps.StaticArrays.weakdeps]
    ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
    Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[deps.StaticArraysCore]]
git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682"
uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
version = "1.4.3"

[[deps.Statistics]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0"
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
version = "1.11.1"

    [deps.Statistics.extensions]
    SparseArraysExt = ["SparseArrays"]

    [deps.Statistics.weakdeps]
    SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.StringManipulation]]
deps = ["PrecompileTools"]
git-tree-sha1 = "a6b1675a536c5ad1a60e5a5153e1fee12eb146e3"
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
version = "0.4.0"

[[deps.StyledStrings]]
uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
version = "1.11.0"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.1"

[[deps.Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"]
git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.12.0"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
version = "1.11.0"

[[deps.TranscodingStreams]]
git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.11.3"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
version = "1.11.0"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
version = "1.11.0"

[[deps.WeakRefStrings]]
deps = ["DataAPI", "InlineStrings", "Parsers"]
git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23"
uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
version = "1.4.2"

[[deps.WorkerUtilities]]
git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7"
uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60"
version = "1.6.1"

[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.13+1"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.11.0+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.59.0+0"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+2"
+2 −2
Original line number Original line Diff line number Diff line
name = "PSBoardDataBase"
name = "PSBoardDataBase"
uuid = "779f6a9c-59fa-41f1-8ed1-e9a91eccb2f5"
uuid = "779f6a9c-59fa-41f1-8ed1-e9a91eccb2f5"
authors = ["Wataru Otsubo <wotsubo@icepp.s.u-tokyo.ac.jp>"]
authors = ["Wataru Otsubo <wotsubo@icepp.s.u-tokyo.ac.jp>"]
version = "0.3.1"
version = "0.4.0"


[deps]
[deps]
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
@@ -23,7 +23,6 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
PSBoardDataBaseInteractiveUtilsExt = "InteractiveUtils"
PSBoardDataBaseInteractiveUtilsExt = "InteractiveUtils"


[compat]
[compat]
julia = "1.10"
Aqua = "0.8"
Aqua = "0.8"
AutoHashEquals = "2.2"
AutoHashEquals = "2.2"
CSV = "0.10"
CSV = "0.10"
@@ -38,6 +37,7 @@ SQLite = "1"
StaticArrays = "1.9"
StaticArrays = "1.9"
Tables = "1"
Tables = "1"
Test = "1.10"
Test = "1.10"
julia = "1.10"


[extras]
[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
+17 −0

File added.

File size exceeds preview limit.

+5 −5

File changed.

Preview size limit exceeded, changes collapsed.

+5 −5

File changed.

Preview size limit exceeded, changes collapsed.

examples/Manifest.toml

0 → 100644
+1708 −0

File added.

Preview size limit exceeded, changes collapsed.

examples/Project.toml

0 → 100644
+7 −0
Original line number Original line Diff line number Diff line
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
FHist = "68837c9b-b678-4cd5-9925-8a54edc8f695"
PSBoardDataBase = "779f6a9c-59fa-41f1-8ed1-e9a91eccb2f5"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
+877 −608

File changed.

Preview size limit exceeded, changes collapsed.

+2 −4
Original line number Original line Diff line number Diff line
### A Pluto.jl notebook ###
### A Pluto.jl notebook ###
# v0.20.3
# v0.20.2


using Markdown
using Markdown
using InteractiveUtils
using InteractiveUtils


# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
macro bind(def, element)
    #! format: off
    quote
    quote
        local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
        local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
        local el = $(esc(element))
        local el = $(esc(element))
        global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
        global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
        el
        el
    end
    end
    #! format: on
end
end


# ╔═╡ d3c95316-7ffb-11ef-1e2c-2934f89a2336
# ╔═╡ d3c95316-7ffb-11ef-1e2c-2934f89a2336
@@ -350,7 +348,7 @@ SQLite = "~1.6.1"
PLUTO_MANIFEST_TOML_CONTENTS = """
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
# This file is machine-generated - editing it directly is not advised


julia_version = "1.11.1"
julia_version = "1.11.2"
manifest_format = "2.0"
manifest_format = "2.0"
project_hash = "68b5b1b7d0691b17c298640ebab2813fd849f83c"
project_hash = "68b5b1b7d0691b17c298640ebab2813fd849f83c"


+386 −0
Original line number Original line Diff line number Diff line
### A Pluto.jl notebook ###
# v0.20.2

using Markdown
using InteractiveUtils

# ╔═╡ 635dcf78-b6b3-11ef-3a04-f5b7c43ed12d
begin
    using Pkg
    Pkg.activate(".")

    using PSBoardDataBase
    using SQLite
    using DataFrames
    using CSV
    using CairoMakie
    using FHist
    using LinearAlgebra
    using Printf
    using PlutoUI
end

# ╔═╡ 3fccbdca-9856-4122-8597-9f267f90d390
md"""
# 説明
第6回 PS-Board QAQC キャンペーンの11_27のファームウェアを使った100回試験において、PLLLD fail countの数の分布の調査
"""

# ╔═╡ 3e844f3d-0017-41ae-9632-ae0f7e2b03f7
TableOfContents()

# ╔═╡ 26954da1-0820-490d-aa3e-79fd3603d28a
md"""
# データベース読み込み
"""

# ╔═╡ a36886af-ff32-4f4f-a20f-f83bc333b8fd
db = SQLite.DB("../psboard_qaqc.db")

# ╔═╡ df5087be-18de-4714-b6d8-4ab54271b1fb
SQLite.tables(db)

# ╔═╡ 56d8896a-40e3-46e3-aa28-82f89476743b
qaqc_runs = DBInterface.execute(db, "select * from qaqc_runs") |> DataFrame

# ╔═╡ 08032250-5893-445c-8662-459e5636ba81
qaqc_extra_run_results =
    DBInterface.execute(db, "select * from qaqc_extra_run_results") |> DataFrame

# ╔═╡ 013948ff-ccde-4222-862b-7ecda62fd7f1
qaqc_extra_run_campaign_6 = let
    runids_campaign_6 = filter(:campaign_id => x -> (!ismissing(x) && x == 6), qaqc_runs).id
    filter(:runid => in(runids_campaign_6), qaqc_extra_run_results)
end

# ╔═╡ 0282181f-2607-43b6-8456-813c2636dabf
md"""
# 解析
"""

# ╔═╡ ecb09aa6-7f2e-4ef7-a081-348a219272e0
md"""
## PLLLD fail count
"""

# ╔═╡ 41da581f-0cdf-40f3-a1f8-bf1bd7f8835b
map(eachrow(qaqc_extra_run_campaign_6)) do row
    logfilename = "$(row.psboard_id)_$(row.runid)_longrun.txt"
    logfile = joinpath("../test/input/slavelogs/main/", logfilename)
    !ispath(logfile) && begin
        @info "file $(logfile) not found"
        return missing
    end
    slave_result = PSBoardDataBase.SlaveLogParser.parse_slavelog_file(logfile)
    map(slave_result.asdtp) do asdtp_result
        asdtp_result.pllld_fail_counter
    end
end

# ╔═╡ 34ae2948-bb5a-4086-beb1-cfb77593d678
df_pllld_counts_camp6 = combine(
    groupby(qaqc_extra_run_campaign_6, :id),
    AsTable([:psboard_id, :runid]) =>
        (
            sdf -> begin
                @assert nrow(sdf) == 1
                logfilename = "$(sdf.psboard_id[1])_$(sdf.runid[1])_longrun.txt"
                logfile = joinpath("../test/input/slavelogs/main/", logfilename)
                !ispath(logfile) && begin
                    @warn "logfile $(logfile) not found"
                    return []
                end
                slave_result =
                    PSBoardDataBase.SlaveLogParser.parse_slavelog_file(logfile)
                return map(slave_result.asdtp) do asdtp_result
                    (
                        psboard_id = sdf.psboard_id[1],
                        runid = sdf.runid[1],
                        pllld_count = asdtp_result.pllld_fail_counter + 1,
                        reset_failed_though_reconfig_done = let
                            asdtp_result.reconfig_done_2 == 0 &&
                                asdtp_result.pllld_fail_counter == 10
                        end,
                    )
                end
            end
        ) => [:psboard_id, :runid, :pllld_count, :reset_failed_though_reconfig_done],
)

# ╔═╡ c084b8f4-dbc2-497b-9132-7e4bd4fd3874
sort(df_pllld_counts_camp6, :pllld_count, rev = true)

# ╔═╡ 6d85cc29-0d02-43b4-8a50-57f003e4686b
let
    df = combine(groupby(df_pllld_counts_camp6, :id), nrow)
    sort!(df, :nrow)
end

# ╔═╡ e95447c1-a8e2-4a46-9320-e1a88d9e34da
unique(df_pllld_counts_camp6.psboard_id) |> sort

# ╔═╡ 0433bbe4-1f71-4cf7-96ec-ac9c70170feb
stephist(df_pllld_counts_camp6.pllld_count)

# ╔═╡ f04d5c95-7308-4129-ba95-49da2e142d5d
let
    h1 = Hist1D(df_pllld_counts_camp6.pllld_count; binedges = 1:1:10, overflow = false)
    h1 = normalize(h1)
    fig = Figure()
    ax = Axis(
        fig[1, 1],
        yscale = log10,
        xlabel = "Number of resets before PLL lock",
        ylabel = "fraction",
        title = "PLLLD count ratios of 6th QAQC 100 test results",
    )
    stephist!(ax, h1, label = "pllld fail count")
    errorbars!(ax, h1)
    text!(
        ax,
        bincenters(h1),
        bincounts(h1),
        text = [@sprintf "%.4g" r for r in bincounts(h1)],
    )
    axislegend(position = :rt)
    Label(
        fig[1, 1],
        """
        n = $(nentries(h1))
        $(length(unique(df_pllld_counts_camp6.psboard_id))) PS-Boards
        """,
        tellwidth = false,
        tellheight = false,
        halign = :right,
        padding = (20, 20, 20, 20),
    )
    save("pllld_fail_counts.svg", fig)

    fig
end

# ╔═╡ 650482e5-9b79-4304-aa5a-2b7c9a377013
md"""
## "reconfig_done = 0なのにresetしていない" の数
"""

# ╔═╡ 4b9c0bd8-b17a-4933-8d6e-2da884fc4b5e
combine(
    groupby(df_pllld_counts_camp6, :id),
    AsTable(:) =>
        (
            sdf -> begin
                @assert allequal(sdf.psboard_id)
                @assert allequal(sdf.runid)
                (
                    reset_failed_though_reconfig_done = count(
                        sdf.reset_failed_though_reconfig_done,
                    ),
                    psboard_id = first(sdf.psboard_id),
                    runid = first(sdf.runid),
                )
            end
        ) => [:reset_failed_though_reconfig_done, :psboard_id, :runid],
)

# ╔═╡ a0baf37c-8b05-49c1-a6a4-027f3404f8b4
df_reset_failed_though_reconfig_done = combine(
    groupby(qaqc_extra_run_results, :id),
    AsTable([:psboard_id, :runid]) =>
        (
            sdf -> begin
                @assert nrow(sdf) == 1

                logfilename = "$(sdf.psboard_id[1])_$(sdf.runid[1])_longrun.txt"
                logfile = joinpath("../test/input/slavelogs/main/", logfilename)
                !ispath(logfile) && begin
                    @warn "logfile $(logfile) not found"
                    return (
                        psboard_id = sdf.psboard_id[1],
                        runid = sdf.runid[1],
                        reset_failed_though_reconfig_done = missing,
                    )
                end
                if sdf.runid[1] == 99
                    @info "skipping runid 99 since it is not exactly 100 run"
                    return (
                        psboard_id = sdf.psboard_id[1],
                        runid = sdf.runid[1],
                        reset_failed_though_reconfig_done = missing,
                    )
                end
                slave_result =
                    PSBoardDataBase.SlaveLogParser.parse_slavelog_file(logfile)
                return (
                    psboard_id = sdf.psboard_id[1],
                    runid = sdf.runid[1],
                    reset_failed_though_reconfig_done = count(
                        slave_result.asdtp,
                    ) do asdtp_result
                        asdtp_result.reconfig_done_2 == 0 &&
                            asdtp_result.pllld_fail_counter == 10
                    end,
                )
            end
        ) => [:psboard_id, :runid, :reset_failed_though_reconfig_done],
)

# ╔═╡ 14519d45-a6a9-4ba1-a4f2-9597d1335b2c
let
    df_compare = outerjoin(
        df_reset_failed_though_reconfig_done,
        select(qaqc_extra_run_results, [:id, :reset_failed_though_reconfig_done]),
        on = :id,
        renamecols = "_old" => "_new",
    )
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
# ╠═3e844f3d-0017-41ae-9632-ae0f7e2b03f7
# ╟─26954da1-0820-490d-aa3e-79fd3603d28a
# ╠═a36886af-ff32-4f4f-a20f-f83bc333b8fd
# ╠═df5087be-18de-4714-b6d8-4ab54271b1fb
# ╠═56d8896a-40e3-46e3-aa28-82f89476743b
# ╠═08032250-5893-445c-8662-459e5636ba81
# ╠═013948ff-ccde-4222-862b-7ecda62fd7f1
# ╟─0282181f-2607-43b6-8456-813c2636dabf
# ╟─ecb09aa6-7f2e-4ef7-a081-348a219272e0
# ╠═41da581f-0cdf-40f3-a1f8-bf1bd7f8835b
# ╠═34ae2948-bb5a-4086-beb1-cfb77593d678
# ╠═c084b8f4-dbc2-497b-9132-7e4bd4fd3874
# ╠═6d85cc29-0d02-43b4-8a50-57f003e4686b
# ╠═e95447c1-a8e2-4a46-9320-e1a88d9e34da
# ╠═0433bbe4-1f71-4cf7-96ec-ac9c70170feb
# ╠═f04d5c95-7308-4129-ba95-49da2e142d5d
# ╟─650482e5-9b79-4304-aa5a-2b7c9a377013
# ╠═4b9c0bd8-b17a-4933-8d6e-2da884fc4b5e
# ╠═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
+955 −0

File added.

Preview size limit exceeded, changes collapsed.

+153 −26
Original line number Original line Diff line number Diff line
### A Pluto.jl notebook ###
### A Pluto.jl notebook ###
# v0.20.3
# v0.20.2


using Markdown
using Markdown
using InteractiveUtils
using InteractiveUtils
@@ -11,6 +11,7 @@ begin
    using DataFrames
    using DataFrames
    using DBInterface
    using DBInterface
    using Tables
    using Tables
    using FHist
    using CairoMakie
    using CairoMakie
    using Statistics
    using Statistics
end
end
@@ -105,6 +106,72 @@ let
    fig
    fig
end
end


# ╔═╡ de424d0d-4e4e-49df-bf4a-c73e368020a3
let
    df = copy(qaqc_single_results, copycols = true)
    target_runids =
        filter(
            [:shiftscript_ver_function, :campaign_id] => (
                (v, campaign) ->
                    !ismissing(v) && v  v"1.0.4" && !ismissing(campaign) && campaign < 6
            ),
            qaqc_runs,
        ).id
    filter!(:runid => in(target_runids), df)
    filter!(:qspip => ==(1), df)

    df = combine(groupby(df, :position)) do sdf
        (; n_power_fail = count(!=(1), sdf.power))
    end
    rename!(df, :position => :position_id)

    leftjoin!(df, qaqc_positions, on = :position_id => :id)
    select!(df, Not(:rising_ns))
    df

    fig = Figure()
    ax = Axis(
        fig[1, 1],
        title = "Power Fail 場所分布 (第5回まで)",
        xticks = (eachindex(df.name), df.name),
        xticklabelrotation = π / 4,
    )
    barplot!(ax, df.n_power_fail, bar_labels = df.n_power_fail .|> Int64 .|> string)

    # Campaign 6
    df = copy(qaqc_single_results, copycols = true)
    target_runids =
        filter(
            [:shiftscript_ver_function, :campaign_id] => (
                (v, campaign) ->
                    !ismissing(v) && v  v"1.0.4" && !ismissing(campaign) && campaign == 6
            ),
            qaqc_runs,
        ).id
    filter!(:runid => in(target_runids), df)
    filter!(:qspip => ==(1), df)

    df = combine(groupby(df, :position)) do sdf
        (; n_power_fail = count(!=(1), sdf.power))
    end
    rename!(df, :position => :position_id)

    leftjoin!(df, qaqc_positions, on = :position_id => :id)
    select!(df, Not(:rising_ns))

    @info "" df

    ax = Axis(
        fig[2, 1],
        title = "Power Fail 場所分布 (第6回 (B-0-2のケーブル交換))",
        xticks = (eachindex(df.name), df.name),
        xticklabelrotation = π / 4,
    )
    barplot!(ax, df.n_power_fail, bar_labels = df.n_power_fail .|> Int64 .|> string)

    fig
end

# ╔═╡ bfc8753d-b76f-45b5-b19e-528746648117
# ╔═╡ bfc8753d-b76f-45b5-b19e-528746648117
md"""
md"""
## 場所ごとの読み取り値の分布
## 場所ごとの読み取り値の分布
@@ -202,7 +269,11 @@ let
            )
            )


            fig[position_id, station_id] = gl = GridLayout()
            fig[position_id, station_id] = gl = GridLayout()
            Label(gl[0, 1], rich(pos_sdf.name[1], bold = true, fontsize = 20), tellwidth = false)
            Label(
                gl[0, 1],
                rich(pos_sdf.name[1], bold = true, fontsize = 20),
                tellwidth = false,
            )
            ax_3v3d = Axis(gl[1, 1], limits = (nothing, (3.3 - 0.3, 3.3 + 0.3)))
            ax_3v3d = Axis(gl[1, 1], limits = (nothing, (3.3 - 0.3, 3.3 + 0.3)))
            ax_3v3a = Axis(gl[2, 1], limits = (nothing, (3 - 0.3, 3 + 0.3)))
            ax_3v3a = Axis(gl[2, 1], limits = (nothing, (3 - 0.3, 3 + 0.3)))
            ax_n3va = Axis(gl[3, 1], limits = (nothing, (-3 - 0.3, -3 + 0.3)))
            ax_n3va = Axis(gl[3, 1], limits = (nothing, (-3 - 0.3, -3 + 0.3)))
@@ -228,7 +299,10 @@ let
                !ismissing(val) && (val < v_min || v_max < val)
                !ismissing(val) && (val < v_min || v_max < val)
            end
            end
            if any(!isempty, (outlier_3v3d, outlier_3v3a, outlier_n3va))
            if any(!isempty, (outlier_3v3d, outlier_3v3a, outlier_n3va))
				@info "outlier" sdf[unique([outlier_3v3d; outlier_3v3a; outlier_n3va]), :] |> Tables.rowtable
                @info "outlier" sdf[
                    unique([outlier_3v3d; outlier_3v3a; outlier_n3va]),
                    :,
                ] |> Tables.rowtable
            end
            end
        end
        end
    end
    end
@@ -241,6 +315,7 @@ PLUTO_PROJECT_TOML_CONTENTS = """
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965"
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
FHist = "68837c9b-b678-4cd5-9925-8a54edc8f695"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
@@ -250,6 +325,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
CairoMakie = "~0.12.14"
CairoMakie = "~0.12.14"
DBInterface = "~2.6.1"
DBInterface = "~2.6.1"
DataFrames = "~1.7.0"
DataFrames = "~1.7.0"
FHist = "~0.11.7"
PlutoUI = "~0.7.60"
PlutoUI = "~0.7.60"
SQLite = "~1.6.1"
SQLite = "~1.6.1"
Statistics = "~1.11.1"
Statistics = "~1.11.1"
@@ -260,9 +336,9 @@ Tables = "~1.12.0"
PLUTO_MANIFEST_TOML_CONTENTS = """
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
# This file is machine-generated - editing it directly is not advised


julia_version = "1.11.1"
julia_version = "1.11.2"
manifest_format = "2.0"
manifest_format = "2.0"
project_hash = "bea195e56ecd6bec368320394de4866dfad0414d"
project_hash = "c5435dc389e1a7d29d893a0cf31593e6e08d4150"


[[deps.AbstractFFTs]]
[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
deps = ["LinearAlgebra"]
@@ -343,6 +419,11 @@ version = "0.4.7"
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
version = "1.11.0"
version = "1.11.0"


[[deps.BayesHistogram]]
git-tree-sha1 = "5d5dda960067751bc1534aba765f771325044501"
uuid = "000d9b38-65fe-4c81-bdb9-69f01f102479"
version = "1.0.7"

[[deps.Bzip2_jll]]
[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1"
git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1"
@@ -382,6 +463,12 @@ git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.18.2+1"
version = "1.18.2+1"


[[deps.Calculus]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "9cb23bbb1127eefb022b022481466c0f1127d430"
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
version = "0.5.2"

[[deps.ChainRulesCore]]
[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra"]
deps = ["Compat", "LinearAlgebra"]
git-tree-sha1 = "3e4b134270b372f2ed4d4d0e936aabaefc1802bc"
git-tree-sha1 = "3e4b134270b372f2ed4d4d0e936aabaefc1802bc"
@@ -578,6 +665,23 @@ git-tree-sha1 = "4d81ed14783ec49ce9f2e168208a12ce1815aa25"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.10+1"
version = "3.3.10+1"


[[deps.FHist]]
deps = ["BayesHistogram", "LinearAlgebra", "MakieCore", "Measurements", "RecipesBase", "Requires", "Statistics", "StatsBase"]
git-tree-sha1 = "66013ca09dbaa9017a987562c19791c3e9a64a5a"
uuid = "68837c9b-b678-4cd5-9925-8a54edc8f695"
version = "0.11.7"

    [deps.FHist.extensions]
    FHistHDF5Ext = "HDF5"
    FHistMakieExt = "Makie"
    FHistPlotsExt = "Plots"

    [deps.FHist.weakdeps]
    CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
    HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
    Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
    Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[[deps.FileIO]]
[[deps.FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "62ca0547a14c57e98154423419d8a342dca75ca9"
git-tree-sha1 = "62ca0547a14c57e98154423419d8a342dca75ca9"
@@ -847,17 +951,13 @@ version = "0.22.18"
git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0"
git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0"
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
version = "0.7.10"
version = "0.7.10"
weakdeps = ["Random", "RecipesBase", "Statistics"]


    [deps.IntervalSets.extensions]
    [deps.IntervalSets.extensions]
    IntervalSetsRandomExt = "Random"
    IntervalSetsRandomExt = "Random"
    IntervalSetsRecipesBaseExt = "RecipesBase"
    IntervalSetsRecipesBaseExt = "RecipesBase"
    IntervalSetsStatisticsExt = "Statistics"
    IntervalSetsStatisticsExt = "Statistics"


    [deps.IntervalSets.weakdeps]
    Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
    RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
    Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[deps.InvertedIndices]]
[[deps.InvertedIndices]]
git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038"
git-tree-sha1 = "0dc7b50b8d436461be01300fd8cd45aa0274b038"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
@@ -1087,6 +1187,26 @@ deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.6+0"
version = "2.28.6+0"


[[deps.Measurements]]
deps = ["Calculus", "LinearAlgebra", "Printf", "Requires"]
git-tree-sha1 = "bdcde8ec04ca84aef5b124a17684bf3b302de00e"
uuid = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
version = "2.11.0"

    [deps.Measurements.extensions]
    MeasurementsBaseTypeExt = "BaseType"
    MeasurementsJunoExt = "Juno"
    MeasurementsRecipesBaseExt = "RecipesBase"
    MeasurementsSpecialFunctionsExt = "SpecialFunctions"
    MeasurementsUnitfulExt = "Unitful"

    [deps.Measurements.weakdeps]
    BaseType = "7fbed51b-1ef5-4d67-9085-a4a9b26f478c"
    Juno = "e5e0dc1b-0480-54bc-9374-aad01c23163d"
    RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
    SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
    Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[[deps.Missings]]
[[deps.Missings]]
deps = ["DataAPI"]
deps = ["DataAPI"]
git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d"
git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d"
@@ -1350,6 +1470,12 @@ weakdeps = ["FixedPointNumbers"]
    [deps.Ratios.extensions]
    [deps.Ratios.extensions]
    RatiosFixedPointNumbersExt = "FixedPointNumbers"
    RatiosFixedPointNumbersExt = "FixedPointNumbers"


[[deps.RecipesBase]]
deps = ["PrecompileTools"]
git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "1.3.4"

[[deps.Reexport]]
[[deps.Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
@@ -1840,6 +1966,7 @@ version = "3.6.0+0"
# ╟─425f9200-ebed-4677-8011-93c45eef71fc
# ╟─425f9200-ebed-4677-8011-93c45eef71fc
# ╠═f8fc02f7-827b-441d-b541-c9e26421df95
# ╠═f8fc02f7-827b-441d-b541-c9e26421df95
# ╠═968c5eb0-dfe1-4cbe-9093-742b7dde1d5a
# ╠═968c5eb0-dfe1-4cbe-9093-742b7dde1d5a
# ╠═de424d0d-4e4e-49df-bf4a-c73e368020a3
# ╟─bfc8753d-b76f-45b5-b19e-528746648117
# ╟─bfc8753d-b76f-45b5-b19e-528746648117
# ╠═205ce73d-6e02-4276-93b5-69b36b635398
# ╠═205ce73d-6e02-4276-93b5-69b36b635398
# ╠═aa8bb253-33b7-47be-b6f2-3f230117d876
# ╠═aa8bb253-33b7-47be-b6f2-3f230117d876
+43 −8
Original line number Original line Diff line number Diff line
### A Pluto.jl notebook ###
### A Pluto.jl notebook ###
# v0.20.3
# v0.20.2


using Markdown
using Markdown
using InteractiveUtils
using InteractiveUtils
@@ -7,7 +7,7 @@ using InteractiveUtils
# ╔═╡ 7c69d12c-80a5-11ef-2674-e155a3483342
# ╔═╡ 7c69d12c-80a5-11ef-2674-e155a3483342
begin
begin
    using Pkg
    using Pkg
    Pkg.activate("..")
    Pkg.activate(".")
    Pkg.status()
    Pkg.status()
    true || include("../src/PSBoardDataBase.jl")
    true || include("../src/PSBoardDataBase.jl")
end
end
@@ -102,7 +102,8 @@ clk_files =
    readdir("../test/input/slavelogs/main/", join = true) |>
    readdir("../test/input/slavelogs/main/", join = true) |>
    filter(endswith("_clk.txt")) |>
    filter(endswith("_clk.txt")) |>
    filter(!contains("nagoya")) |>
    filter(!contains("nagoya")) |>
    filter(!contains("630_190"))
    filter(!contains("630_190")) |>
	filter(!contains("627_344"))


# ╔═╡ 3e5607fd-2a8a-4a1a-9e7b-3f23ef216fad
# ╔═╡ 3e5607fd-2a8a-4a1a-9e7b-3f23ef216fad
"""
"""
@@ -202,7 +203,7 @@ let
            title = "clock rise span distribution",
            title = "clock rise span distribution",
            xlabel = "rise up span / ns",
            xlabel = "rise up span / ns",
            ylabel = "counts",
            ylabel = "counts",
            limits = ((0, 0.18), (0, nothing)),
            limits = ((0, 0.33), (0, nothing)),
            # xticks = (bins, string.(round.(bins, digits = 3))),
            # xticks = (bins, string.(round.(bins, digits = 3))),
            # xticklabelrotation = π / 3,
            # xticklabelrotation = π / 3,
        ),
        ),
@@ -228,6 +229,23 @@ md"""
# ╔═╡ d082e07c-3b42-4362-bebf-63356979a49b
# ╔═╡ d082e07c-3b42-4362-bebf-63356979a49b
gdf_skews_on_psbid = groupby(df_skews, :psbid)
gdf_skews_on_psbid = groupby(df_skews, :psbid)


# ╔═╡ 2d41c98b-630e-41e7-9332-25394a6285e8
md"""
### 同じPSBoardで同じ場所で複数回測定し、測定のばらつきが大きかったもの
すべて異常個体リストで把握済み
"""

# ╔═╡ 6ff9f397-5db9-45af-9bca-7a8d7756f8da
combine(filter(groupby(qaqc_single_results, [:psboard_id, :position])) do sdf
    nrow(dropmissing(sdf, [:lvds_tx_skew])) > 1
end) do sdf
	sdf = dropmissing(sdf, [:lvds_tx_skew])
	# @info "" select(sdf, [:psboard_id, :position, :lvds_tx_skew])
    (skew_mean = mean(sdf.lvds_tx_skew), skew_std = std(sdf.lvds_tx_skew), nrow = nrow(sdf))
end |> (df -> begin
	filter(:skew_std => >(0.5), df)
end)

# ╔═╡ 25688d24-5aee-43d3-aff9-b9efa0556070
# ╔═╡ 25688d24-5aee-43d3-aff9-b9efa0556070
combine(nrow, gdf_skews_on_psbid)
combine(nrow, gdf_skews_on_psbid)


@@ -501,6 +519,9 @@ df_skews_selected_sorted = let
    df
    df
end
end


# ╔═╡ 5c74d0a8-f856-4988-b8f4-d2e02dc26f52
sort(df_skews_selected_sorted, :skew, order = Base.Order.Reverse)

# ╔═╡ 07342d98-3889-4a19-8419-6d113fffb42e
# ╔═╡ 07342d98-3889-4a19-8419-6d113fffb42e
md"""
md"""
#### 立ち上がり時間の分布
#### 立ち上がり時間の分布
@@ -520,7 +541,7 @@ let
            title = "clock rise span distribution",
            title = "clock rise span distribution",
            xlabel = "rise up span / ns",
            xlabel = "rise up span / ns",
            ylabel = "counts",
            ylabel = "counts",
            limits = ((0, 0.18), (0, nothing)),
            limits = ((0, 0.28), (0, nothing)),
            # xticks = (bins, string.(round.(bins, digits = 3))),
            # xticks = (bins, string.(round.(bins, digits = 3))),
            # xticklabelrotation = π / 3,
            # xticklabelrotation = π / 3,
        ),
        ),
@@ -540,7 +561,7 @@ md"""
"""
"""


# ╔═╡ 2a24c277-6679-49f3-b387-6937b7661a25
# ╔═╡ 2a24c277-6679-49f3-b387-6937b7661a25
invalid_measurements = [215, 291, 442, 460, 462, 545, 799, 802, 444, 255, 435]
invalid_measurements = [215, 291, 442, 460, 462, 545, 799, 802, 444, 255, 435, 1213]


# ╔═╡ 13b4112f-96ab-41a1-8ef1-d940771f6ece
# ╔═╡ 13b4112f-96ab-41a1-8ef1-d940771f6ece
df_skews_selected_valids = let
df_skews_selected_valids = let
@@ -548,6 +569,12 @@ df_skews_selected_valids = let
    df
    df
end
end


# ╔═╡ cf658de8-a4c5-413e-b5e3-56b77a80336f
sort(df_skews_selected, :width)

# ╔═╡ 7efd380b-a976-4a86-8dff-8afd551f03fb
sort(df_skews_selected, :width, rev = true)

# ╔═╡ 6a856a55-2611-41d0-a2c7-3645c066fc3c
# ╔═╡ 6a856a55-2611-41d0-a2c7-3645c066fc3c
begin
begin
    @assert all(!ismissing, df_skews_selected_valids.skew)
    @assert all(!ismissing, df_skews_selected_valids.skew)
@@ -584,6 +611,7 @@ let
        valign = :top,
        valign = :top,
        margin = (10, 10, 10, 10),
        margin = (10, 10, 10, 10),
    )
    )
    save("psboard_skew_histogram.svg", fig)
    fig
    fig
end
end


@@ -630,6 +658,7 @@ let
        valign = :top,
        valign = :top,
        margin = (10, 10, 10, 10),
        margin = (10, 10, 10, 10),
    )
    )
    save("psboard_clock_rise_span_histogram.svg", fig)
    fig
    fig
end
end


@@ -704,7 +733,7 @@ let
                sqrt(count * (1000 - count) / 1000)
                sqrt(count * (1000 - count) / 1000)
            end
            end
            label, color = if psbid == psbid_width_max
            label, color = if psbid == psbid_width_max
                "lomgest ($psbid)", (:red, 0.8)
                "longest ($psbid)", (:red, 0.8)
            elseif psbid == psbid_width_min
            elseif psbid == psbid_width_min
                "shortest ($psbid)", (:blue, 0.8)
                "shortest ($psbid)", (:blue, 0.8)
            elseif psbid == psbid_width_typical
            elseif psbid == psbid_width_typical
@@ -715,6 +744,7 @@ let
        end
        end
    end
    end
    axislegend(ax, position = :rb)
    axislegend(ax, position = :rb)
    save("psboard_clock_turnoncurve.svg", fig)
    fig
    fig
end
end


@@ -752,6 +782,8 @@ end
# ╠═875bec26-e576-4f48-ba14-464bce503d75
# ╠═875bec26-e576-4f48-ba14-464bce503d75
# ╟─ec774495-c0be-47a4-9d2c-b48159c07013
# ╟─ec774495-c0be-47a4-9d2c-b48159c07013
# ╠═d082e07c-3b42-4362-bebf-63356979a49b
# ╠═d082e07c-3b42-4362-bebf-63356979a49b
# ╟─2d41c98b-630e-41e7-9332-25394a6285e8
# ╠═6ff9f397-5db9-45af-9bca-7a8d7756f8da
# ╠═25688d24-5aee-43d3-aff9-b9efa0556070
# ╠═25688d24-5aee-43d3-aff9-b9efa0556070
# ╠═239a808c-0411-4542-ae68-6ae6af333bd2
# ╠═239a808c-0411-4542-ae68-6ae6af333bd2
# ╠═8e57bde1-5f97-483d-906e-8ebfb65016d0
# ╠═8e57bde1-5f97-483d-906e-8ebfb65016d0
@@ -776,12 +808,15 @@ end
# ╠═106b8abe-0040-48f1-b663-c00ca7673520
# ╠═106b8abe-0040-48f1-b663-c00ca7673520
# ╠═a06d16ee-a4be-40de-8dac-fd818754373c
# ╠═a06d16ee-a4be-40de-8dac-fd818754373c
# ╠═9f3f780d-da6e-44b4-a002-c2f088681e9c
# ╠═9f3f780d-da6e-44b4-a002-c2f088681e9c
# ╠═5c74d0a8-f856-4988-b8f4-d2e02dc26f52
# ╠═07342d98-3889-4a19-8419-6d113fffb42e
# ╠═07342d98-3889-4a19-8419-6d113fffb42e
# ╠═939aba6b-b03c-42b6-83b3-9cea5f4eb858
# ╠═939aba6b-b03c-42b6-83b3-9cea5f4eb858
# ╠═aa9b78bc-8d66-4df2-bd06-1cbf21190488
# ╠═aa9b78bc-8d66-4df2-bd06-1cbf21190488
# ╠═86437ee6-ccea-43fa-bd93-d86fe055f28d
# ╠═86437ee6-ccea-43fa-bd93-d86fe055f28d
# ╠═2a24c277-6679-49f3-b387-6937b7661a25
# ╠═2a24c277-6679-49f3-b387-6937b7661a25
# ╠═13b4112f-96ab-41a1-8ef1-d940771f6ece
# ╠═13b4112f-96ab-41a1-8ef1-d940771f6ece
# ╠═cf658de8-a4c5-413e-b5e3-56b77a80336f
# ╠═7efd380b-a976-4a86-8dff-8afd551f03fb
# ╠═6a856a55-2611-41d0-a2c7-3645c066fc3c
# ╠═6a856a55-2611-41d0-a2c7-3645c066fc3c
# ╠═4a4ef945-b312-44ed-ab62-ce01fc33f926
# ╠═4a4ef945-b312-44ed-ab62-ce01fc33f926
# ╠═46b2a3cd-d2e6-4277-8b65-9c61f25f69e8
# ╠═46b2a3cd-d2e6-4277-8b65-9c61f25f69e8
+20 −5
Original line number Original line Diff line number Diff line
@@ -24,16 +24,19 @@ mutable struct DbConnection
    db::SQLite.DB
    db::SQLite.DB
    df_single_result::DataFrame
    df_single_result::DataFrame
    df_extra_results::DataFrame
    df_extra_results::DataFrame
    df_runs::DataFrame
    function DbConnection(db::SQLite.DB)
    function DbConnection(db::SQLite.DB)
        df_single_results =
        df_single_results =
            DBInterface.execute(db, sql"select * from qaqc_single_run_results") |> DataFrame
            DBInterface.execute(db, sql"select * from qaqc_single_run_results") |> DataFrame
        df_extra_results =
        df_extra_results =
            DBInterface.execute(db, sql"select * from qaqc_extra_run_results") |> DataFrame
            DBInterface.execute(db, sql"select * from qaqc_extra_run_results") |> DataFrame
        new(db, df_single_results, df_extra_results)
        df_runs = DBInterface.execute(db, sql"select * from qaqc_runs") |> DataFrame
        new(db, df_single_results, df_extra_results, df_runs)
    end
    end
end
end


THRESHOLD_INSUFFICIENT_RESET_WITH_10 = 0.1
THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_1to5 = 0.1
THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_6 = 0.05
THRESHOLD_RESET_FAILED_THOUGH_RECONFIG_DONE = 0.1
THRESHOLD_RESET_FAILED_THOUGH_RECONFIG_DONE = 0.1
THRESHOLD_ALWAYS_HIT_FLAG_TRUE = 0.1
THRESHOLD_ALWAYS_HIT_FLAG_TRUE = 0.1
THRESHOLD_BCID_FAIL = 0.1
THRESHOLD_BCID_FAIL = 0.1
@@ -75,9 +78,21 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
        nrow(extra_results) == 1 && let
        nrow(extra_results) == 1 && let
            extra_result = Tables.rowtable(extra_results) |> first
            extra_result = Tables.rowtable(extra_results) |> first
            f1 =
            f1 =
                !ismissing(extra_result.insufficient_reset_with_10) &&
                !ismissing(extra_result.insufficient_reset_with_10) && begin
                    campaign_id =
                        filter(:id => ==(extra_result.runid), conn.df_runs).campaign_id
                    @assert length(campaign_id) == 1
                    campaign_id = first(campaign_id)
                    if campaign_id  5
                        extra_result.insufficient_reset_with_10 >=
                        extra_result.insufficient_reset_with_10 >=
                extra_result.num_tests * THRESHOLD_INSUFFICIENT_RESET_WITH_10
                        extra_result.num_tests *
                        THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_1to5
                    else
                        extra_result.insufficient_reset_with_10 >=
                        extra_result.num_tests *
                        THRESHOLD_INSUFFICIENT_RESET_WITH_10_CAMPAIGN_6
                    end
                end
            f2 =
            f2 =
                !ismissing(extra_result.reset_failed_though_reconfig_done) &&
                !ismissing(extra_result.reset_failed_though_reconfig_done) &&
                extra_result.reset_failed_though_reconfig_done >=
                extra_result.reset_failed_though_reconfig_done >=
+15 −2
Original line number Original line Diff line number Diff line
@@ -25,13 +25,14 @@ end
Fill qaqc_campaigns table in `db`.
Fill qaqc_campaigns table in `db`.
"""
"""
function insert_qaqc_campaign_id(db::SQLite.DB)
function insert_qaqc_campaign_id(db::SQLite.DB)
    campaigns = [1, 2, 3, 4, 5]
    campaigns = [1, 2, 3, 4, 5, 6]
    dates = [
    dates = [
        (DateTime(2024, 7, 22), DateTime(2024, 7, 24)),
        (DateTime(2024, 7, 22), DateTime(2024, 7, 24)),
        (DateTime(2024, 8, 6), DateTime(2024, 8, 9)),
        (DateTime(2024, 8, 6), DateTime(2024, 8, 9)),
        (DateTime(2024, 9, 10), DateTime(2024, 9, 12)),
        (DateTime(2024, 9, 10), DateTime(2024, 9, 12)),
        (DateTime(2024, 9, 30), DateTime(2024, 10, 4)),
        (DateTime(2024, 9, 30), DateTime(2024, 10, 4)),
        (DateTime(2024, 11, 11), DateTime(2024, 11, 14)),
        (DateTime(2024, 11, 11), DateTime(2024, 11, 14)),
        (DateTime(2024, 12, 9), DateTime(2024, 12, 12)),
    ]
    ]
    stmt_insert_campaigns = DBInterface.prepare(
    stmt_insert_campaigns = DBInterface.prepare(
        db,
        db,
@@ -212,8 +213,10 @@ function get_campaign_id_from_run_id(runid::Integer)
        3
        3
    elseif runid < 293
    elseif runid < 293
        4
        4
    elseif runid < Inf # TODO: update this at the end of 5th campaign
    elseif runid < 354
        5
        5
    elseif runid < Inf # TODO: update this at the end of 6th campaign
        6
    else
    else
        @error "Fix this function"
        @error "Fix this function"
        DomainError("runid $(runid) is not registered to the software")
        DomainError("runid $(runid) is not registered to the software")
@@ -755,6 +758,16 @@ function add_skew_from_slave_clk_logs(db::SQLite.DB, logs_dir::AbstractString)
            if m[:psbid] == "630" && m[:runid] == "190"
            if m[:psbid] == "630" && m[:runid] == "190"
                @debug "skipping... (psbid=630 runid=190 is broken)"
                @debug "skipping... (psbid=630 runid=190 is broken)"
                continue
                continue
            elseif m[:psbid] == "627" && m[:runid] == "344"
                @debug "skipping... (psbid=627 runid=344 is broken)"
                continue
            end

            skew = try
                ClockParser.get_skew(file)
            catch e
                @error "Failed to parse clock skew: psbid: $(m[:psbid]), runid: $(m[:runid])" file
                throw(e)
            end
            end


            DBInterface.execute(
            DBInterface.execute(