lasprs/examples_py/test_rtaps.ipynb

96 lines
2.0 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "7ad7512c-d605-4c9f-acd5-5f6a1c22cc1a",
"metadata": {},
"outputs": [],
"source": [
"!cd .. && maturin develop -F python-bindings"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "92d7023d-3168-4d55-841a-01d8f6d03bab",
"metadata": {},
"outputs": [],
"source": [
"from lasprs import WindowType, ApsSettings, AvPowerSpectra, ApsMode, Overlap, FreqWeighting, StreamMgr, RtAps"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "faf909e7-5c45-43c4-9687-0d33eb939e5f",
"metadata": {},
"outputs": [],
"source": [
"settings = ApsSettings(ApsMode.AllAveraging(), Overlap.NoOverlap(), WindowType.Hann, FreqWeighting.A, 2048, 48000)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "814dafd3-4e84-4e62-8d30-6d07d4bf75ae",
"metadata": {},
"outputs": [],
"source": [
"smgr = StreamMgr()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0ba155e1-7481-4f77-bc6b-e3096be539ce",
"metadata": {},
"outputs": [],
"source": [
"smgr.startDefaultInputStream()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7edbd928-b0e7-4b22-afaf-96e247d2672c",
"metadata": {},
"outputs": [],
"source": [
"rt = RtAps(smgr,settings)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7ef4f826-aa05-4d71-a866-29c9491b478b",
"metadata": {},
"outputs": [],
"source": [
"rt.get_last()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}