From ac351271093c898c0c58b043246d13d3ad9351e5 Mon Sep 17 00:00:00 2001 From: Maximilian Strauss Date: Sun, 3 Dec 2023 13:56:22 +0100 Subject: [PATCH] NBDEV_Prepare --- nbs/04_feature_finding.ipynb | 123 ++--------------------------------- 1 file changed, 6 insertions(+), 117 deletions(-) diff --git a/nbs/04_feature_finding.ipynb b/nbs/04_feature_finding.ipynb index 58ddfde1..6883df12 100644 --- a/nbs/04_feature_finding.ipynb +++ b/nbs/04_feature_finding.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -94,7 +94,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -199,7 +199,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -234,7 +234,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -336,7 +336,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -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\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m plt\u001b[39m.\u001b[39mfigure(figsize\u001b[39m=\u001b[39m(\u001b[39m5\u001b[39m,\u001b[39m5\u001b[39m))\n\u001b[1;32m 2\u001b[0m \u001b[39mfor\u001b[39;00m i, _ \u001b[39min\u001b[39;00m \u001b[39menumerate\u001b[39m(row_borders):\n\u001b[0;32m----> 3\u001b[0m \u001b[39mprint\u001b[39m(i, ctrd, np\u001b[39m.\u001b[39mones_like(ctrd)\u001b[39m*\u001b[39mi)\n\u001b[1;32m 4\u001b[0m ctrd \u001b[39m=\u001b[39m centroids[_\u001b[39m-\u001b[39mrowwise_peaks[i]:_]\n\u001b[1;32m 5\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": [ - "
" - ] - }, - "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, @@ -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,