aboutsummaryrefslogtreecommitdiff
path: root/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb')
-rw-r--r--evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb479
1 files changed, 479 insertions, 0 deletions
diff --git a/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb b/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb
new file mode 100644
index 0000000..8fde028
--- /dev/null
+++ b/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb
@@ -0,0 +1,479 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "import seaborn as sns\n",
+ "import warnings\n",
+ "import scipy.stats as stats\n",
+ "import os\n",
+ "\n",
+ "warnings.simplefilter(action='ignore', category=FutureWarning)\n",
+ "pd.options.mode.chained_assignment = None \n",
+ "plt.style.use('ggplot')\n",
+ "sns.color_palette(\"Paired\");\n",
+ "sns.set_theme();"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Data Loading"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "FileNotFoundError",
+ "evalue": "[Errno 2] No such file or directory: '../../../out/pretrained/adept_ablations/lambda/results/adept_level1_ablation_lambda.run311/trialframe.csv'",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
+ "\u001b[1;32m/Users/fredericbecker/Documents/Master/Masterarbeit/code/local/loci_public/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb Cell 3\u001b[0m line \u001b[0;36m1\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/fredericbecker/Documents/Master/Masterarbeit/code/local/loci_public/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb#W2sZmlsZQ%3D%3D?line=12'>13</a>\u001b[0m \u001b[39mfor\u001b[39;00m net \u001b[39min\u001b[39;00m nets:\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/fredericbecker/Documents/Master/Masterarbeit/code/local/loci_public/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb#W2sZmlsZQ%3D%3D?line=13'>14</a>\u001b[0m path \u001b[39m=\u001b[39m os\u001b[39m.\u001b[39mpath\u001b[39m.\u001b[39mjoin(root_path, \u001b[39m'\u001b[39m\u001b[39mresults\u001b[39m\u001b[39m'\u001b[39m, net)\n\u001b[0;32m---> <a href='vscode-notebook-cell:/Users/fredericbecker/Documents/Master/Masterarbeit/code/local/loci_public/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb#W2sZmlsZQ%3D%3D?line=14'>15</a>\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mopen\u001b[39;49m(os\u001b[39m.\u001b[39;49mpath\u001b[39m.\u001b[39;49mjoin(path, \u001b[39m'\u001b[39;49m\u001b[39mtrialframe.csv\u001b[39;49m\u001b[39m'\u001b[39;49m), \u001b[39m'\u001b[39;49m\u001b[39mrb\u001b[39;49m\u001b[39m'\u001b[39;49m) \u001b[39mas\u001b[39;00m f:\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/fredericbecker/Documents/Master/Masterarbeit/code/local/loci_public/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb#W2sZmlsZQ%3D%3D?line=15'>16</a>\u001b[0m tf_temp \u001b[39m=\u001b[39m pd\u001b[39m.\u001b[39mread_csv(f, index_col\u001b[39m=\u001b[39m\u001b[39m0\u001b[39m)\n\u001b[1;32m <a href='vscode-notebook-cell:/Users/fredericbecker/Documents/Master/Masterarbeit/code/local/loci_public/evaluation/adept_ablation/lambda/evaluation_loci_looped_abl1.ipynb#W2sZmlsZQ%3D%3D?line=16'>17</a>\u001b[0m tf_temp[\u001b[39m'\u001b[39m\u001b[39mnet\u001b[39m\u001b[39m'\u001b[39m] \u001b[39m=\u001b[39m net\n",
+ "File \u001b[0;32m~/miniconda3/envs/loci23/lib/python3.9/site-packages/IPython/core/interactiveshell.py:282\u001b[0m, in \u001b[0;36m_modified_open\u001b[0;34m(file, *args, **kwargs)\u001b[0m\n\u001b[1;32m 275\u001b[0m \u001b[39mif\u001b[39;00m file \u001b[39min\u001b[39;00m {\u001b[39m0\u001b[39m, \u001b[39m1\u001b[39m, \u001b[39m2\u001b[39m}:\n\u001b[1;32m 276\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\n\u001b[1;32m 277\u001b[0m \u001b[39mf\u001b[39m\u001b[39m\"\u001b[39m\u001b[39mIPython won\u001b[39m\u001b[39m'\u001b[39m\u001b[39mt let you open fd=\u001b[39m\u001b[39m{\u001b[39;00mfile\u001b[39m}\u001b[39;00m\u001b[39m by default \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m 278\u001b[0m \u001b[39m\"\u001b[39m\u001b[39mas it is likely to crash IPython. If you know what you are doing, \u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m 279\u001b[0m \u001b[39m\"\u001b[39m\u001b[39myou can use builtins\u001b[39m\u001b[39m'\u001b[39m\u001b[39m open.\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m 280\u001b[0m )\n\u001b[0;32m--> 282\u001b[0m \u001b[39mreturn\u001b[39;00m io_open(file, \u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n",
+ "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '../../../out/pretrained/adept_ablations/lambda/results/adept_level1_ablation_lambda.run311/trialframe.csv'"
+ ]
+ }
+ ],
+ "source": [
+ "# setting path to results folder\n",
+ "root_path = '../../../out/pretrained/adept_ablations/lambda'\n",
+ "\n",
+ "# list all folders in root path that don't stat with a dot\n",
+ "nets = ['adept_level1_ablation_lambda.run311']\n",
+ "\n",
+ "# read pickle file\n",
+ "tf = pd.DataFrame()\n",
+ "sf = pd.DataFrame()\n",
+ "af = pd.DataFrame()\n",
+ "\n",
+ "# load statistics files from nets\n",
+ "for net in nets:\n",
+ " path = os.path.join(root_path, net, 'results')\n",
+ " with open(os.path.join(path, 'trialframe.csv'), 'rb') as f:\n",
+ " tf_temp = pd.read_csv(f, index_col=0)\n",
+ " tf_temp['net'] = net\n",
+ " tf = pd.concat([tf,tf_temp])\n",
+ "\n",
+ " with open(os.path.join(path, 'slotframe.csv'), 'rb') as f:\n",
+ " sf_temp = pd.read_csv(f, index_col=0)\n",
+ " sf_temp['net'] = net\n",
+ " sf = pd.concat([sf,sf_temp])\n",
+ "\n",
+ " with open(os.path.join(path, 'accframe.csv'), 'rb') as f:\n",
+ " af_temp = pd.read_csv(f, index_col=0)\n",
+ " af_temp['net'] = net\n",
+ " af = pd.concat([af,af_temp])\n",
+ "\n",
+ "# cast variables\n",
+ "sf['visible'] = sf['visible'].astype(bool)\n",
+ "sf['bound'] = sf['bound'].astype(bool)\n",
+ "sf['occluder'] = sf['occluder'].astype(bool)\n",
+ "sf['inimage'] = sf['inimage'].astype(bool)\n",
+ "sf['vanishing'] = sf['vanishing'].astype(bool)\n",
+ "sf['alpha_pos'] = 1-sf['alpha_pos']\n",
+ "sf['alpha_ges'] = 1-sf['alpha_ges']\n",
+ "\n",
+ "# scale to percentage\n",
+ "sf['TE'] = sf['TE'] * 100\n",
+ "\n",
+ "# add surprise as dummy code\n",
+ "tf['control'] = [('control' in set) for set in tf['set']]\n",
+ "sf['control'] = [('control' in set) for set in sf['set']]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Calculate Tracking Error (TE)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Tracking Error when visible: M: 11.6 , STD: 13.5, Count: 2281\n",
+ "Tracking Error when occluded: M: 7.1 , STD: 4.02, Count: 564\n"
+ ]
+ }
+ ],
+ "source": [
+ "grouping = (sf.inimage & sf.bound & ~sf.occluder & sf.control)\n",
+ "\n",
+ "def get_stats(col):\n",
+ " return f' M: {col.mean():.3} , STD: {col.std():.3}, Count: {col.count()}'\n",
+ "\n",
+ "# When Visible\n",
+ "temp = sf[grouping & sf.visible]\n",
+ "print(f'Tracking Error when visible:' + get_stats(temp['TE']))\n",
+ "\n",
+ "# When Occluded\n",
+ "temp = sf[grouping & ~sf.visible]\n",
+ "print(f'Tracking Error when occluded:' + get_stats(temp['TE']))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Calculate Succesfull Trackings (TE)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style scoped>\n",
+ " .dataframe tbody tr th:only-of-type {\n",
+ " vertical-align: middle;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>set</th>\n",
+ " <th>evalmode</th>\n",
+ " <th>tracked_pos</th>\n",
+ " <th>tracked_neg</th>\n",
+ " <th>tracked_pos_pro</th>\n",
+ " <th>tracked_neg_pro</th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>0</th>\n",
+ " <td>control</td>\n",
+ " <td>open</td>\n",
+ " <td>0</td>\n",
+ " <td>54</td>\n",
+ " <td>0.0</td>\n",
+ " <td>1.0</td>\n",
+ " </tr>\n",
+ " </tbody>\n",
+ "</table>\n",
+ "</div>"
+ ],
+ "text/plain": [
+ " set evalmode tracked_pos tracked_neg tracked_pos_pro \\\n",
+ "0 control open 0 54 0.0 \n",
+ "\n",
+ " tracked_neg_pro \n",
+ "0 1.0 "
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# succesfull trackings: In the last visible moment of the target, the slot was less than 10% away from the target\n",
+ "# determine last visible frame numeric\n",
+ "grouping_factors = ['net','set','evalmode','scene','slot']\n",
+ "ff = sf[sf.visible & sf.bound & sf.inimage].groupby(grouping_factors).max()\n",
+ "ff.rename(columns = {'frame':'last_visible'}, inplace = True)\n",
+ "sf = sf.merge(ff[['last_visible']], on=grouping_factors, how='left')\n",
+ "\n",
+ "# same for first bound frame\n",
+ "ff = sf[sf.visible & sf.bound & sf.inimage].groupby(grouping_factors).min()\n",
+ "ff.rename(columns = {'frame':'first_visible'}, inplace = True)\n",
+ "sf = sf.merge(ff[['first_visible']], on=grouping_factors, how='left')\n",
+ "\n",
+ "# add dummy variable to sf\n",
+ "sf['last_visible'] = (sf['last_visible'] == sf['frame'])\n",
+ "\n",
+ "# extract the trials where the target was last visible and threshold the TE\n",
+ "ff = sf[sf['last_visible']] \n",
+ "ff['tracked_pos'] = (ff['TE'] < 10)\n",
+ "ff['tracked_neg'] = (ff['TE'] >= 10)\n",
+ "\n",
+ "# fill NaN with 0\n",
+ "sf = sf.merge(ff[grouping_factors + ['tracked_pos', 'tracked_neg']], on=grouping_factors, how='left')\n",
+ "sf['tracked_pos'].fillna(False, inplace=True)\n",
+ "sf['tracked_neg'].fillna(False, inplace=True)\n",
+ "\n",
+ "# Aggreagte over all scenes\n",
+ "temp = sf[(sf['frame']== 1) & ~sf.occluder & sf.control & (sf.first_visible < 20)]\n",
+ "temp = temp.groupby(['set', 'evalmode']).sum()\n",
+ "temp = temp[['tracked_pos', 'tracked_neg']]\n",
+ "temp = temp.reset_index()\n",
+ "\n",
+ "temp['tracked_pos_pro'] = temp['tracked_pos'] / (temp['tracked_pos'] + temp['tracked_neg'])\n",
+ "temp['tracked_neg_pro'] = temp['tracked_neg'] / (temp['tracked_pos'] + temp['tracked_neg'])\n",
+ "\n",
+ "temp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Mostly Tracked stats"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEmCAYAAAB20LuSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAir0lEQVR4nO3dd3hUVf7H8fek0UsIoSoiCkdABUGKBVFkXeuqix10V0SKCy7KqvijN8FdUVAUFURBARfBLljoFqSJICoHBBsQIYagJBAgmfn9MQk7xEAmMOFmTj6v5+Ex994zd74mkw+Hc8891xcIBBAREXfEeF2AiIhEloJdRMQxCnYREcco2EVEHKNgFxFxTJzH718GaAWkADke1yIiEi1igdrASmB//oNeB3sr4GOPaxARiVbtgE/y7/Q62FMA0tMz8fs1nz4SkpIqkpaW4XUZIn+gz2bkxMT4SEysALkZmp/XwZ4D4PcHFOwRpO+llFT6bEZcgUPYungqIuIYBbuIiGO8HooRkeOUk5NNenoq2dkHvC7lqHbujMHv93tdRlSJi0sgMTGZ2NiiRbWCXSTKpaenUrZseSpUqIXP5/O6nCOKi4shO1vBHq5AIEBm5u+kp6dSvXrtIr02rGA3xlQGPgOuttb+kO9Yc2AyUBlYCvS01mYXqQoROWbZ2QdKfKhL0fl8PipUqExGxu4iv7bQMXZjTBuC8yQbHaHJK0Bva20jwAfcXeQqROS4KNTdd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vO19NdADuAoYCCQQvLnmX8AKwBKc3bHUWvtnL2oWKYx67FLaXQ9UstY2B1rl7jsNeAS40lp7DsE1718n+CzZbsBmhbqUZLoLTEq7T4BHjDGLgY+AccCfgNrAAmMOjbr4Aa1KKFFBPXYp1ay13xMM7NFAZWA+EAsssNY2z/sDtAXWe1aoSBEo2KVUM8b0IjjG/qG19iHgA4IPYb7MGHNGbpsrgXVAOSCb4NOAREosXTyVUs0YUwGYApxN8CLpT0BXoCMwgOBa4tlAX2vtx8aYasAiYD/QxlqrXyApcRTsIiKO0VCMiIhjFOwiIo5RsIuIOEbBLiLiGAW7iIhjFOwiIo5RsIuIOEbBLiLimP8HPUx1x9OfirsAAAAASUVORK5CYII=",
+ "text/plain": [
+ "<Figure size 432x288 with 1 Axes>"
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "temp = af[af.index == 'OVERALL']\n",
+ "temp['mostly_tracked'] = temp['mostly_tracked'] / temp['num_unique_objects']\n",
+ "temp['partially_tracked'] = temp['partially_tracked'] / temp['num_unique_objects']\n",
+ "temp['mostly_lost'] = temp['mostly_lost'] / temp['num_unique_objects']\n",
+ "g = temp[['mostly_tracked', 'partially_tracked', 'mostly_lost','set']].set_index(['set']).groupby(['set']).mean().plot(kind='bar', stacked=True);"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# MOTA "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style scoped>\n",
+ " .dataframe tbody tr th:only-of-type {\n",
+ " vertical-align: middle;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>idf1</th>\n",
+ " <th>idp</th>\n",
+ " <th>idr</th>\n",
+ " <th>recall</th>\n",
+ " <th>precision</th>\n",
+ " <th>num_unique_objects</th>\n",
+ " <th>mostly_tracked</th>\n",
+ " <th>partially_tracked</th>\n",
+ " <th>mostly_lost</th>\n",
+ " <th>num_false_positives</th>\n",
+ " <th>num_misses</th>\n",
+ " <th>num_switches</th>\n",
+ " <th>num_fragmentations</th>\n",
+ " <th>mota</th>\n",
+ " <th>motp</th>\n",
+ " <th>num_transfer</th>\n",
+ " <th>num_ascend</th>\n",
+ " <th>num_migrate</th>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>set</th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " <th></th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>control</th>\n",
+ " <td>0.722042</td>\n",
+ " <td>0.879472</td>\n",
+ " <td>0.612416</td>\n",
+ " <td>0.658158</td>\n",
+ " <td>0.945161</td>\n",
+ " <td>86.0</td>\n",
+ " <td>35.0</td>\n",
+ " <td>22.0</td>\n",
+ " <td>29.0</td>\n",
+ " <td>187.0</td>\n",
+ " <td>1674.0</td>\n",
+ " <td>26.0</td>\n",
+ " <td>38.0</td>\n",
+ " <td>0.614662</td>\n",
+ " <td>0.033957</td>\n",
+ " <td>5.0</td>\n",
+ " <td>21.0</td>\n",
+ " <td>0.0</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>surprise</th>\n",
+ " <td>0.738122</td>\n",
+ " <td>0.923004</td>\n",
+ " <td>0.614946</td>\n",
+ " <td>0.646612</td>\n",
+ " <td>0.970532</td>\n",
+ " <td>33.0</td>\n",
+ " <td>11.0</td>\n",
+ " <td>9.0</td>\n",
+ " <td>13.0</td>\n",
+ " <td>31.0</td>\n",
+ " <td>558.0</td>\n",
+ " <td>5.0</td>\n",
+ " <td>6.0</td>\n",
+ " <td>0.623813</td>\n",
+ " <td>0.031067</td>\n",
+ " <td>0.0</td>\n",
+ " <td>5.0</td>\n",
+ " <td>0.0</td>\n",
+ " </tr>\n",
+ " </tbody>\n",
+ "</table>\n",
+ "</div>"
+ ],
+ "text/plain": [
+ " idf1 idp idr recall precision \\\n",
+ "set \n",
+ "control 0.722042 0.879472 0.612416 0.658158 0.945161 \n",
+ "surprise 0.738122 0.923004 0.614946 0.646612 0.970532 \n",
+ "\n",
+ " num_unique_objects mostly_tracked partially_tracked mostly_lost \\\n",
+ "set \n",
+ "control 86.0 35.0 22.0 29.0 \n",
+ "surprise 33.0 11.0 9.0 13.0 \n",
+ "\n",
+ " num_false_positives num_misses num_switches num_fragmentations \\\n",
+ "set \n",
+ "control 187.0 1674.0 26.0 38.0 \n",
+ "surprise 31.0 558.0 5.0 6.0 \n",
+ "\n",
+ " mota motp num_transfer num_ascend num_migrate \n",
+ "set \n",
+ "control 0.614662 0.033957 5.0 21.0 0.0 \n",
+ "surprise 0.623813 0.031067 0.0 5.0 0.0 "
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "af[af.index == 'OVERALL'].groupby(['set']).mean()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Gate Openings"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percept gate openings when visible: M: 1.02 , STD: 0.681, Count: 2281\n",
+ "Percept gate openings when occluded: M: 0.216 , STD: 0.48, Count: 564\n"
+ ]
+ }
+ ],
+ "source": [
+ "grouping = (sf.inimage & sf.bound & ~sf.occluder & sf.control)\n",
+ "temp = sf[grouping & sf.visible]\n",
+ "print(f'Percept gate openings when visible:' + get_stats(temp['alpha_pos'] + temp['alpha_ges']))\n",
+ "temp = sf[grouping & ~sf.visible]\n",
+ "print(f'Percept gate openings when occluded:' + get_stats(temp['alpha_pos'] + temp['alpha_ges']))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "loci23",
+ "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.9.16"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}