|
@@ -79,37 +79,19 @@
|
|
|
}
|
|
|
},
|
|
|
"source": [
|
|
|
- "On Linux you can download the compiled nix file via the command below. On other systems, please download the file manually from [here](https://gin.g-node.org/sprenger/multielectrode_grasp/raw/dataset_nix/datasets_nix/i140703-001_cut_74sec.nix) and save it in the same folder as this notebook."
|
|
|
+ "On Linux you can download the compiled nix file via the command below. On other systems, please download the file manually from [here](https://gin.g-node.org/NeuralEnsemble/neo_elephant_teaching/raw/master/reach_to_grasp_material/i140703-001.nix) and save it in the same folder as this notebook."
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 3,
|
|
|
+ "execution_count": null,
|
|
|
"id": "10d61396",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
|
"slide_type": "skip"
|
|
|
}
|
|
|
},
|
|
|
- "outputs": [
|
|
|
- {
|
|
|
- "name": "stdout",
|
|
|
- "output_type": "stream",
|
|
|
- "text": [
|
|
|
- "--2021-09-29 15:24:49-- https://gin.g-node.org/NeuralEnsemble/neo_elephant_teaching/raw/master/reach_to_grasp_material/i140703-001.nix\n",
|
|
|
- "Resolving gin.g-node.org (gin.g-node.org)... 141.84.41.219\n",
|
|
|
- "Connecting to gin.g-node.org (gin.g-node.org)|141.84.41.219|:443... connected.\n",
|
|
|
- "HTTP request sent, awaiting response... 200 OK\n",
|
|
|
- "Length: 0 [text/plain]\n",
|
|
|
- "Saving to: 'i140703-001.nix’\n",
|
|
|
- "\n",
|
|
|
- "i140703-001.nix [ <=> ] 0 --.-KB/s in 0s \n",
|
|
|
- "\n",
|
|
|
- "2021-09-29 15:24:49 (0,00 B/s) - 'i140703-001.nix’ saved [0/0]\n",
|
|
|
- "\n"
|
|
|
- ]
|
|
|
- }
|
|
|
- ],
|
|
|
+ "outputs": [],
|
|
|
"source": [
|
|
|
"!wget -O reach_to_grasp_material/i140703-001.nix https://gin.g-node.org/NeuralEnsemble/neo_elephant_teaching/raw/master/reach_to_grasp_material/i140703-001.nix"
|
|
|
]
|
|
@@ -129,7 +111,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 2,
|
|
|
+ "execution_count": 1,
|
|
|
"id": "a76ae878",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -160,7 +142,7 @@
|
|
|
" time: -0.00010000000000000026 s to 74.4549 s"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 2,
|
|
|
+ "execution_count": 1,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
}
|
|
@@ -200,7 +182,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 3,
|
|
|
+ "execution_count": 2,
|
|
|
"id": "02a207fc",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -227,7 +209,7 @@
|
|
|
" 'noise': True}"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 3,
|
|
|
+ "execution_count": 2,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
}
|
|
@@ -248,12 +230,12 @@
|
|
|
"source": [
|
|
|
"\n",
|
|
|
"## Dataset overview - AnalogSignals\n",
|
|
|
- "To learn more about the channels of the analogsignal, we print the array_annotations of the single analogsignal object:"
|
|
|
+ "To learn more about the channels of the analogsignal, we print the entries of the array_annotations of the single analogsignal object:"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 4,
|
|
|
+ "execution_count": 3,
|
|
|
"id": "d5e4a903",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -267,7 +249,7 @@
|
|
|
"dict_keys(['channel_names', 'channel_ids', 'file_origin', 'connector_ID', 'connector_pinID', 'nev_dig_factor', 'nb_sorted_units', 'nev_hi_freq_order', 'nev_hi_freq_type', 'nev_lo_freq_order', 'nev_lo_freq_type', 'nsx_hi_freq_order', 'nsx_lo_freq_order', 'nsx_hi_freq_type', 'nsx_lo_freq_type', 'description', 'nsx', 'hi_pass_freq', 'lo_pass_freq', 'hi_pass_order', 'lo_pass_order', 'filter_type', 'electrode_reject_HFC', 'electrode_reject_LFC', 'electrode_reject_IFC', 'connector_aligned_ids', 'coordinates_x', 'coordinates_y'])"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 4,
|
|
|
+ "execution_count": 3,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
}
|
|
@@ -281,7 +263,7 @@
|
|
|
"id": "5111b21f",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
|
- "slide_type": "fragment"
|
|
|
+ "slide_type": "skip"
|
|
|
}
|
|
|
},
|
|
|
"source": [
|
|
@@ -306,7 +288,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 5,
|
|
|
+ "execution_count": 4,
|
|
|
"id": "765fde73",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -357,7 +339,7 @@
|
|
|
"id": "07d3277a",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
|
- "slide_type": "fragment"
|
|
|
+ "slide_type": "skip"
|
|
|
}
|
|
|
},
|
|
|
"source": [
|
|
@@ -378,7 +360,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 6,
|
|
|
+ "execution_count": 5,
|
|
|
"id": "27ce9e97",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -399,14 +381,24 @@
|
|
|
}
|
|
|
},
|
|
|
"source": [
|
|
|
- "### Masking Neo objects\n",
|
|
|
- "\n",
|
|
|
+ "### Masking Neo objects"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "markdown",
|
|
|
+ "id": "40cab7af",
|
|
|
+ "metadata": {
|
|
|
+ "slideshow": {
|
|
|
+ "slide_type": "skip"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "source": [
|
|
|
"First we are selecting event times that are occurring during successful trials, marked by the `performance_in_trial_str` as `correct_trial`. In addition we also only want to select trial start (`TS-ON`) events. Based on the array annotations we are creating two masks and apply both to the original event to generate a new event object via slicing."
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 7,
|
|
|
+ "execution_count": 6,
|
|
|
"id": "fe323fd4",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -431,7 +423,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 8,
|
|
|
+ "execution_count": 7,
|
|
|
"id": "6096013b",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -453,14 +445,24 @@
|
|
|
},
|
|
|
"source": [
|
|
|
"### Utility function: Epoch creation\n",
|
|
|
- "In the next step we are making use of neo utility functions to generate epochs around the time points extracted.\n",
|
|
|
- "\n",
|
|
|
+ "In the next step we are making use of neo utility functions to generate epochs around the time points extracted."
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "markdown",
|
|
|
+ "id": "f046bf8a",
|
|
|
+ "metadata": {
|
|
|
+ "slideshow": {
|
|
|
+ "slide_type": "skip"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "source": [
|
|
|
"Construct analysis epochs from 10ms before the TS-ON of a successful behavioral trial to 15ms after TS-ON. The name \"analysis_epochs\" is given to the resulting Neo Epoch object. The object is not attached to the Neo Segment. The parameter event2 of add_epoch() is left empty, since we are cutting around a single event, as opposed to cutting between two events."
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 9,
|
|
|
+ "execution_count": 8,
|
|
|
"id": "192dd147",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -475,7 +477,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 10,
|
|
|
+ "execution_count": 9,
|
|
|
"id": "daabfccf",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -499,7 +501,7 @@
|
|
|
"id": "84ae63ef",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
|
- "slide_type": "subslide"
|
|
|
+ "slide_type": "skip"
|
|
|
}
|
|
|
},
|
|
|
"source": [
|
|
@@ -508,7 +510,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 11,
|
|
|
+ "execution_count": 10,
|
|
|
"id": "adf48780",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -532,14 +534,26 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "markdown",
|
|
|
- "id": "ec0a7841",
|
|
|
+ "id": "36bfe04d",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
|
"slide_type": "subslide"
|
|
|
}
|
|
|
},
|
|
|
"source": [
|
|
|
- "### Utility function: cutting segment by epochs\n",
|
|
|
+ "### Utility function: cutting segment by epochs"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "markdown",
|
|
|
+ "id": "ec0a7841",
|
|
|
+ "metadata": {
|
|
|
+ "slideshow": {
|
|
|
+ "slide_type": "skip"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "source": [
|
|
|
+ "\n",
|
|
|
"Now we use the previously defined epochs to cut the segment containing the complete dataset into subsets, where each new segment corresponds to the starting epoch of a successful trial. For capturing the newly generated segments, we create a new Neo block.\n",
|
|
|
"\n",
|
|
|
"Create new segments of data cut according to the analysis epochs of the 'analysis_epochs' Neo Epoch object. The time axes of all segments are aligned such that each segment starts at time 0 (parameter reset_times); annotations describing the analysis epoch are carried over to the segments. A new Neo Block named \"data_cut_to_analysis_epochs\" is created to capture all cut analysis epochs.\n"
|
|
@@ -547,7 +561,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 12,
|
|
|
+ "execution_count": 11,
|
|
|
"id": "42d33b10",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -564,7 +578,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 13,
|
|
|
+ "execution_count": 12,
|
|
|
"id": "f58bca34",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|
|
@@ -578,7 +592,7 @@
|
|
|
"11"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 13,
|
|
|
+ "execution_count": 12,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
}
|
|
@@ -601,7 +615,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 14,
|
|
|
+ "execution_count": 13,
|
|
|
"id": "8c34c004",
|
|
|
"metadata": {
|
|
|
"slideshow": {
|