-
Notifications
You must be signed in to change notification settings - Fork 59
/
ut_rcninit.py
45 lines (34 loc) · 1017 Bytes
/
ut_rcninit.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from __future__ import absolute_import, division
import numpy as np
def ut_rcninit(tin, **opts):
t = tin[:]
t[np.isnan(t)] = []
# t(isnan(t)) = []
opt = {}
opt['cnstit'] = False
opt['minsnr'] = 2
opt['minpe'] = 0
for key, item in opts.items():
try:
opt[key] = item
except KeyError:
print('ut_reconstr: unrecognized input: {0}'.format(key))
# args = list(args)
# args = [string.lower() for string in args]
# Need an example of the args
# while ~isempty(args)
# switch(lower(args{1}))
# case 'cnstit'
# opt.cnstit = args{2};
# args(1:2) = [];
# case 'minsnr'
# opt.minsnr = args{2};
# args(1:2) = [];
# case 'minpe'
# opt.minpe = args{2};
# args(1:2) = [];
# otherwise
# error(['ut_reconstr: unrecognized input: ' args{1}]);
# end
# end
return t, opt