Skip to content

Commit

Permalink
Fix/update tutorials asset and unitary_event_analysis to use nixio 1.…
Browse files Browse the repository at this point in the history
…5.0 (#441)

* updated UE tutorial and requirements to use nixio 1.5.0 (#86)

* updated links for datasets used in tutorials asset and UE

* use 'read only' to assure backwards compatibility

* reset outputs of notebook

* remove permalinks from tutorials asset and UE

* hotfix fixed jinja2 version to 3.0.3

* changed URLs to elephant-data master
  • Loading branch information
Moritz-Alexander-Kern authored Mar 28, 2022
1 parent e97479b commit 7a6d3f2
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 31 deletions.
46 changes: 27 additions & 19 deletions doc/tutorials/asset.ipynb

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions doc/tutorials/unitary_event_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
},
"outputs": [],
"source": [
"# Download data\n",
"!curl https://web.gin.g-node.org/INM-6/elephant-data/raw/master/dataset-1/dataset-1.h5 --output dataset-1.h5 --location"
"# Download trial data\n",
"!curl https://gin.g-node.org/INM-6/elephant-data/raw/master/tutorials/tutorial_unitary_event_analysis/data/dataset-1.nix --output dataset-1.nix --location"
]
},
{
Expand Down Expand Up @@ -464,10 +464,13 @@
},
"outputs": [],
"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"
"io = neo.io.NixIO(\"./dataset-1.nix\",'ro')\n",
"block = io.read_block()\n",
"\n",
"spiketrains = []\n",
"# each segment contains a single trial\n",
"for ind in range(len(block.segments)):\n",
" spiketrains.append (block.segments[ind].spiketrains)"
]
},
{
Expand Down Expand Up @@ -498,9 +501,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "elephant_nixio",
"language": "python",
"name": "python3"
"name": "elephant_nixio"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -512,7 +515,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.9.7"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down Expand Up @@ -574,5 +577,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
2 changes: 1 addition & 1 deletion requirements/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- pandas
- scikit-learn
- statsmodels
- jinja2
- jinja2==3.0.3 # prevent bug happening in 3.1.0 for docs
- pip:
- neo>=0.10.0
- viziphant
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-tutorials.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Packages required to execute jupyter notebook tutorials
matplotlib>=3.3.2
h5py>=3.1.0
nixio==1.5.0b3
nixio>=1.5.0

0 comments on commit 7a6d3f2

Please sign in to comment.