|
@@ -2,7 +2,7 @@
|
|
|
"cells": [
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 6,
|
|
|
+ "execution_count": 17,
|
|
|
"id": "c37dce82",
|
|
|
"metadata": {
|
|
|
"scrolled": true
|
|
@@ -39,7 +39,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 7,
|
|
|
+ "execution_count": 18,
|
|
|
"id": "a8ea2991",
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
@@ -75,7 +75,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 8,
|
|
|
+ "execution_count": 27,
|
|
|
"id": "3891b792",
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
@@ -100,7 +100,12 @@
|
|
|
"#sessions = [filebase]\n",
|
|
|
"#sessions = processed_008229\n",
|
|
|
"sessions = [\n",
|
|
|
- " '009266_hippoSIT_2023-04-24_16-56-55',\n",
|
|
|
+ "'009266_hippoSIT_2023-04-13_08-57-46',\n",
|
|
|
+ "'009266_hippoSIT_2023-04-14_09-17-34',\n",
|
|
|
+ "'009266_hippoSIT_2023-04-17_09-06-10',\n",
|
|
|
+ "'009266_hippoSIT_2023-04-17_17-04-17',\n",
|
|
|
+ "'009266_hippoSIT_2023-04-19_10-33-51',\n",
|
|
|
+ "'009266_hippoSIT_2023-04-20_08-57-39',\n",
|
|
|
"]\n",
|
|
|
"\n",
|
|
|
"# FIXME move occupancy outside units\n",
|
|
@@ -117,7 +122,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 4,
|
|
|
+ "execution_count": 21,
|
|
|
"id": "347fcf3d",
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
@@ -129,7 +134,7 @@
|
|
|
" '009266_hippoSIT_2023-03-06_15-10-36']"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 4,
|
|
|
+ "execution_count": 21,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
}
|
|
@@ -140,7 +145,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 9,
|
|
|
+ "execution_count": 28,
|
|
|
"id": "24cd2f6e",
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
@@ -148,7 +153,12 @@
|
|
|
"name": "stdout",
|
|
|
"output_type": "stream",
|
|
|
"text": [
|
|
|
- "session 009266_hippoSIT_2023-04-24_16-56-55 done\n"
|
|
|
+ "session 009266_hippoSIT_2023-04-13_08-57-46 done\n",
|
|
|
+ "session 009266_hippoSIT_2023-04-14_09-17-34 done\n",
|
|
|
+ "session 009266_hippoSIT_2023-04-17_09-06-10 done\n",
|
|
|
+ "session 009266_hippoSIT_2023-04-17_17-04-17 done\n",
|
|
|
+ "session 009266_hippoSIT_2023-04-19_10-33-51 done\n",
|
|
|
+ "session 009266_hippoSIT_2023-04-20_08-57-39 done\n"
|
|
|
]
|
|
|
}
|
|
|
],
|
|
@@ -234,7 +244,9 @@
|
|
|
"cell_type": "code",
|
|
|
"execution_count": 8,
|
|
|
"id": "b4be27ef",
|
|
|
- "metadata": {},
|
|
|
+ "metadata": {
|
|
|
+ "scrolled": true
|
|
|
+ },
|
|
|
"outputs": [
|
|
|
{
|
|
|
"data": {
|
|
@@ -552,12 +564,360 @@
|
|
|
"df.head()"
|
|
|
]
|
|
|
},
|
|
|
+ {
|
|
|
+ "cell_type": "markdown",
|
|
|
+ "id": "7f0d30bb",
|
|
|
+ "metadata": {},
|
|
|
+ "source": [
|
|
|
+ "## Read unit names from H5"
|
|
|
+ ]
|
|
|
+ },
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
+ "execution_count": 34,
|
|
|
+ "id": "bb04623f",
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "0 009266_hippoSIT_2023-02-28_19-53-56\n",
|
|
|
+ "1 009266_hippoSIT_2023-03-01_17-53-11\n",
|
|
|
+ "2 009266_hippoSIT_2023-03-06_15-10-36\n",
|
|
|
+ "3 009266_hippoSIT_2023-03-06_20-43-19\n",
|
|
|
+ "4 009266_hippoSIT_2023-03-08_17-06-45\n",
|
|
|
+ "5 009266_hippoSIT_2023-03-09_09-37-07\n",
|
|
|
+ "6 009266_hippoSIT_2023-03-09_19-12-22\n",
|
|
|
+ "7 009266_hippoSIT_2023-04-12_15-49-49\n",
|
|
|
+ "8 009266_hippoSIT_2023-04-13_08-57-46\n",
|
|
|
+ "9 009266_hippoSIT_2023-04-14_09-17-34\n",
|
|
|
+ "10 009266_hippoSIT_2023-04-17_09-06-10\n",
|
|
|
+ "11 009266_hippoSIT_2023-04-17_17-04-17\n",
|
|
|
+ "12 009266_hippoSIT_2023-04-18_10-10-37\n",
|
|
|
+ "13 009266_hippoSIT_2023-04-18_17-03-10\n",
|
|
|
+ "14 009266_hippoSIT_2023-04-19_10-33-51\n",
|
|
|
+ "15 009266_hippoSIT_2023-04-19_11-21-37\n",
|
|
|
+ "16 009266_hippoSIT_2023-04-19_17-12-48\n",
|
|
|
+ "17 009266_hippoSIT_2023-04-20_08-57-39\n",
|
|
|
+ "18 009266_hippoSIT_2023-04-20_15-24-14\n",
|
|
|
+ "19 009266_hippoSIT_2023-04-21_08-43-00\n",
|
|
|
+ "20 009266_hippoSIT_2023-04-21_13-12-31\n",
|
|
|
+ "21 009266_hippoSIT_2023-04-24_10-08-11\n",
|
|
|
+ "22 009266_hippoSIT_2023-04-24_16-56-55\n",
|
|
|
+ "23 009266_hippoSIT_2023-04-25_09-02-56\n",
|
|
|
+ "24 009266_hippoSIT_2023-04-25_17-27-51\n",
|
|
|
+ "25 009266_hippoSIT_2023-04-26_08-20-17\n",
|
|
|
+ "26 009266_hippoSIT_2023-04-27_08-50-53\n",
|
|
|
+ "27 009266_hippoSIT_2023-04-27_21-04-41\n",
|
|
|
+ "28 009266_hippoSIT_2023-04-28_09-04-09\n",
|
|
|
+ "29 009266_hippoSIT_2023-04-28_16-40-08\n",
|
|
|
+ "30 009266_hippoSIT_2023-05-02_12-22-14\n",
|
|
|
+ "31 009266_hippoSIT_2023-05-02_17-20-39\n",
|
|
|
+ "32 009266_hippoSIT_2023-05-03_08-22-14\n",
|
|
|
+ "33 009266_hippoSIT_2023-05-04_09-11-06\n",
|
|
|
+ "34 009266_hippoSIT_2023-05-04_19-47-15\n",
|
|
|
+ "35 009266_hippoSIT_2023-05-05_08-32-22\n",
|
|
|
+ "36 009266_hippoSIT_2023-05-05_15-06-54\n",
|
|
|
+ "37 009266_hippoSIT_2023-05-18_16-22-42\n",
|
|
|
+ "38 009266_hippoSIT_2023-05-19_10-22-53\n",
|
|
|
+ "39 009266_hippoSIT_2023-05-21_10-56-38\n",
|
|
|
+ "40 009266_hippoSIT_2023-05-22_09-27-22\n",
|
|
|
+ "41 009266_hippoSIT_2023-05-22_21-54-39\n",
|
|
|
+ "42 009266_hippoSIT_2023-05-23_09-18-05\n",
|
|
|
+ "43 009266_hippoSIT_2023-05-23_17-48-12\n",
|
|
|
+ "44 009266_hippoSIT_2023-05-25_09-56-32\n",
|
|
|
+ "45 009266_hippoSIT_2023-05-25_15-55-57\n",
|
|
|
+ "46 009266_hippoSIT_2023-06-13_08-49-11\n",
|
|
|
+ "47 009266_hippoSIT_2023-06-14_08-21-23\n",
|
|
|
+ "48 009266_hippoSIT_2023-06-15_09-25-15\n",
|
|
|
+ "49 009266_hippoSIT_2023-06-15_17-30-45\n",
|
|
|
+ "50 009266_hippoSIT_2023-06-16_08-49-13\n",
|
|
|
+ "51 009266_hippoSIT_2023-06-19_08-58-35\n",
|
|
|
+ "52 009266_hippoSIT_2023-06-20_08-26-29\n",
|
|
|
+ "53 009266_hippoSIT_2023-06-21_08-15-10\n",
|
|
|
+ "54 009266_hippoSIT_2023-06-21_20-39-34\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "source = '/home/sobolev/nevermind/Andrey/data'\n",
|
|
|
+ "animal = '009266'\n",
|
|
|
+ "\n",
|
|
|
+ "sessions = get_sessions_list(os.path.join(source, animal), animal)\n",
|
|
|
+ "for i, session in enumerate(sessions):\n",
|
|
|
+ " print(i, session)"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 44,
|
|
|
"id": "46e18f9a",
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
+ "source": [
|
|
|
+ "session = sessions[8]\n",
|
|
|
+ "session = '009266_hippoSIT_2023-05-04_19-47-15'\n",
|
|
|
+ "sessionpath = os.path.join(source, animal, session)\n",
|
|
|
+ "h5_file = os.path.join(sessionpath, '%s.h5' % session)\n",
|
|
|
+ "\n",
|
|
|
+ "with h5py.File(h5_file, 'r') as f:\n",
|
|
|
+ " if 'units' in f:\n",
|
|
|
+ " units = [unit_name for unit_name in f['units']]\n",
|
|
|
+ " else:\n",
|
|
|
+ " units = []"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 45,
|
|
|
+ "id": "e10c7239",
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "text/plain": [
|
|
|
+ "['1-10',\n",
|
|
|
+ " '1-11',\n",
|
|
|
+ " '1-12',\n",
|
|
|
+ " '1-13',\n",
|
|
|
+ " '1-14',\n",
|
|
|
+ " '1-15',\n",
|
|
|
+ " '1-16',\n",
|
|
|
+ " '1-17',\n",
|
|
|
+ " '1-18',\n",
|
|
|
+ " '1-19',\n",
|
|
|
+ " '1-2',\n",
|
|
|
+ " '1-20',\n",
|
|
|
+ " '1-21',\n",
|
|
|
+ " '1-22',\n",
|
|
|
+ " '1-23',\n",
|
|
|
+ " '1-24',\n",
|
|
|
+ " '1-25',\n",
|
|
|
+ " '1-26',\n",
|
|
|
+ " '1-27',\n",
|
|
|
+ " '1-28',\n",
|
|
|
+ " '1-29',\n",
|
|
|
+ " '1-3',\n",
|
|
|
+ " '1-30',\n",
|
|
|
+ " '1-31',\n",
|
|
|
+ " '1-32',\n",
|
|
|
+ " '1-33',\n",
|
|
|
+ " '1-34',\n",
|
|
|
+ " '1-35',\n",
|
|
|
+ " '1-36',\n",
|
|
|
+ " '1-37',\n",
|
|
|
+ " '1-38',\n",
|
|
|
+ " '1-39',\n",
|
|
|
+ " '1-4',\n",
|
|
|
+ " '1-40',\n",
|
|
|
+ " '1-41',\n",
|
|
|
+ " '1-42',\n",
|
|
|
+ " '1-43',\n",
|
|
|
+ " '1-44',\n",
|
|
|
+ " '1-45',\n",
|
|
|
+ " '1-46',\n",
|
|
|
+ " '1-47',\n",
|
|
|
+ " '1-48',\n",
|
|
|
+ " '1-49',\n",
|
|
|
+ " '1-5',\n",
|
|
|
+ " '1-6',\n",
|
|
|
+ " '1-7',\n",
|
|
|
+ " '1-8',\n",
|
|
|
+ " '1-9',\n",
|
|
|
+ " '2-10',\n",
|
|
|
+ " '2-11',\n",
|
|
|
+ " '2-12',\n",
|
|
|
+ " '2-13',\n",
|
|
|
+ " '2-14',\n",
|
|
|
+ " '2-15',\n",
|
|
|
+ " '2-16',\n",
|
|
|
+ " '2-17',\n",
|
|
|
+ " '2-18',\n",
|
|
|
+ " '2-19',\n",
|
|
|
+ " '2-2',\n",
|
|
|
+ " '2-20',\n",
|
|
|
+ " '2-21',\n",
|
|
|
+ " '2-22',\n",
|
|
|
+ " '2-23',\n",
|
|
|
+ " '2-24',\n",
|
|
|
+ " '2-25',\n",
|
|
|
+ " '2-26',\n",
|
|
|
+ " '2-27',\n",
|
|
|
+ " '2-28',\n",
|
|
|
+ " '2-29',\n",
|
|
|
+ " '2-3',\n",
|
|
|
+ " '2-30',\n",
|
|
|
+ " '2-31',\n",
|
|
|
+ " '2-32',\n",
|
|
|
+ " '2-33',\n",
|
|
|
+ " '2-34',\n",
|
|
|
+ " '2-35',\n",
|
|
|
+ " '2-36',\n",
|
|
|
+ " '2-37',\n",
|
|
|
+ " '2-38',\n",
|
|
|
+ " '2-39',\n",
|
|
|
+ " '2-4',\n",
|
|
|
+ " '2-40',\n",
|
|
|
+ " '2-41',\n",
|
|
|
+ " '2-42',\n",
|
|
|
+ " '2-43',\n",
|
|
|
+ " '2-44',\n",
|
|
|
+ " '2-45',\n",
|
|
|
+ " '2-46',\n",
|
|
|
+ " '2-47',\n",
|
|
|
+ " '2-48',\n",
|
|
|
+ " '2-49',\n",
|
|
|
+ " '2-5',\n",
|
|
|
+ " '2-50',\n",
|
|
|
+ " '2-51',\n",
|
|
|
+ " '2-52',\n",
|
|
|
+ " '2-53',\n",
|
|
|
+ " '2-54',\n",
|
|
|
+ " '2-55',\n",
|
|
|
+ " '2-56',\n",
|
|
|
+ " '2-57',\n",
|
|
|
+ " '2-58',\n",
|
|
|
+ " '2-59',\n",
|
|
|
+ " '2-6',\n",
|
|
|
+ " '2-60',\n",
|
|
|
+ " '2-61',\n",
|
|
|
+ " '2-62',\n",
|
|
|
+ " '2-63',\n",
|
|
|
+ " '2-64',\n",
|
|
|
+ " '2-65',\n",
|
|
|
+ " '2-66',\n",
|
|
|
+ " '2-67',\n",
|
|
|
+ " '2-68',\n",
|
|
|
+ " '2-7',\n",
|
|
|
+ " '2-8',\n",
|
|
|
+ " '2-9',\n",
|
|
|
+ " '3-10',\n",
|
|
|
+ " '3-11',\n",
|
|
|
+ " '3-12',\n",
|
|
|
+ " '3-13',\n",
|
|
|
+ " '3-14',\n",
|
|
|
+ " '3-15',\n",
|
|
|
+ " '3-16',\n",
|
|
|
+ " '3-17',\n",
|
|
|
+ " '3-18',\n",
|
|
|
+ " '3-19',\n",
|
|
|
+ " '3-2',\n",
|
|
|
+ " '3-20',\n",
|
|
|
+ " '3-21',\n",
|
|
|
+ " '3-22',\n",
|
|
|
+ " '3-23',\n",
|
|
|
+ " '3-24',\n",
|
|
|
+ " '3-25',\n",
|
|
|
+ " '3-26',\n",
|
|
|
+ " '3-27',\n",
|
|
|
+ " '3-28',\n",
|
|
|
+ " '3-29',\n",
|
|
|
+ " '3-3',\n",
|
|
|
+ " '3-30',\n",
|
|
|
+ " '3-31',\n",
|
|
|
+ " '3-32',\n",
|
|
|
+ " '3-33',\n",
|
|
|
+ " '3-34',\n",
|
|
|
+ " '3-35',\n",
|
|
|
+ " '3-4',\n",
|
|
|
+ " '3-5',\n",
|
|
|
+ " '3-6',\n",
|
|
|
+ " '3-7',\n",
|
|
|
+ " '3-8',\n",
|
|
|
+ " '3-9',\n",
|
|
|
+ " '4-10',\n",
|
|
|
+ " '4-11',\n",
|
|
|
+ " '4-12',\n",
|
|
|
+ " '4-13',\n",
|
|
|
+ " '4-14',\n",
|
|
|
+ " '4-15',\n",
|
|
|
+ " '4-16',\n",
|
|
|
+ " '4-17',\n",
|
|
|
+ " '4-18',\n",
|
|
|
+ " '4-19',\n",
|
|
|
+ " '4-2',\n",
|
|
|
+ " '4-20',\n",
|
|
|
+ " '4-21',\n",
|
|
|
+ " '4-22',\n",
|
|
|
+ " '4-23',\n",
|
|
|
+ " '4-3',\n",
|
|
|
+ " '4-4',\n",
|
|
|
+ " '4-5',\n",
|
|
|
+ " '4-6',\n",
|
|
|
+ " '4-7',\n",
|
|
|
+ " '4-8',\n",
|
|
|
+ " '4-9',\n",
|
|
|
+ " '5-10',\n",
|
|
|
+ " '5-11',\n",
|
|
|
+ " '5-12',\n",
|
|
|
+ " '5-13',\n",
|
|
|
+ " '5-14',\n",
|
|
|
+ " '5-15',\n",
|
|
|
+ " '5-16',\n",
|
|
|
+ " '5-17',\n",
|
|
|
+ " '5-18',\n",
|
|
|
+ " '5-19',\n",
|
|
|
+ " '5-2',\n",
|
|
|
+ " '5-20',\n",
|
|
|
+ " '5-21',\n",
|
|
|
+ " '5-22',\n",
|
|
|
+ " '5-23',\n",
|
|
|
+ " '5-24',\n",
|
|
|
+ " '5-25',\n",
|
|
|
+ " '5-26',\n",
|
|
|
+ " '5-27',\n",
|
|
|
+ " '5-28',\n",
|
|
|
+ " '5-29',\n",
|
|
|
+ " '5-3',\n",
|
|
|
+ " '5-30',\n",
|
|
|
+ " '5-4',\n",
|
|
|
+ " '5-5',\n",
|
|
|
+ " '5-6',\n",
|
|
|
+ " '5-7',\n",
|
|
|
+ " '5-8',\n",
|
|
|
+ " '5-9',\n",
|
|
|
+ " '6-10',\n",
|
|
|
+ " '6-11',\n",
|
|
|
+ " '6-12',\n",
|
|
|
+ " '6-13',\n",
|
|
|
+ " '6-14',\n",
|
|
|
+ " '6-15',\n",
|
|
|
+ " '6-16',\n",
|
|
|
+ " '6-17',\n",
|
|
|
+ " '6-18',\n",
|
|
|
+ " '6-19',\n",
|
|
|
+ " '6-2',\n",
|
|
|
+ " '6-20',\n",
|
|
|
+ " '6-21',\n",
|
|
|
+ " '6-22',\n",
|
|
|
+ " '6-23',\n",
|
|
|
+ " '6-24',\n",
|
|
|
+ " '6-25',\n",
|
|
|
+ " '6-3',\n",
|
|
|
+ " '6-4',\n",
|
|
|
+ " '6-5',\n",
|
|
|
+ " '6-6',\n",
|
|
|
+ " '6-7',\n",
|
|
|
+ " '6-8',\n",
|
|
|
+ " '6-9']"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "execution_count": 45,
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "execute_result"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "units"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": null,
|
|
|
+ "id": "6f5d5ba7",
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
"source": []
|
|
|
}
|
|
|
],
|