34 dat_file = open(
"data_out.out")
36 ltest =
get_next_ind(dat_file,
"&",
lambda x:(x.startswith(
"Func")
or x.startswith(
"Ablation")
or x.startswith(
"Time")
or x.startswith(
"&&")))
37 while(len(ltest) != 0):
47 abl_val = np.fromstring(
''.join(it.dropwhile(
lambda x :
not x.isdigit(), simval[0])), sep=
' ')
52 timestr = it.dropwhile(
lambda x:
not x.isdigit(), timestr)
53 timestr =
''.join(timestr)
54 timelist = timelist +
" " + timestr
55 fncstr = it.dropwhile(
lambda x:
not x.isdigit(), fncstr)
56 fncstr =
''.join(fncstr)
57 fncstack.append(np.fromstring(fncstr, sep=
' '))
60 neur_mat = np.vstack(fncstack).transpose();
61 time_vec = np.fromstring(timelist, sep=
' ')
67 fbase = fbase + str(int(abl)) +
"_"
70 sio.savemat(fbase, {
'abl_vals':np.array(abl_val),
'neur_series':neur_mat,
'time_vec':time_vec})
71 ltest =
get_next_ind(dat_file,
"&",
lambda x:(x.startswith(
"Ablation")
or x.startswith(
"Func")
or x.startswith(
"Time")
or x.startswith(
"&&")))