"print [data_segment.events[0].annotations[x][0:10] if type(data_segment.events[0].annotations[x]) is list else data_segment.events[0].annotations[x] for x in data_segment.events[0].annotations]\n",
"print "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Construct analysis epochs\n",
"In this step we extract and cut the data into time segments (termed analysis\n",
"epochs) that we wish to analyze. We contrast these analysis epochs to the\n",
"behavioral trials that are defined by the experiment as occurrence of a Trial\n",
"Start (TS-ON) event in the experiment. Concretely, here our analysis epochs\n",
"are constructed as a cutout of 25ms of data around the TS-ON event of all\n",
"successful behavioral trials.\n",
"\n",
"Get Trial Start (TS-ON) events of all successful behavioral trials\n",
"(corresponds to performance code 255, which is accessed for convenience and\n",
"better legibility in the dictionary attribute performance_codes of the\n",
"ReachGraspIO class).\n",
"\n",
"To this end, we filter all event objects of the loaded data to match the name\n",
"\"TrialEvents\", which is the Event object containing all Events available (see\n",
"documentation of ReachGraspIO). From this Event object we extract only events\n",
"matching \"TS-ON\" and the desired trial performance code (which are\n",