Skip to content

Commit

Permalink
NBDEV_Prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
straussmaximilian committed Dec 3, 2023
1 parent 1a7d63a commit ac35127
Showing 1 changed file with 6 additions and 117 deletions.
123 changes: 6 additions & 117 deletions nbs/04_feature_finding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -199,7 +199,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -234,7 +234,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -336,7 +336,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -404,105 +404,6 @@
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([10.2, 20. , 10. ])"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"index = 0\n",
"centroids[row_borders[index]:row_borders[index]+rowwise_peaks[index]]"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[10, 20, 30, 10.2, 20, 10, 30, 40]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[10, 20, 30,\n",
" 10.2, 20,\n",
" 10, 30, 40]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'ctrd' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m/Users/flq567/programming/alphapept/nbs/04_feature_finding.ipynb Cell 12\u001b[0m line \u001b[0;36m<cell line: 2>\u001b[0;34m()\u001b[0m\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/flq567/programming/alphapept/nbs/04_feature_finding.ipynb#X14sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m plt\u001b[39m.\u001b[39mfigure(figsize\u001b[39m=\u001b[39m(\u001b[39m5\u001b[39m,\u001b[39m5\u001b[39m))\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/flq567/programming/alphapept/nbs/04_feature_finding.ipynb#X14sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m \u001b[39mfor\u001b[39;00m i, _ \u001b[39min\u001b[39;00m \u001b[39menumerate\u001b[39m(row_borders):\n\u001b[0;32m----> <a href='vscode-notebook-cell:/Users/flq567/programming/alphapept/nbs/04_feature_finding.ipynb#X14sZmlsZQ%3D%3D?line=2'>3</a>\u001b[0m \u001b[39mprint\u001b[39m(i, ctrd, np\u001b[39m.\u001b[39mones_like(ctrd)\u001b[39m*\u001b[39mi)\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/flq567/programming/alphapept/nbs/04_feature_finding.ipynb#X14sZmlsZQ%3D%3D?line=3'>4</a>\u001b[0m ctrd \u001b[39m=\u001b[39m centroids[_\u001b[39m-\u001b[39mrowwise_peaks[i]:_]\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/flq567/programming/alphapept/nbs/04_feature_finding.ipynb#X14sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m plt\u001b[39m.\u001b[39mplot(ctrd, np\u001b[39m.\u001b[39mones_like(ctrd)\u001b[39m*\u001b[39mi, \u001b[39m'\u001b[39m\u001b[39m.\u001b[39m\u001b[39m'\u001b[39m)\n",
"\u001b[0;31mNameError\u001b[0m: name 'ctrd' is not defined"
]
},
{
"data": {
"text/plain": [
"<Figure size 360x360 with 0 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(5,5))\n",
"for i, _ in enumerate(row_borders):\n",
" print(i, ctrd, np.ones_like(ctrd)*i)\n",
" ctrd = centroids[_-rowwise_peaks[i]:_]\n",
" plt.plot(ctrd, np.ones_like(ctrd)*i, '.')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([3, 6, 9])"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"10, 20, 30\n",
"10.2, 20\n",
"10, 30, 40"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -3049,21 +2950,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "base",
"display_name": "python3",
"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.8.15"
}
},
"nbformat": 4,
Expand Down

0 comments on commit ac35127

Please sign in to comment.