numass/notebooks/jupyter-demo.ipynb

107 lines
2.3 KiB
Plaintext
Raw Normal View History

2021-12-21 13:29:48 +03:00
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "2a640dcc-4696-408f-b1f0-0cdf917e4719",
"metadata": {},
"outputs": [],
"source": [
"@file:Repository(\"https://repo.kotlin.link\")\n",
"@file:Repository(\"*mavenLocal\")\n",
"@file:DependsOn(\"ru.inr.mass:numass-workspace:0.1.1\")"
2021-12-21 13:29:48 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2d193fb2-6c18-4c64-b5c3-3e9ed4099d5b",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"val repo: DataTree<NumassDirectorySet> = Numass.readRepository(\"D:\\\\Work\\\\Numass\\\\data\\\\test\")\n",
2021-12-21 13:29:48 +03:00
"repo"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "373de92b-2533-4cfc-820b-ca90b9d028fc",
"metadata": {},
"outputs": [],
"source": [
"val numassSet = repo[\"set_7\"]!!\n",
"Plotly.plotNumassSet(numassSet, amplitudeBinSize = 8U, eventExtractor = NumassEventExtractor.TQDC)"
2021-12-21 13:29:48 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "568f62e4-86ec-4e06-835a-ef41ca7b4fb9",
2021-12-21 13:29:48 +03:00
"metadata": {},
"outputs": [],
"source": [
"//numassSet.meta"
2021-12-21 13:29:48 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d0845a15-2928-4e6e-a891-fee130ef5326",
2021-12-21 13:29:48 +03:00
"metadata": {},
"outputs": [],
"source": [
"val point = numassSet.points.first { it.voltage == 14200.0}"
2021-12-21 13:29:48 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "842dfbcb-17f0-4df9-b5d4-2835f15f3a50",
2021-12-21 13:29:48 +03:00
"metadata": {},
"outputs": [],
"source": [
"point"
2021-12-21 13:29:48 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ac448607-3e7a-4849-9cab-0187e15a7238",
"metadata": {},
2021-12-21 13:29:48 +03:00
"outputs": [],
"source": [
"Plotly.plotNumassBlock(point, amplitudeBinSize = 8U, eventExtractor = NumassEventExtractor.TQDC)"
2021-12-21 13:29:48 +03:00
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c00f251f-5858-43b9-bcf2-a48efcbee3c9",
2021-12-21 13:29:48 +03:00
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Kotlin",
"language": "kotlin",
"name": "kotlin"
},
"language_info": {
"codemirror_mode": "text/x-kotlin",
"file_extension": ".kt",
"mimetype": "text/x-kotlin",
"name": "kotlin",
"nbconvert_exporter": "",
"pygments_lexer": "kotlin",
"version": "1.6.20-dev-6372"
}
},
"nbformat": 4,
"nbformat_minor": 5
}