|
@@ -60,12 +60,13 @@
|
|
|
"source": [
|
|
|
"# cfg_filename = os.path.join('profiles', 'mouse_freq.json')\n",
|
|
|
"# cfg_filename = os.path.join('profiles', 'implanted_multiSIT_660_1320.json')\n",
|
|
|
- "cfg_filename = os.path.join('profiles', 'implanted_timeSIT_50_100.json')\n",
|
|
|
+ "#cfg_filename = os.path.join('profiles', 'implanted_timeSIT_50_100.json')\n",
|
|
|
+ "# cfg_filename = os.path.join('profiles', 'passive_FDA.json')\n",
|
|
|
"# cfg_filename = os.path.join('profiles', 'gokce_timeSIT_50_100.json')\n",
|
|
|
- "# cfg_filename = os.path.join('profiles', 'gokce_timeSIT_90_99.json')\n",
|
|
|
+ "# cfg_filename = os.path.join('profiles', 'gokce_timeSIT_90_120.json')\n",
|
|
|
"# gokce_timeSIT_90_108.json')\n",
|
|
|
"\n",
|
|
|
- "# cfg_filename = os.path.join('profiles', 'gokce_socialSIT.json')\n",
|
|
|
+ "cfg_filename = os.path.join('profiles', 'gokce_socialSIT.json')\n",
|
|
|
"# cfg_filename = os.path.join('profiles', 'miguel_socialSIT_fireface.json')\n",
|
|
|
"# cfg_filename = os.path.join('profiles', 'miguel_socialSIT_fireface_chirp.json')\n",
|
|
|
"\n",
|
|
@@ -117,46 +118,46 @@
|
|
|
"text/plain": [
|
|
|
" 0 Microsoft Sound Mapper - Input, MME (2 in, 0 out)\n",
|
|
|
"> 1 Line 1/2 (M-Audio Delta 410), MME (2 in, 0 out)\n",
|
|
|
- " 2 ADAT 1 (1+2) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
- " 3 Analog (9+10) (RME Fireface UFX, MME (2 in, 0 out)\n",
|
|
|
- " 4 Analog (5+6) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
- " 5 S/PDIF (M-Audio Delta 410), MME (2 in, 0 out)\n",
|
|
|
- " 6 Monitor (M-Audio Delta 410), MME (2 in, 0 out)\n",
|
|
|
- " 7 Analog (1+2) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
- " 8 Analog (3+4) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
- " 9 Analog (11+12) (RME Fireface UF, MME (2 in, 0 out)\n",
|
|
|
- " 10 Analog (7+8) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
- " 11 AES (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
- " 12 Multichannel (M-Audio Delta 410, MME (2 in, 0 out)\n",
|
|
|
+ " 2 S/PDIF (M-Audio Delta 410), MME (2 in, 0 out)\n",
|
|
|
+ " 3 Monitor (M-Audio Delta 410), MME (2 in, 0 out)\n",
|
|
|
+ " 4 Multichannel (M-Audio Delta 410, MME (2 in, 0 out)\n",
|
|
|
+ " 5 ADAT 1 (1+2) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
+ " 6 Analog (9+10) (RME Fireface UFX, MME (2 in, 0 out)\n",
|
|
|
+ " 7 Analog (5+6) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
+ " 8 Analog (1+2) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
+ " 9 Analog (3+4) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
+ " 10 Analog (11+12) (RME Fireface UF, MME (2 in, 0 out)\n",
|
|
|
+ " 11 Analog (7+8) (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
+ " 12 AES (RME Fireface UFX), MME (2 in, 0 out)\n",
|
|
|
" 13 Microsoft Sound Mapper - Output, MME (0 in, 2 out)\n",
|
|
|
"< 14 Speakers (3- Realtek High Defin, MME (0 in, 2 out)\n",
|
|
|
- " 15 Analog (11+12) (RME Fireface UF, MME (0 in, 2 out)\n",
|
|
|
- " 16 Line 1/2 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
- " 17 Line 3/4 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
- " 18 Line 7/8 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
- " 19 Line 5/6 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
- " 20 Analog (7+8) (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
- " 21 S/PDIF (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
- " 22 AES (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
- " 23 Speakers (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
- " 24 Multichannel (M-Audio Delta 410, MME (0 in, 2 out)\n",
|
|
|
+ " 15 Line 1/2 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
+ " 16 Line 3/4 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
+ " 17 Line 7/8 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
+ " 18 Line 5/6 (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
+ " 19 S/PDIF (M-Audio Delta 410), MME (0 in, 2 out)\n",
|
|
|
+ " 20 Multichannel (M-Audio Delta 410, MME (0 in, 2 out)\n",
|
|
|
+ " 21 Analog (11+12) (RME Fireface UF, MME (0 in, 2 out)\n",
|
|
|
+ " 22 Analog (7+8) (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
+ " 23 AES (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
+ " 24 Speakers (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
" 25 ADAT 1 (1+2) (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
" 26 Analog (5+6) (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
" 27 Analog (3+4) (RME Fireface UFX), MME (0 in, 2 out)\n",
|
|
|
" 28 Analog (9+10) (RME Fireface UFX, MME (0 in, 2 out)\n",
|
|
|
" 29 Primary Sound Capture Driver, Windows DirectSound (2 in, 0 out)\n",
|
|
|
" 30 Line 1/2 (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 31 ADAT 1 (1+2) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 32 Analog (9+10) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 33 Analog (5+6) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 34 S/PDIF (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 35 Monitor (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 36 Analog (1+2) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 37 Analog (3+4) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 38 Analog (11+12) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 39 Analog (7+8) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 40 AES (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
- " 41 Multichannel (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 31 S/PDIF (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 32 Monitor (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 33 Multichannel (M-Audio Delta 410), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 34 ADAT 1 (1+2) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 35 Analog (9+10) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 36 Analog (5+6) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 37 Analog (1+2) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 38 Analog (3+4) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 39 Analog (11+12) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 40 Analog (7+8) (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
+ " 41 AES (RME Fireface UFX), Windows DirectSound (2 in, 0 out)\n",
|
|
|
" 42 Primary Sound Driver, Windows DirectSound (0 in, 2 out)\n",
|
|
|
" 43 Speakers (3- Realtek High Definition Audio), Windows DirectSound (0 in, 2 out)\n",
|
|
|
" 44 Analog (11+12) (RME Fireface UFX), Windows DirectSound (0 in, 2 out)\n",
|
|
@@ -283,6 +284,8 @@
|
|
|
" cfg['sound']['wav_file'] = os.path.join('assets', cfg['sound']['wav_file'])\n",
|
|
|
"if 'continuous' in cfg['sound']:\n",
|
|
|
" cfg['sound']['continuous']['wav_file'] = os.path.join('assets', cfg['sound']['continuous']['wav_file'])\n",
|
|
|
+ "if 'cont_noise' in cfg['sound']:\n",
|
|
|
+ " cfg['sound']['cont_noise']['filepath'] = os.path.join('assets', cfg['sound']['cont_noise']['filepath'])\n",
|
|
|
" \n",
|
|
|
"# Saves all parameters to a JSON file with the user-defined \"Experiment ID\" as filename\n",
|
|
|
"with open(os.path.join(save_to, experiment_id + '.json'), 'w') as f:\n",
|
|
@@ -365,6 +368,31 @@
|
|
|
"metadata": {
|
|
|
"scrolled": true
|
|
|
},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "text/plain": [
|
|
|
+ "{'filepath': 'assets\\\\chirp_rate192KHz_100ms_2000Hz_30000Hz.wav',\n",
|
|
|
+ " 'amp': 0.5,\n",
|
|
|
+ " 'channels': [3],\n",
|
|
|
+ " 'enabled': True}"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "execution_count": 11,
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "execute_result"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "cfg['sound']['cont_noise']"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 12,
|
|
|
+ "metadata": {
|
|
|
+ "scrolled": true
|
|
|
+ },
|
|
|
"outputs": [
|
|
|
{
|
|
|
"name": "stdout",
|
|
@@ -784,7 +812,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 12,
|
|
|
+ "execution_count": 13,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -796,7 +824,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 13,
|
|
|
+ "execution_count": 14,
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
|
{
|
|
@@ -806,7 +834,7 @@
|
|
|
"traceback": [
|
|
|
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
|
|
"\u001b[1;31mIndexError\u001b[0m Traceback (most recent call last)",
|
|
|
- "\u001b[1;32m<ipython-input-13-df6d003c4298>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m# do pack data to HDF5\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mh5name\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpack\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msession_path\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 6\u001b[0m \u001b[0mtrial\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
|
|
|
+ "\u001b[1;32m<ipython-input-14-df6d003c4298>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m# do pack data to HDF5\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mh5name\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpack\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msession_path\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 6\u001b[0m \u001b[0mtrial\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
|
|
|
"\u001b[1;32mD:\\runSIT\\..\\pipeline\\postprocessing\\pack.py\u001b[0m in \u001b[0;36mpack\u001b[1;34m(session_path)\u001b[0m\n\u001b[0;32m 165\u001b[0m \u001b[1;31m# head direction\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 166\u001b[0m \u001b[0mtemp_tl\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumn_stack\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mpos_at_freq\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mx_smooth\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my_smooth\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mspeed\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 167\u001b[1;33m \u001b[0mhd\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mhead_direction\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtemp_tl\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 168\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 169\u001b[0m \u001b[1;31m# trial numbers\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
|
|
|
"\u001b[1;32mD:\\runSIT\\..\\pipeline\\postprocessing\\head_direction.py\u001b[0m in \u001b[0;36mhead_direction\u001b[1;34m(tl, hd_update_speed)\u001b[0m\n\u001b[0;32m 22\u001b[0m \u001b[0mcrit\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwhere\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdiff\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0midle_idxs\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 23\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 24\u001b[1;33m \u001b[0midle_periods\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0midle_idxs\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0midle_idxs\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mcrit\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m)\u001b[0m \u001b[1;31m# first idle period\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 25\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpoint\u001b[0m \u001b[1;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcrit\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[0midx_start\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0midle_idxs\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mcrit\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
|
|
|
"\u001b[1;31mIndexError\u001b[0m: index 0 is out of bounds for axis 0 with size 0"
|