{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "17:02:17 [I] klustakwik KlustaKwik2 version 0.2.6\n" ] } ], "source": [ "import os\n", "import expipe\n", "import pathlib\n", "import numpy as np\n", "import spatial_maps.stats as stats\n", "import septum_mec.analysis.data_processing as dp\n", "import head_direction.head as head\n", "import spatial_maps as sp\n", "import septum_mec.analysis.registration\n", "import speed_cells.speed as spd\n", "import septum_mec.analysis.spikes as spikes\n", "import re\n", "import joblib\n", "import multiprocessing\n", "import shutil\n", "import psutil\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import septum_mec\n", "import scipy.ndimage.measurements\n", "from distutils.dir_util import copy_tree\n", "\n", "from tqdm import tqdm_notebook as tqdm\n", "from tqdm._tqdm_notebook import tqdm_notebook\n", "tqdm_notebook.pandas()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "max_speed = 1, # m/s only used for speed score\n", "min_speed = 0.02, # m/s only used for speed score\n", "position_sampling_rate = 100 # for interpolation\n", "position_low_pass_frequency = 6 # for low pass filtering of position\n", "\n", "box_size = [1.0, 1.0]\n", "bin_size = 0.02\n", "smoothing_low = 0.03\n", "smoothing_high = 0.06\n", "\n", "stim_mask = True\n", "baseline_duration = 600" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "project_path = dp.project_path()\n", "\n", "project = expipe.get_project(project_path)\n", "actions = project.actions" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | action | \n", "channel_group | \n", "max_depth_delta | \n", "max_dissimilarity | \n", "unit_id | \n", "unit_idnum | \n", "unit_name | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "1834-010319-1 | \n", "0 | \n", "100 | \n", "0.05 | \n", "ae0353a9-a406-409e-8ff7-2e940b8af03f | \n", "327 | \n", "2 | \n", "
1 | \n", "1834-010319-1 | \n", "0 | \n", "100 | \n", "0.05 | \n", "7f514d43-17ba-4d88-a390-20eec8bc1378 | \n", "328 | \n", "39 | \n", "
2 | \n", "1834-010319-3 | \n", "0 | \n", "100 | \n", "0.05 | \n", "c977aa51-06cc-4d54-9430-a94ad422a03b | \n", "329 | \n", "1 | \n", "
3 | \n", "1834-010319-3 | \n", "0 | \n", "100 | \n", "0.05 | \n", "bd96a67d-ee7d-4cb6-90ab-a5fa751891b9 | \n", "330 | \n", "12 | \n", "
4 | \n", "1834-010319-4 | \n", "0 | \n", "100 | \n", "0.05 | \n", "abc01041-2971-4f62-bf06-5132cf356737 | \n", "332 | \n", "7 | \n", "