Skip to content

Commit

Permalink
Minor updates for the analyse notebook.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjarosik committed Dec 9, 2024
1 parent d2d8788 commit a723c02
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions examples/common/trigger_input/analyse.ipynb
Original file line number Diff line number Diff line change
@@ -1,52 +1,65 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "561e0eef-5969-40ae-baa4-6f15bf742510",
"metadata": {},
"outputs": [],
"source": [
"! pip install git+https://github.com/pjarosik/pjtools.git"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "initial_id",
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"#! pip install git+https://github.com/pjarosik/pjtools.git\n",
"import pickle\n",
"from IPython.core.display import HTML\n",
"from pjtools.visualization import create_animation"
"from pjtools.visualization import create_animation\n",
"import numpy as np"
]
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"id": "3fbeb57b3ef1a51d",
"metadata": {},
"outputs": [],
"source": [
"data = pickle.load(open(\"data.pkl\", \"rb\"))\n",
"data = pickle.load(open(\"data_2024-12-09_16-58-31.pkl\", \"rb\"))\n",
"single_frame, rf_frames = zip(*data)\n",
"\n",
"anim = create_animation(rf_frames, value_range=(-100, 100))\n",
"rf_frames = np.stack(rf_frames)\n",
"rf_frames = rf_frames.squeeze()\n",
"n_batches, n_tx, n_samples, n_rx = rf_frames.shape\n",
"rf_frames = rf_frames.reshape(n_batches*n_tx, n_samples, n_rx)\n",
"\n",
"anim = create_animation(rf_frames[:, 750:1250, :], value_range=(-100, 100))\n",
"HTML(anim.to_jshtml())"
],
"id": "3fbeb57b3ef1a51d"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
"pygments_lexer": "ipython3",
"version": "3.10.10"
}
},
"nbformat": 4,
Expand Down

0 comments on commit a723c02

Please sign in to comment.