Просмотр исходного кода

removed conversion notebooks and miscellaneous files.

Moritz-Alexander-Kern 2 лет назад
Родитель
Сommit
0e7ad5b181

+ 0 - 129
tutorials/tutorial_asset/src/update_nix_format_to_1_5_0.ipynb

@@ -1,129 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "id": "3c0cbe44-b73d-479b-a49b-803985b9280c",
-   "metadata": {},
-   "source": [
-    "First, we download the data, packed in NixIO structure, from https://gin.g-node.org/INM-6/elephant-data"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 1,
-   "id": "be63cd99-bef7-4e3a-a12a-c52a0ccab595",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "!curl https://web.gin.g-node.org/INM-6/elephant-data/raw/master/dataset-2/asset_showcase_500.nix --output asset_showcase_500.nix --location"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 2,
-   "id": "15407897-e157-4d12-9cb6-d7e6df8767c1",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "total 43M\n",
-      "-rw-rw-r-- 1 kern kern  43M Dez 13 16:52 asset_showcase_500.nix\n",
-      "-rw-rw-r-- 1 kern kern  15K Nov 18 16:52 LICENSE\n",
-      "-rw-rw-r-- 1 kern kern  701 Nov 18 16:52 README.md\n",
-      "-rw-rw-r-- 1 kern kern 3,8K Dez 13 16:52 update_nix_format_to_1_5_0.ipynb\n"
-     ]
-    }
-   ],
-   "source": [
-    "!ls -lh"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "19d5bc06-796c-4517-8982-f7d2c529df5f",
-   "metadata": {},
-   "source": [
-    "Note: Files are replaced *in place*. Make sure to backup your files before upgrading."
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 3,
-   "id": "53206fec-df0f-4c47-b1dd-c0ece6b3c88f",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "asset_showcase_500.nix: 1.1.0 -> 1.2.1\n",
-      "  - Add a UUID to the file header\n",
-      "  - Update the file format version to 1.2.1\n",
-      "\n",
-      "Processing asset_showcase_500.nix done\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "True"
-      ]
-     },
-     "execution_count": 3,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "import nixio\n",
-    "filename = \"asset_showcase_500.nix\"\n",
-    "nixio.file_upgrade(filename, quiet=False)\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 4,
-   "id": "f81d20bd-1a5f-45e1-9b1f-fdcd47652efb",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "total 43M\n",
-      "-rw-rw-r-- 1 kern kern  43M Dez 13 16:53 asset_showcase_500.nix\n",
-      "-rw-rw-r-- 1 kern kern  15K Nov 18 16:52 LICENSE\n",
-      "-rw-rw-r-- 1 kern kern  701 Nov 18 16:52 README.md\n",
-      "-rw-rw-r-- 1 kern kern 3,8K Dez 13 16:52 update_nix_format_to_1_5_0.ipynb\n"
-     ]
-    }
-   ],
-   "source": [
-    "!ls -lh"
-   ]
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "elephant_nixio",
-   "language": "python",
-   "name": "elephant_nixio"
-  },
-  "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.7"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}

+ 0 - 3
tutorials/tutorial_unitary_event_analysis/.idea/.gitignore

@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml

+ 0 - 13
tutorials/tutorial_unitary_event_analysis/.idea/inspectionProfiles/Project_Default.xml

@@ -1,13 +0,0 @@
-<component name="InspectionProjectProfileManager">
-  <profile version="1.0">
-    <option name="myName" value="Project Default" />
-    <inspection_tool class="PyPep8Inspection" enabled="true" level="WARNING" enabled_by_default="true" />
-    <inspection_tool class="PyPep8NamingInspection" enabled="true" level="WARNING" enabled_by_default="true">
-      <option name="ignoredErrors">
-        <list>
-          <option value="N806" />
-        </list>
-      </option>
-    </inspection_tool>
-  </profile>
-</component>

+ 0 - 6
tutorials/tutorial_unitary_event_analysis/.idea/inspectionProfiles/profiles_settings.xml

@@ -1,6 +0,0 @@
-<component name="InspectionProjectProfileManager">
-  <settings>
-    <option name="USE_PROJECT_PROFILE" value="false" />
-    <version value="1.0" />
-  </settings>
-</component>

+ 0 - 4
tutorials/tutorial_unitary_event_analysis/.idea/misc.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (elephant) (2)" project-jdk-type="Python SDK" />
-</project>

+ 0 - 8
tutorials/tutorial_unitary_event_analysis/.idea/modules.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/tutorial_unitary_event_analysis.iml" filepath="$PROJECT_DIR$/.idea/tutorial_unitary_event_analysis.iml" />
-    </modules>
-  </component>
-</project>

+ 0 - 8
tutorials/tutorial_unitary_event_analysis/.idea/tutorial_unitary_event_analysis.iml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="PYTHON_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <content url="file://$MODULE_DIR$" />
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 6
tutorials/tutorial_unitary_event_analysis/.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
-  </component>
-</project>

+ 0 - 152
tutorials/tutorial_unitary_event_analysis/src/.ipynb_checkpoints/conversion_hd5_to_nix-checkpoint.ipynb

@@ -1,152 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "id": "723581d7",
-   "metadata": {},
-   "source": [
-    "# Conversion\n",
-    "This Notebook converts  the dataset for the unitary events tutorial from .h5 to.nix format"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 1,
-   "id": "6c6d2774",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "import neo\n",
-    "from neo.core import Block, Segment, Group, AnalogSignal\n",
-    "import numpy as np\n",
-    "import quantities as pq\n",
-    "\n",
-    "import random\n",
-    "import string\n",
-    "import matplotlib.pyplot as plt\n",
-    "import elephant.unitary_event_analysis as ue\n",
-    "# Fix random seed to guarantee fixed output\n",
-    "random.seed(1224)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "26914203",
-   "metadata": {},
-   "source": [
-    "## Download data"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 2,
-   "id": "8c798f2b",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n",
-      "                                 Dload  Upload   Total   Spent    Left  Speed\n",
-      "100   369  100   369    0     0   7096      0 --:--:-- --:--:-- --:--:--  7096\n",
-      "100  289k    0  289k    0     0   255k      0 --:--:--  0:00:01 --:--:-- 1562k\n"
-     ]
-    }
-   ],
-   "source": [
-    "!curl https://web.gin.g-node.org/INM-6/elephant-data/raw/master/dataset-1/dataset-1.h5 --output dataset-1.h5 --location"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "903fc908",
-   "metadata": {},
-   "source": [
-    "## Load Data"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 3,
-   "id": "870b8b77",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "/home/kern/miniconda3/envs/elephant/lib/python3.9/site-packages/neo/io/hdf5io.py:63: FutureWarning: NeoHdf5IO will be removed in the next release of Neo. If you still have data in this format, we recommend saving it using NixIO which is also based on HDF5.\n",
-      "  warn(warning_msg, FutureWarning)\n",
-      "/home/kern/miniconda3/envs/elephant/lib/python3.9/site-packages/numpy/core/shape_base.py:121: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.\n",
-      "  ary = asanyarray(ary)\n"
-     ]
-    }
-   ],
-   "source": [
-    "block = neo.io.NeoHdf5IO(\"./dataset-1.h5\")\n",
-    "sts1 = block.read_block().segments[0].spiketrains\n",
-    "sts2 = block.read_block().segments[1].spiketrains\n",
-    "spiketrains = np.vstack((sts1,sts2)).T"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 4,
-   "id": "c52a2a89",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# create empty block\n",
-    "blk = Block()\n",
-    "# add segments and spike trains\n",
-    "for ind in range (len(sts1)):\n",
-    "    seg = Segment(name='segment %d' % ind, index=ind)\n",
-    "    seg.spiketrains.append(sts1[ind])\n",
-    "    seg.spiketrains.append(sts2[ind])\n",
-    "    blk.segments.append(seg)\n"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "28a2e17f",
-   "metadata": {},
-   "source": [
-    "## Save as .nix"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 5,
-   "id": "2a06477e",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "filename = 'dataset-1.nix'\n",
-    "with neo.io.NixIO(filename, 'ow') as io:\n",
-    "    io.write_block(blk)"
-   ]
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "elephant_old",
-   "language": "python",
-   "name": "elephant_old"
-  },
-  "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.6"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}

+ 0 - 212
tutorials/tutorial_unitary_event_analysis/src/conversion_hd5_to_nix.ipynb

@@ -1,212 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "id": "723581d7",
-   "metadata": {},
-   "source": [
-    "# Conversion\n",
-    "This Notebook converts  the dataset for the unitary events tutorial from .h5 to.nix format"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 1,
-   "id": "6c6d2774",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "import neo\n",
-    "from neo.core import Block, Segment, Group, AnalogSignal\n",
-    "import numpy as np\n",
-    "import quantities as pq\n",
-    "\n",
-    "import random\n",
-    "import string\n",
-    "import matplotlib.pyplot as plt\n",
-    "import elephant.unitary_event_analysis as ue\n",
-    "# Fix random seed to guarantee fixed output\n",
-    "random.seed(1224)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "26914203",
-   "metadata": {},
-   "source": [
-    "## Download data"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 2,
-   "id": "8c798f2b",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n",
-      "                                 Dload  Upload   Total   Spent    Left  Speed\n",
-      "100   369  100   369    0     0   2795      0 --:--:-- --:--:-- --:--:--  2795\n",
-      "100  289k    0  289k    0     0   212k      0 --:--:--  0:00:01 --:--:-- 2979k\n"
-     ]
-    }
-   ],
-   "source": [
-    "!curl https://web.gin.g-node.org/INM-6/elephant-data/raw/master/dataset-1/dataset-1.h5 --output dataset-1.h5 --location"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "903fc908",
-   "metadata": {},
-   "source": [
-    "## Load Data"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 3,
-   "id": "870b8b77",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "/home/kern/miniconda3/envs/elephant_nixio/lib/python3.9/site-packages/neo/io/hdf5io.py:63: FutureWarning: NeoHdf5IO will be removed in the next release of Neo. If you still have data in this format, we recommend saving it using NixIO which is also based on HDF5.\n",
-      "  warn(warning_msg, FutureWarning)\n",
-      "/home/kern/miniconda3/envs/elephant_nixio/lib/python3.9/site-packages/numpy/core/shape_base.py:121: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.\n",
-      "  ary = asanyarray(ary)\n"
-     ]
-    }
-   ],
-   "source": [
-    "block = neo.io.NeoHdf5IO(\"./dataset-1.h5\")\n",
-    "sts1 = block.read_block().segments[0].spiketrains\n",
-    "sts2 = block.read_block().segments[1].spiketrains\n",
-    "spiketrains = np.vstack((sts1,sts2)).T"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 4,
-   "id": "c52a2a89",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# create empty block\n",
-    "blk = Block()\n",
-    "# add segments and spike trains\n",
-    "for ind in range (len(sts1)):\n",
-    "    seg = Segment(name='segment %d' % ind, index=ind)\n",
-    "    seg.spiketrains.append(sts1[ind])\n",
-    "    seg.spiketrains.append(sts2[ind])\n",
-    "    blk.segments.append(seg)\n"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "id": "28a2e17f",
-   "metadata": {},
-   "source": [
-    "## Save as .nix"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 5,
-   "id": "2a06477e",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "filename = 'dataset-1.nix'\n",
-    "with neo.io.NixIO(filename, 'ow') as io:\n",
-    "    io.write_block(blk)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 6,
-   "id": "3502e50c-919e-49f8-b38c-629978d1d246",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "total 2,0M\n",
-      "-rw-rw-r-- 1 kern kern 4,6K Dez 13 17:25 conversion_hd5_to_nix.ipynb\n",
-      "-rw-rw-r-- 1 kern kern 289K Dez 13 17:32 dataset-1.h5\n",
-      "-rw-rw-r-- 1 kern kern 1,7M Dez 13 17:32 dataset-1.nix\n"
-     ]
-    }
-   ],
-   "source": [
-    "!ls -lh "
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 8,
-   "id": "cda78e18-84e9-4a44-8e6f-9c0a1f26dd0c",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "File dataset-1.nix is up to date (1.2.1)\n",
-      "Processing dataset-1.nix done\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "True"
-      ]
-     },
-     "execution_count": 8,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "filename = \"dataset-1.nix\"\n",
-    "import nixio\n",
-    "nixio.file_upgrade(filename, quiet=False)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "id": "e297a693-1d89-4770-89c4-d49a1f9df86c",
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "elephant_nixio",
-   "language": "python",
-   "name": "elephant_nixio"
-  },
-  "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.7"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}