forked from open-ephys/analysis-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKwik.py
More file actions
29 lines (17 loc) · 648 Bytes
/
Copy pathKwik.py
File metadata and controls
29 lines (17 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 8 12:05:54 2014
@author: Josh Siegle
Loads .kwd files
"""
import h5py
import numpy as np
def load(filename, dataset=0):
f = h5py.File(filename, 'r')
data = {}
data['info'] = f['recordings'][str(dataset)].attrs
data['data'] = f['recordings'][str(dataset)]['data']
data['timestamps'] = ((np.arange(0,data['data'].shape[0])
+ data['info']['start_time'])
/ data['info']['sample_rate'])
return data