{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from scripts.interneuron_placement import Pickle" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "def distance(pickle_1, pickle_2):\n", " return np.sqrt((pickle_1.x - pickle_2.x)**2+(pickle_1.y - pickle_2.y)**2)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "def contains(pickle, XX, YY):\n", " d1, d2 = distance_to_points(pickle, XX, YY)\n", " return d1+d2 < pickle.c\n", " " ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "def distance_to_points(pickle, XX, YY):\n", " x_p_1, y_p_1 = pickle.get_p1()\n", " x_p_2, y_p_2 = pickle.get_p2()\n", " \n", " d1 = np.sqrt((XX-x_p_1)**2 + (YY-y_p_1)**2)\n", " d2 = np.sqrt((XX-x_p_2)**2 + (YY-y_p_2)**2)\n", " return d1, d2" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "def get_overlap(pickle_1, pickle_2, ds = 0.1):\n", " if distance(pickle_1, pickle_2) > 2*(max(pickle_1.a, pickle_1.b)+max(pickle_2.a, pickle_2.b)):\n", " overlap = 0\n", " else:\n", " bb_x_min = pickle_1.x - max(pickle_1.a, pickle_1.b)\n", " bb_x_max = pickle_1.x + max(pickle_1.a, pickle_1.b)\n", " bb_y_min = pickle_1.y - max(pickle_1.a, pickle_1.b)\n", " bb_y_max = pickle_1.y + max(pickle_1.a, pickle_1.b)\n", " bb_X, bb_Y = np.meshgrid(np.arange(bb_x_min, bb_y_max,ds), np.arange(bb_y_min, bb_y_max, ds))\n", " in_1 = contains(pickle_1, bb_X, bb_Y)\n", " in_2 = contains(pickle_2, bb_X, bb_Y)\n", " overlap = np.sum(np.logical_and(in_1, in_2))*ds**2\n", " return overlap\n", " " ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "e1 = Pickle(25, 50, 40, 20, 0.0)\n", "e2 = Pickle(75, 50, 40, 20, np.pi/2.0)\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(0, 100)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAANkAAADGCAYAAABfPiU4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnXl0FFXah583dAIkEQgBQkICgsoWkSVNAIkDgiCrIhJAPp2IDIvgyOeMC+N6lOMGODJCRFaVERETERgPkBFUFIHEhADCBBXQgZBgWBIUMCGdvt8f3eQDDGTprqpOcp9z6nRXdVW9v66uX997q27dV5RSaDQa4/CzWoBGU9PRJtNoDEabTKMxGG0yjcZgtMk0GoPRJtNoDKZck4nIMhHJE5G9Fy1rLCKfisgP7tcQ93IRkTdE5ICI7BGRbkaK12iqAxUpyd4BBl22bAawWSl1A7DZPQ8wGLjBPU0CFnhHpkZTfSnXZEqpL4FTly2+E3jX/f5dYMRFy5crFzuARiIS7i2xGk11pKptsjClVC6A+7WZe3kL4MhF62W7l2k0tRabl/cnZSwrs9+WiEzCVaUkKCgopn379l6WotF4TkZGxgmlVFNP9lFVk/0sIuFKqVx3dTDPvTwbiLpovUggp6wdKKUWAYsA7Ha7Sk9Pr6IUjcY4ROS/nu6jqtXFdUCC+30CsPai5X90X2XsCZy+UK3UaGor5ZZkIrIS6As0EZFs4DngFeBDEZkAHAbi3auvB4YAB4BzwHgDNGs01YpyTaaUuucKH/UvY10FTPNUlEZTk9A9PjQag9Em02gMRptMozEYbTKNxmC0yTQag9Em02gMRptMoz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2sNlmFumAZgYj44zLYCqXUavfin0Uk3P15OJBnoITewB0i8hOuJxX64SrZGonIhfuXZhyPbCBbKZXqnk/GZTozj8VtwI9KqeNKqWJgNXAz5h+LC1zpu1fpfLXaZJZ0wRIRAZYCWUqpv1/00Togwf0+AVdbzRCUUn9TSkUqpa7F9b0/U0r9D/A5MMoMDW4dx4AjInKhI2x/4D+YeCxwVRN7ikig+7e5oMHUY3ERV/ru64A/uq8y9gROX6hWXhUjG9UVbHQOAb4HDgJPmRQzDlcxvwfY5Z6G4GoTbQZ+cL82NklPX+AT9/s2QBpwAEgC6poQvwuQ7j4ea4AQs48F8DywH9gL/BOoa8axAFbiagcW4yqpJlyBtVcsAAAAR0lEQVTpu+OqLia6z9VvcV0NLTeG7vGh0RiM1dVFjabGo02m0RiMNplGYzDaZBqNwWiTaTQGo02m0RiMNplGYzDaZBqNwfwfrEitWSsSs/oAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "fig, ax = plt.subplots(1,1, figsize=(3,3))\n", "\n", "ax.add_artist(e1.get_ellipse())\n", "ax.add_artist(e2.get_ellipse())\n", "ax.set_xlim(0, 100)\n", "ax.set_ylim(0, 100)\n" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2513.2741228718346" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e1.get_area()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2507.25" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_overlap(e1, e1, ds = 0.5)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2513.1475000000005" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_overlap(e1, e1, ds = 0.05)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "172.11500000000004" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_overlap(e1, e2, ds=0.05)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }