You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
347 lines
70 KiB
347 lines
70 KiB
2 years ago
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"%matplotlib inline\n",
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import pandas as pd\n",
|
||
|
"import scipy\n",
|
||
|
"import pickle as pkl\n",
|
||
|
"import ipywidgets as widgets\n",
|
||
|
"from mpl_toolkits import mplot3d\n",
|
||
|
"from scipy import sparse\n",
|
||
|
"import sys"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"6845348.zip\n",
|
||
|
"allimgs.mat\n",
|
||
|
"dbstims.mat\n",
|
||
|
"default_stim_order.mat\n",
|
||
|
"images_natimg2800_4D_M170714_MP032_2017-09-22.mat\n",
|
||
|
"images_natimg2800_4D_M170717_MP033_2017-09-19.mat\n",
|
||
|
"images_natimg2800_4D_M170717_MP033_2017-09-22.mat\n",
|
||
|
"images_natimg2800_4D_M170717_MP034_2017-09-20.mat\n",
|
||
|
"images_natimg2800_8D_M161025_MP030_2017-06-07.mat\n",
|
||
|
"images_natimg2800_8D_M170604_MP031_2017-07-02.mat\n",
|
||
|
"images_natimg2800_8D_M170714_MP032_2017-08-10.mat\n",
|
||
|
"images_natimg2800_8D_M170714_MP032_2017-09-15.mat\n",
|
||
|
"images_natimg2800_8D_M170717_MP033_2017-08-22.mat\n",
|
||
|
"images_natimg2800_8D_M170717_MP034_2017-09-15.mat\n",
|
||
|
"images_natimg2800_all.mat\n",
|
||
|
"images_natimg2800_small_M170714_MP032_2017-09-18.mat\n",
|
||
|
"images_natimg2800_small_M170717_MP033_2017-08-23.mat\n",
|
||
|
"images_natimg2800_small_M170717_MP034_2017-09-17.mat\n",
|
||
|
"images_natimg2800_white_all.mat\n",
|
||
|
"images_ori_all.mat\n",
|
||
|
"images_sparse_all.mat\n",
|
||
|
"instructions.pdf\n",
|
||
|
"natimg2800_4D_M170714_MP032_2017-09-22.mat\n",
|
||
|
"natimg2800_4D_M170717_MP033_2017-09-19.mat\n",
|
||
|
"natimg2800_4D_M170717_MP033_2017-09-22.mat\n",
|
||
|
"natimg2800_4D_M170717_MP034_2017-09-20.mat\n",
|
||
|
"natimg2800_8D_M161025_MP030_2017-06-07.mat\n",
|
||
|
"natimg2800_8D_M170604_MP031_2017-07-02.mat\n",
|
||
|
"natimg2800_8D_M170714_MP032_2017-08-10.mat\n",
|
||
|
"natimg2800_8D_M170714_MP032_2017-09-15.mat\n",
|
||
|
"natimg2800_8D_M170717_MP033_2017-08-22.mat\n",
|
||
|
"natimg2800_8D_M170717_MP034_2017-09-15.mat\n",
|
||
|
"natimg2800_M160825_MP027_2016-12-14.mat\n",
|
||
|
"natimg2800_M161025_MP030_2017-05-29.mat\n",
|
||
|
"natimg2800_M170604_MP031_2017-06-28.mat\n",
|
||
|
"natimg2800_M170714_MP032_2017-08-07.mat\n",
|
||
|
"natimg2800_M170714_MP032_2017-09-14.mat\n",
|
||
|
"natimg2800_M170717_MP033_2017-08-20.mat\n",
|
||
|
"natimg2800_M170717_MP034_2017-09-11.mat\n",
|
||
|
"natimg2800_small_M170714_MP032_2017-09-18.mat\n",
|
||
|
"natimg2800_small_M170717_MP033_2017-08-23.mat\n",
|
||
|
"natimg2800_small_M170717_MP034_2017-09-17.mat\n",
|
||
|
"natimg2800_white_M170714_MP032_2017-09-11.mat\n",
|
||
|
"natimg2800_white_M170714_MP032_2017-09-12.mat\n",
|
||
|
"natimg2800_white_M170717_MP033_2017-09-21.mat\n",
|
||
|
"natimg2800_white_M170717_MP034_2017-09-14.mat\n",
|
||
|
"natimg32_M150824_MP019_2016-03-23.mat\n",
|
||
|
"natimg32_M170604_MP031_2017-06-27.mat\n",
|
||
|
"natimg32_M170714_MP032_2017-08-01.mat\n",
|
||
|
"natimg32_M170717_MP033_2017-08-25.mat\n",
|
||
|
"ori32_M160825_MP027_2016-12-15.mat\n",
|
||
|
"ori32_M170604_MP031_2017-06-26.mat\n",
|
||
|
"ori32_M170714_MP032_2017-08-02.mat\n",
|
||
|
"ori32_M170717_MP033_2017-08-17.mat\n",
|
||
|
"sparseSTATS.mat\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"!ls data/stringer"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.image.AxesImage at 0x7f150dc9f6a0>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAB3CAYAAAAaaxszAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8rg+JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAB220lEQVR4nO29WYysW5YW9v0RkTFPGTlnnswz3Huqbt0qqscqN7SFWka2oY3ctoRabSxc2C3Vi0Eg2zIN/cKDLYElY2PJwiobLLDADTJY8IAHjEElP3Q13V3jvXWnc8+UJ+eMIWOOyIjfD3G+db5YZ0eeU1T1OXWrckupzIz4hz2s/a21vr322lEcx7gu1+W6XJfr8skridddgetyXa7Ldbku/3LlGsCvy3W5LtflE1quAfy6XJfrcl0+oeUawK/Ldbku1+UTWq4B/Lpcl+tyXT6h5RrAr8t1uS7X5RNavi8Aj6LoD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iJRALFYhHdbtes4l6vZ4uGo9HIFiqBGX12eXmJTqeDKIrw2c9+Fm+//TZGo5Hx7cfHx3j//ffx0UcfYWVlBblcDjdv3sTKygoGgwHOz89xenqKdrttViu9D05SD4z0/DY2NlCtVo0SOzg4wP3793F2dgYA2NzcnFNsmUwGlUrFgFXXSjY3N5HJZLC1tTX3vEKhAGBGm2UyGZOParWK6XSKdruNTqdjRk+lUkG1WrX76B3EcYxSqTTX72pJKmB4udc54a9TK9w/T39z7uqCbcjzYl8pqPE5VCAqg6GghdDc5Zzz4Offpd4i5xyAuXnsPQntEzXqVO6n0+kcjaq/WRc/Jvq5b5/WQZVIqPy
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import scipy.io as sio\n",
|
||
|
"mt = sio.loadmat('data/stringer/natimg2800_M170717_MP034_2017-09-11.mat')\n",
|
||
|
"\n",
|
||
|
"### stimulus responses\n",
|
||
|
"resp = mt['stim'][0]['resp'][0] # stimuli by neurons\n",
|
||
|
"istim = mt['stim'][0]['istim'][0] # identities of stimuli in resp\n",
|
||
|
"spont = mt['stim'][0]['spont'][0] # timepoints by neurons\n",
|
||
|
"\n",
|
||
|
"### cell information\n",
|
||
|
"med = mt['med'] # cell centers (X Y Z)\n",
|
||
|
"mt['stat'][0] # first cell’s stats\n",
|
||
|
"mt['stat'][0]['npix'] # one example field, tells you how pixels make up the cell\n",
|
||
|
"\n",
|
||
|
"### loading images\n",
|
||
|
"mt2 = sio.loadmat('data/stringer/images_natimg2800_all.mat')\n",
|
||
|
"imgs = mt2['imgs'] # 68 by 270 by number of images\n",
|
||
|
"# check out first image using matplotlib.pyplot\n",
|
||
|
"plt.imshow(imgs[:,:,0], cmap='gray')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(10103, 1)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 4,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"mt['stat'].shape"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"((5880, 10103), (5880, 1))"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"resp.shape, istim.shape"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"mt_small = sio.loadmat('data/stringer/natimg2800_small_M170717_MP034_2017-09-17.mat')\n",
|
||
|
"images_small = sio.loadmat('data/stringer/images_natimg2800_small_M170717_MP034_2017-09-17.mat')['imgs']\n",
|
||
|
"istim_small = mt_small['stim'][0]['istim'][0]\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.image.AxesImage at 0x7f14f5593460>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAB3CAYAAAAaaxszAAAAOXRFWHRTb2Z0d2FyZQBNY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5ObJO02+0kYuc5UmIpkZ6N4mQRF/AMMa4y0lY/crStIs4CZs+tuc82WuWBxlKpNDQviRVy/hXANxO1NNR7VtHU8+l5VLT1nO12G41GI3loGiBH3+VyObFNWq0WRCSxW1qtFtrtdnJT0RsUcH3emLSBXceZdVzAMwIPQKoYsVDypFLsgdvoGsABG4Wj9TR44LFarQ552XYAkyNo9ue5CIfzwPW67FtrpK32yf7+fiLg2h4d+KxWq4lo6/X0OLVc9Np2HMCjbyfLuIBnGI68Wcj1PeB6yTmLrK6UA1wfXFR/2hJL8eNBR55wijNh1IeOzZVifyVwhgnnkut5VIwbjcZQO9nH5gharRMVfI6+jyLe7oM7s4YL+IwybgIlG9m2220AGBJxFiv9yxYCvzdqYig7nStH3+yJ8/VVUK3Fo1GyWhwaJfPc4rqftYY4Ytfr6DlEBO12G/V6HY1GA/v7+6jX62i1Wonoa5u1rTqjoZfNO1nFBXzGScvo0G08eMnRtx3E5H0Vm1LIkSz73mnb7ZJsfC59bouLNMNFLZ96vY6rV68m0bJ61mqhcPRfrVZRrVaHinQ6nQ4ajQaAfq74/v5+It77+/uJdaK54Wwn6Q3GhdvJKi7gM8yovGpguMCHc8IZtUtUvEZFm7H5S+xkUSzaVtS1zXrcuHa3223s7u7itddew+7ubiK8mnECIEkxXFlZQS6XQ7lcHvp8VMBDCImA1+v1JBLXXwPq+7Nwa1vcA3eyigv4jDJOvK2
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.imshow(images_small[:, :, 0], cmap='gray')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(68, 270, 5880)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"images_in_order = images_small[:, :, (istim_small[:, 0] - 1) % 2800]\n",
|
||
|
"images_in_order.shape"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"1"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"istim_small.min()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(68, 270, 10103)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 10,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"matrices = np.dot(images_in_order[:, :, ::11], resp[::11, :])\n",
|
||
|
"matrices.shape"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 14,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.image.AxesImage at 0x7f14d77c8f70>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 14,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAB3CAYAAAAaaxszAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMiwg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2y+e60/l0AOBGYFQeBThJcydLt/935ldU2QdJS8dfCMRsreY63EXavVirlKKEGQNAGUyFuj8dx5eVzuacEPHmo2m9noViUgP0BHnxjU9thoNNBqtQpS1+vk8wCEErYn74i6A7OMIPAZhY++9XGfUoVKCYzMSXSMkDUq9sPcPYnSz00Sb7Vah2x2GnHn5BQdIVnVcWiEz/P65KJq4/4JACg7cDQxyjIbjQYAYDAYlKJ5HXrP+hBHJYAjEg/MIoLApwxPDkp2StqeRL0bhITHCLnf72M4HKLf75ecFtTKlfibzSYGg0GJtDW550lVya/Kpw2gJK2oXOEH9eQmw9LPbAc7JZ6LOre6W1QX17JyQ/k1IavXJKLuwLwgCHyGkPNn58hEH+19MtETlX+llNDr9UrRN4/TCFoTo16PbjQaBZFSvx4MBsWr3+8X7aFen7PqAQdD7bkf60JJiL/1+33s7e2h3+8X5xyNRkWkrR2IX+6t1+sVx7JDA1By2WgZXh8PKSUwqwgCnxJyFkGfsPPRufcleweHRtqqEzPaBFCax1sHwTSbzSKCJfmRKLUsWvs0ItcIlyTZbDbR6XRKicNer3dIJmF07dun0XOv10On08H29nZB4O12G+vr62g2m2i326X6dLvdImLnq9vtotfrlabF9U8S3KZTDbDtPrkZskpgFhAEPiPIEboi58jgvl6LVilA5z5RqUM7CBLpYDAoRcs
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.imshow(matrices.sum(axis=2), cmap='gray')"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3.10.5 64-bit",
|
||
|
"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.10.5"
|
||
|
},
|
||
|
"orig_nbformat": 4,
|
||
|
"vscode": {
|
||
|
"interpreter": {
|
||
|
"hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|