From 4b8e5d2d84c8a536f79eb81577e3a59467166b19 Mon Sep 17 00:00:00 2001 From: ennucore Date: Thu, 7 Jul 2022 13:15:27 +0300 Subject: [PATCH] Move model --- SimpleCell.ipynb | 1 + TuningCurves.ipynb | 33 ++++++++++++-------- decoding.py => model/decoding.py | 0 decorators.py => model/decorators.py | 0 dimension.py => model/dimension.py | 0 example.py => model/example.py | 0 gratings.py => model/gratings.py | 0 load.py => model/load.py | 0 noisereduction.py => model/noisereduction.py | 0 persistence.py => model/persistence.py | 0 plotting.py => model/plotting.py | 0 11 files changed, 21 insertions(+), 13 deletions(-) rename decoding.py => model/decoding.py (100%) rename decorators.py => model/decorators.py (100%) rename dimension.py => model/dimension.py (100%) rename example.py => model/example.py (100%) rename gratings.py => model/gratings.py (100%) rename load.py => model/load.py (100%) rename noisereduction.py => model/noisereduction.py (100%) rename persistence.py => model/persistence.py (100%) rename plotting.py => model/plotting.py (100%) diff --git a/SimpleCell.ipynb b/SimpleCell.ipynb index 6d91f9e..bbf30e4 100644 --- a/SimpleCell.ipynb +++ b/SimpleCell.ipynb @@ -18,6 +18,7 @@ "import sys\n", "from tqdm import trange\n", "sys.path.insert(0, './Persistent_Homology')\n", + "sys.path.insert(0, './model')\n", "\n", "from gratings import grating_model, GRATING_PARS, get_locations\n", "import gratings\n", diff --git a/TuningCurves.ipynb b/TuningCurves.ipynb index 0e063ae..c7ca555 100644 --- a/TuningCurves.ipynb +++ b/TuningCurves.ipynb @@ -422,11 +422,10 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": { "pycharm": { - "name": "#%%\n", - "is_executing": true + "name": "#%%\n" } }, "outputs": [ @@ -480,7 +479,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "outputs": [], "source": [ "# %matplotlib inline\n", @@ -495,36 +494,44 @@ "metadata": { "collapsed": false, "pycharm": { - "name": "#%%\n", - "is_executing": true + "name": "#%%\n" } } }, { "cell_type": "code", - "execution_count": null, - "outputs": [], + "execution_count": 14, + "outputs": [ + { + "data": { + "text/plain": " 2 ⎛ 2 ⎞ \n k ⋅⎝cos (\\theta) + 1⎠ \n ───────────────────── \n 2 ⎛ \nℯ ⋅cos(\\phi - k⋅(x₀⋅cos(\\theta) + y₀⋅sin(\\theta)))⋅cosh⎝\\s\n\n \n \n \n 2 2 ⎞\nigma ⋅k ⋅cos(\\theta)⎠", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkoAAAApCAYAAADK3AZEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAVb0lEQVR4Ae2d7bXcNBPHNzkpINxU8IQOIKkgoQNIKiB0ACff+JYDHUAqCKQDoAIgHUAHhNtBnv9PKwnZK1uyZe/a947O8crW68x/RtLoxd47Hz58OGzBffvttw91/b0FWrZEg+GyJWkYLYaAIWAIGAK3DYG7W2BYxsDXouOTLdCyQRowIMHHnCFgCBgChoAhYAicGYE7a6woaWB/Kj7u63qo62NdPyvsV/knTuGfK/Cx/G9OIhcImELLAtWtUoR4wFC6lv/jKhVYoYaAIWAIGAKGgCGQRWCtFSUMo7e6vletGEC/5GpXPMbUS/mrGEm+zipacvRtJczj+JXHaytkGR2GgCFgCBgChsCNR2AtQ+nTBDlWla6T5/T2Oz38kAascF9LywpVL1okOIGXOUPAEDAEDAFDwBA4EwKzDSWtbvyga2ilKD2UzeD+xQA/z1TGqttJKr+Wlkii8jzVdXJmSmFf63qBHxL7MFbGVnWqB5zAa/W6VmXECjcEDAFDwBAwBHaEwGxDSTxiJKVGyAnbGtRZBflG/sn5JIVxNmk0/0mBDQFjtKTFKh0GEgeo3/XCMfh+VTgGy+MQp2e2F4srPUo3mkbx1PmLrjFDCLyehbrNNwQMAUPAEDAEDIF1EWgxlD4TaX8OkecNA4ykd7riCkySnvwnBlQSv9htBS1pXd8pfWeVS88PleAT+dF40n264sQ5qBdpIZn7QQPIl+UMtEy+NAi8wM2cIWAIGAKGgCFgCJwBgXsNdTxSXowKjAhWhw66Z3UFHwOKgZ+tKnlu5cj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fw4VpmhNEE4ltQQMAQMAUPAEKhFQIMtW7gcLdjjynAtmzcmneSEAcbqcVxNgrm7N4ZDY8QQMAQMAUPAENgQAhpw2Xb7S358KWND5Bkppwhg0LK113H/B32ZJezgbtrMAAAAAElFTkSuQmCC\n", + "text/latex": "$\\displaystyle e^{\\frac{k^{2} \\left(\\cos^{2}{\\left(\\theta \\right)} + 1\\right)}{2}} \\cos{\\left(\\phi - k \\left(x_{0} \\cos{\\left(\\theta \\right)} + y_{0} \\sin{\\left(\\theta \\right)}\\right) \\right)} \\cosh{\\left(\\sigma^{2} k^{2} \\cos{\\left(\\theta \\right)} \\right)}$" + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "p" ], "metadata": { "collapsed": false, "pycharm": { - "name": "#%%\n", - "is_executing": true + "name": "#%%\n" } } }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "outputs": [], "source": [], "metadata": { "collapsed": false, "pycharm": { - "name": "#%%\n", - "is_executing": true + "name": "#%%\n" } } } diff --git a/decoding.py b/model/decoding.py similarity index 100% rename from decoding.py rename to model/decoding.py diff --git a/decorators.py b/model/decorators.py similarity index 100% rename from decorators.py rename to model/decorators.py diff --git a/dimension.py b/model/dimension.py similarity index 100% rename from dimension.py rename to model/dimension.py diff --git a/example.py b/model/example.py similarity index 100% rename from example.py rename to model/example.py diff --git a/gratings.py b/model/gratings.py similarity index 100% rename from gratings.py rename to model/gratings.py diff --git a/load.py b/model/load.py similarity index 100% rename from load.py rename to model/load.py diff --git a/noisereduction.py b/model/noisereduction.py similarity index 100% rename from noisereduction.py rename to model/noisereduction.py diff --git a/persistence.py b/model/persistence.py similarity index 100% rename from persistence.py rename to model/persistence.py diff --git a/plotting.py b/model/plotting.py similarity index 100% rename from plotting.py rename to model/plotting.py