August 2017 Gitlab migration is now completed. Emails should work now. More information: http://telegra.ph/CiTIUS-Gitlab-Migration-Status-08-23

Commit 1be0f75c by Tomás Teijeiro Campo

Main script adapted for the new delineation procedure.

parent 69223cef
......@@ -27,9 +27,9 @@ parser.add_argument('-r', metavar='record', required=True,
help='Record to be processed')
parser.add_argument('-a', metavar='ann', default='qrs',
help='Annotator used to set the initial evidence')
parser.add_argument('-o', metavar='oann', default='pqrst',
parser.add_argument('-o', metavar='oann', default='pqt',
help= ('Save annotations as annotator oann '
'(default: pqrst)'))
'(default: pqt)'))
args = parser.parse_args()
#Searching settings
......@@ -73,26 +73,26 @@ print('\nFinished in {0:.3f} seconds'.format(time.time()-t0))
#Best explanation
node.recover_all()
annots = interp2ann(node)
#MITAnnotation.save_annotations(annots, args.r + '.' + args.o)
MITAnnotation.save_annotations(annots, args.r + '.' + args.o)
print('Record ' + args.r + ' succesfully processed')
import matplotlib.pyplot as plt
import numpy as np
from construe.utils.units_helper import samples2msec as sp2ms, msec2samples as ms2sp
plt.plot(IN.SIG._SIGNAL['MLI'], 'k')
hb = list(node.get_observations(o.Normal_Cycle))
tws = list(node.get_observations(o.TWave))
plt.vlines([t.lateend for t in tws], -100, 150, 'g', linewidths=3)
tends = []
for i in xrange(1, len(hb)):
h = hb[i]
rr_3 = np.cbrt(sp2ms(h.meas.rr[0])/1000.0)
rtc = ms2sp(sp2ms(h.meas.rt[0])*rr_3)
et = h.time.start + rtc
tends.append(et)
prior_rtc = ms2sp(sp2ms(hb[i-1].meas.rt[0])*rr_3)
prior_et = h.time.start + prior_rtc
et_w = 2.5*hb[i-1].meas.rt[1]
plt.fill([prior_et-et_w, prior_et-et_w,prior_et+et_w, prior_et+et_w],
[-100, 150, 150, -100], color='b', alpha=0.2)
plt.vlines(tends, -100, 150, 'r')
#import matplotlib.pyplot as plt
#import numpy as np
#from construe.utils.units_helper import samples2msec as sp2ms, msec2samples as ms2sp
#plt.plot(IN.SIG._SIGNAL['MLI'], 'k')
#hb = list(node.get_observations(o.Normal_Cycle))
#tws = list(node.get_observations(o.TWave))
#plt.vlines([t.lateend for t in tws], -100, 150, 'g', linewidths=3)
#tends = []
#for i in xrange(1, len(hb)):
# h = hb[i]
# rr_3 = np.cbrt(sp2ms(h.meas.rr[0])/1000.0)
# rtc = ms2sp(sp2ms(h.meas.rt[0])*rr_3)
# et = h.time.start + rtc
# tends.append(et)
# prior_rtc = ms2sp(sp2ms(hb[i-1].meas.rt[0])*rr_3)
# prior_et = h.time.start + prior_rtc
# et_w = 2.5*hb[i-1].meas.rt[1]
# plt.fill([prior_et-et_w, prior_et-et_w,prior_et+et_w, prior_et+et_w],
# [-100, 150, 150, -100], color='b', alpha=0.2)
#plt.vlines(tends, -100, 150, 'r')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment